diff options
| author | Adam Malczewski <[email protected]> | 2026-09-06 15:43:37 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-09-06 15:43:37 +0900 |
| commit | b117dba1cd1fa80e1b0c18bae487dc632f4005ae (patch) | |
| tree | 5c76f3133ce07595d28fc904133bf0b060b13daf /src/features/plugins/logic | |
| parent | d39cce17765c809cef4555c9640d12ed171cf4af (diff) | |
| download | dispatch-web-b117dba1cd1fa80e1b0c18bae487dc632f4005ae.tar.gz dispatch-web-b117dba1cd1fa80e1b0c18bae487dc632f4005ae.zip | |
feat(layout): re-probe the layout when the workspace's plugin states change
The backend now activates layout providers PER WORKSPACE (the workspace's
per-workspace enablement state picks the ONE active layout plugin), so
toggling a layout plugin in the workspace plugins modal changes which tree
serves the workspace. The modal's toggle now refreshes the layout so the
newly-enabled provider's tree (or the no-provider degrade) lands without a
reload:
- WorkspaceLayoutPort gains refresh(workspaceId) โ the modal calls it
after every state write (an attempted write re-probes either way: the
probe is the idempotent catch-up; a refused write changed nothing, so it
re-syncs the same tree).
- App.svelte wires the port to the layout store's new
onWorkspacePluginsChanged(workspaceId) โ a guarded re-probe that only
fires for the ACTIVE workspace (another workspace's toggle is picked up
by its own probe on switch, exactly like the other ยง2.6 triggers).
The per-workspace tree resolution itself is backend-side; the marker
renderer, the probe triggers, and the WS push filtering are
unchanged.
Verification: typecheck (svelte-check 0 errors) / test (1528) / check
/ build all green.
Diffstat (limited to 'src/features/plugins/logic')
| -rw-r--r-- | src/features/plugins/logic/types.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/features/plugins/logic/types.ts b/src/features/plugins/logic/types.ts index ec80c9b..e64b553 100644 --- a/src/features/plugins/logic/types.ts +++ b/src/features/plugins/logic/types.ts @@ -70,6 +70,15 @@ export interface WorkspaceLayoutPort { * success or to the failure reason to display. */ readonly reset: (workspaceId: string) => Promise<string | null>; + /** + * The workspace's PER-WORKSPACE PLUGIN STATE changed (the modal just + * toggled a plugin's enablement): the layout plugin that serves THIS + * workspace may have changed (the per-workspace activation rule) โ the + * composition root re-probes the layout so the newly-enabled provider's + * tree (or the no-provider degrade) lands without a reload. Only the + * ACTIVE workspace's toggle re-renders; others are ignored by the store. + */ + readonly refresh: (workspaceId: string) => void; } /** |
