4970e7e70f3177fca697fdee9c862ec587a1767a
Clicking edit dropped ?selected= from the url, so the address bar forgot which dashboard you were editing — and on mobile that is worse than cosmetic: DashboardsScreen uses `selected` to decide whether to show the right-hand panel, which is where the form renders, so tapping edit opened it out of sight. It cleared the param because it had to. The form was only reachable through DashboardPreviewEmpty, which the preview renders when nothing is selected, so an edit could only be shown by first pretending nothing was selected. DashboardPreview now checks creating/editing itself, before it resolves the selection, and the empty state loses its duplicate of that check — having two of them is what made the first attempt at this look safe when it removed the only route to the form. The form is shown only for the dashboard actually selected (`editingId === selectedId`), and picking a row clears creating/editing. Without both, an abandoned edit followed you onto the next dashboard: the url said you were on B while the form still edited A. The click handler covers the ordinary path and the guard covers back/forward and pasted links. Verified in the browser: D5, D7, D8, D9 — edit keeps the param and opens the form, save hands back to the preview of what you edited, switching dashboards mid-edit abandons it cleanly, and returning to the first one shows its preview rather than the stale form. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Description
No description provided
42 MiB
Languages
TypeScript
90.9%
Shell
4.7%
JavaScript
4.1%
CSS
0.2%
HTML
0.1%