feat(workbench): move the shell chrome into @xnetjs/workbench (0406) - #650
Merged
Conversation
added 4 commits
July 28, 2026 14:24
The shell renders tab content through a view registry the app fills at boot (registerHostedViews takes the complete Record so exhaustiveness stays a compile error, now in apps/web/src/platform/hosted-views.tsx). ViewHost drops all 18 view imports. Pure modules move into the package with shims at the old paths: format-bytes, settings-sections, saved-view-registry (+@xnetjs/social dep), tag-view-data, and the source-stamp browser half (the inspect overlay follows with the chrome). Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
Contributor
|
Preview removed for PR #650. |
… build (0406) builtin-slot-views now lazy-loads AiChatPanel (restoring the isolation the /ai subpath exists for), the storybook plugins shim gains the AI surface/connector exports the chrome resolves, and the storybook build externalizes usearch exactly like apps/web does. Signed-off-by: xNet Test <test@xnet.dev>
The moved chrome's arbitrary-value classes (e.g. the mobile shell's h-[calc(100dvh-…)]) stopped being generated when the files left apps/web — the web and storybook Tailwind configs never scanned packages/workbench. The mobile shell collapsed to half height and the bottom cluster intercepted editor clicks (the editor-ux CI failure). Electron's config already wildcards packages/*/src. Signed-off-by: xNet Test <test@xnet.dev>
Contributor
🖼️ UI changes in this PRComponentsScreensInteractionsAuto-captured by CI · run. Informational — not a blocking check. |
crs48
added a commit
that referenced
this pull request
Jul 28, 2026
#651) ## Summary The desktop half of exploration 0406's mount phase, stacked on #650: - **Palette cluster + data hooks move into the package.** GlobalSearch, WorkspaceCommands, UndoToast, \`lib/desk\`, \`usePageSearchSurface\`, \`useSpaces\`, \`useRequestCount\`, and \`useNodeActions\` are package-clean (pure @xnetjs/* data hooks and port-abstracted components), so they move into \`@xnetjs/workbench\` outright and the \`WorkbenchHost\` contract shrinks by seven members — the minimum a second host must implement got smaller. - **Desktop implements WorkbenchHost** (\`shell/workbench-host.tsx\`): real workspace tags and Space-aware doc creation through the PlatformPort; explicit "not on desktop yet" panels for comms, habits, and share links — visible absences, never silent stubs. - **Desktop registers its hosted-view table** (\`shell/hosted-views.tsx\`): real PageView/DatabaseView; every other TabNodeType gets a labeled placeholder. The Record stays complete, so exhaustiveness is still a compile error. - **\`<Workbench/>\` mounts in Electron** behind \`localStorage.setItem('xnet:unified-shell', '1')\` — the bespoke shell remains the default. - \`sidebar/sources\` channel rows degrade via \`useCommsMaybe\` instead of throwing on hosts without a comms provider (found live: the first desktop mount crashed exactly there, loudly). - New \`[boot] renderer loaded\` trace marker used for the cold-open measurement. ## Verified live in Electron over real SQLite Sidebar islands, lens chips, and the explorer listing the desktop store's real pages; clicking a row navigates through the port into the real desktop PageView; the ⌘K palette (the moved GlobalSearch) searches native data ("Electron Smoke Page") — zero console errors. ## Measurements (checklist item) - Renderer dist: 26.1 MB → 35.4 MB (+9.3 MB — the chrome and its graph, parsed alongside the bespoke shell while the flag exists) - Cold-open (\`electron-vite preview\`, \`main module loaded\` → \`renderer loaded\`): 0.52 s → 0.78 s. The 10% validation budget applies to the end state where the chrome replaces the bespoke shell. Exploration 0406 is now 18/23 implementation. Remaining: register canvas home/meetings/social-import as workbench views, capability gating, flag removal + bespoke-shell deletion, and the 0394-gated panel-write item. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
crs48
added a commit
that referenced
this pull request
Jul 29, 2026
Every box in exploration 0406 is checked — 23/23 implementation, 10/10 validation — so the filename flips to `[x]`. The arc, for the record: #641/#642/#644 (port + core extraction), #648 (AI panel on desktop), #650/#651 (chrome behind injection points, first Electron mount), #652 (desktop surfaces in the shell), #653 (flag removed, bespoke shell deleted), #655 (cold-open back under the 0.52s baseline), #656 (approval-gated writes — the last blocked item). The desktop and web apps now render one shell from one module, verified live at every step. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Summary
The chrome phase of exploration 0406 (one shell, two surfaces): the entire workbench shell chrome — frames, islands, menus, mobile shell, sidebar, explorer views, time machine, drafts, calm surface — moves from `apps/web/src/workbench` into `@xnetjs/workbench`, behind two injection points the host app fills at boot:
Pure modules moved outright (with shims at the old paths, 0280 pattern): format-bytes, settings-sections, saved-view-registry, tag-view-data, data-runtime, explorer-items, the source-stamp browser half, `DOC_TYPE_META` (the label/icon half of `DOC_TYPE_ROUTES`), and `AGENT_LAYOUT_EVENT`.
What deliberately did not move: `inspect/` (dev-only point-and-change overlay, coupled to devkit), and every app component that binds the router or app data — those stay host-side behind the contract.
Boot-order rule enforced throughout: no `workbenchHost()` call at module scope — the barrel evaluates before the app's boot registration runs, so module-scope registration (Workbench's builtin views, WorkspaceSwitcher's coachtips) became lazy-once on first render, and reading before registration throws loudly instead of rendering an empty shell.
Verification
Part of exploration 0406 (now 15/23 implementation). Next: mount `` in Electron behind `XNET_UNIFIED_SHELL`.
🤖 Generated with Claude Code