Files
platform/todo/workspaces-panels/renaming-a-panel-key-is-a-silent-data.md
T
pastilhasandClaude Fable 5 6071ded175 todo: one file per item, grouped by theme, with a generated index
TODO.md had reached 1050 lines and 72 open items across 28 sections, read mostly
on a phone. It is now a directory: todo/<theme>/<item>.md, one card per file, with
frontmatter carrying id, status, created date and order, and the prose body copied
across verbatim. TODO.md becomes a generated index (bun run todo:index).

Dates: where an item's prose stated one it is used; otherwise its old section's;
otherwise 2026-08-20, floored at the day before the split rather than invented.
date_source records which.

Shaped for a two-way Kanban board, filed as todo/tooling — a card is a file, id is
the identity, frontmatter is the machine's half and the body is the owner's.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 05:42:39 +00:00

24 lines
1.3 KiB
Markdown

---
id: workspaces-panels/renaming-a-panel-key-is-a-silent-data
title: "Renaming a panel key is a silent data migration, and the repair is destructive"
theme: workspaces-panels
status: open
created: 2026-08-17
date_source: stated
order: 2
---
**Renaming a panel key is a silent data migration, and the repair is destructive.** A saved layout
holds `appType` strings. `normalizeLayout` replaces any appType not in the allow-list with the
caller's `fallback`, and `WorkspaceView.tsx:97` writes that back — so a renamed key turns every
saved layout into N copies of whichever panel is `allowed[0]`, permanently, on one page load.
Renaming `headscale-*` → `offscale-*` did exactly this: `/offscale` rendered three server pickers,
`ServersView` never mounted, and it survived every restart because the code was correct and the
data was not (2026-08-17, `ed3806f9`).
Plugin screens are now cleared at install, which covers plugins and nothing else. The general fix
is a rule about wholesale mismatch: **a layout in which NO panel has a recognised appType is
residue from older code — discard it and use the screen's default**, rather than collapsing it.
`fallback: allowed[0]` is arbitrary (it is whatever `panels.ts` happens to list first) and should
probably not be a per-panel substitution at all.