cd1f1616c4d00fb555dea9d20d590df1279e09b9
The edit branch of the dashboard form rebuilt the layout from the template on every submit, then wrote it. So renaming a dashboard, or fixing a typo in its description, silently threw away however its panels had been arranged and whichever apps were in them. The template is a seed picked once at creation; it is not a description of the dashboard as it now stands. It is now only re-applied when the user actually picks a different one. A rename also dropped `ws-terminals-<id>` and `ws-host-terminals-<id>` without carrying them over, so every shell the dashboard held was abandoned: the panels came back empty and the processes stayed alive with nothing pointing at them. Both maps now move to the new key with the layout. The order those keys go into the PATCH body is load-bearing and now says so — the server walks the object in insertion order, `ws-layout-<new>` upserts the row while `ws-terminals-<new>` only updates one, and `ws-layout-<old>: null` deletes. Written the other way round the terminals 404. Verified against the running server rather than by reading: seeded a dashboard with a layout and both terminal maps, sent the rename PATCH exactly as the client now builds it, and read the rows back — layout, terminals and host terminals all arrived under the new id and the old row was gone. The no-op case (same id, same template) now writes nothing at all instead of PATCHing the layout back to itself. Co-Authored-By: Claude Opus 5 <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%