mark 5.6 resolved, and stop three docs claiming a channel that has no publisher
The todo entry said the file-viewer registration was dead; tracing it confirmed that and turned up the reason it looked alive — the ephemeral file viewer is a different mounting path entirely. Recorded, with what was checked in the database before deleting anything. CLAUDE.md, navigation-audit.md and workspace-panels.md all listed FILE_VIEWER_CHANNEL among the legitimate refresh/signal channels. It never had a publisher, and no longer exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -536,13 +536,34 @@ work disagree permanently about the roster, with neither told — a direct contr
|
||||
providing `localStorage`, and `MusicPlayer/useLyricsOpen.ts` reads it at *import* time, so the
|
||||
whole app graph was unimportable from a test. That is now fixed, which unblocks testing anything
|
||||
else that pulls in a panel app.
|
||||
- [ ] **Seeding depends on undocumented mount ordering.** Three call sites call `useAppRegistry()` with
|
||||
- [x] **Seeding depends on undocumented mount ordering.** Three call sites call `useAppRegistry()` with
|
||||
no argument, defaulting to `[]`. It works only because `<AppRegistry />` sits at `frontend.tsx:32`,
|
||||
above `<App />` at `:34`. Mount a `WorkspaceView` above that and every panel renders empty.
|
||||
- [ ] **`officerdev/file-viewer` is a dead registration.** Its provider reads
|
||||
**Resolved `9fcc9c2`** — and the mechanism is worse than "ordering", which is why the fix is not
|
||||
"move the component up". `<AppRegistry />` seeded through `useGlobal`'s `initialData`, and
|
||||
**`initialData` is not a write**: it applies only to whichever component reads the slot first. A
|
||||
`WorkspaceView` that rendered first would create the slot as `{}` and the seeder had no second
|
||||
chance — every panel on that screen an empty box, for a reason visible nowhere near it.
|
||||
Both registries are now written into the query cache by `seedAppRegistry` / `seedWidgetRegistry`
|
||||
before `createRoot().render()`, so there is no ordering to depend on. They take the `QueryClient`
|
||||
rather than running as a module-scope side effect because the app list imports every panel app and
|
||||
every panel app imports the Workspace framework; keeping the call in `frontend.tsx` — the one
|
||||
module that is nobody's dependency — is what stops that being an import cycle. (Making
|
||||
`useAppRegistry` simply default to the static list was the obvious fix and is exactly that cycle.)
|
||||
`registerApp` and `registerWidget` are deleted with the components: nothing ever called either, and
|
||||
a registry that can be added to at runtime is a registry whose contents depend on what has mounted.
|
||||
- [x] **`officerdev/file-viewer` is a dead registration.** Its provider reads
|
||||
`usePanelChannel('file-viewer:' + panelId)` and **nothing in the repo writes that channel**. Also
|
||||
`availableOnPanel: false`, so it can't be picked. If it ever appeared in a layout it would say
|
||||
"No file selected" forever.
|
||||
**Resolved `9fcc9c2`** — traced and confirmed dead, then removed rather than repaired. The file
|
||||
viewer that users actually see is mounted by `useFileViewerPanels` as an *ephemeral* panel, which
|
||||
supplies `FileViewerBody`/`FileViewerHeader` itself with a provider reading the path from
|
||||
`?view=`/`?ephemeral=` — it never touched the registry. No stored layout referenced the key
|
||||
(checked across `dashboards`, `screens`, `dashboard_defaults`, `user_state`, `user_settings`: zero
|
||||
rows), so the meta and `FileViewerPanelWrapper.tsx` are gone. Side effect worth knowing: no app in
|
||||
the registry now uses the `provider` field. It is kept, because the ephemeral path
|
||||
(`PanelComponentEntry.provider`) still does and `PanelSlot` resolves the two symmetrically.
|
||||
- [ ] **`dashboard-list` is pickable in every panel on every dashboard.** `apps/Dashboards/index.ts:12-16`
|
||||
omits `availableOnPanel` while its sibling `dashboard-preview` sets `false`. Almost certainly
|
||||
unintended — the flag is opt-_out_, and 12 of 44 metas omit it. Consider making it opt-_in_.
|
||||
|
||||
Reference in New Issue
Block a user