feat(electron)!: the shared workbench is the only desktop shell (0406) - #653
Merged
Conversation
added 3 commits
July 28, 2026 18:16
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
🖼️ UI changes in this PRDesktop (Electron)Auto-captured by CI · run. Informational — not a blocking check. |
Contributor
|
Preview removed for PR #653. |
crs48
added a commit
that referenced
this pull request
Jul 29, 2026
Docs-only: checks the `electron-e2e` and app-suites validation items in exploration 0406 — #653's CI run against the unified-shell-only desktop is exactly the evidence both boxes ask for. 0406 now stands at 22/23 implementation and 8/10 validation. The three open items: cold-open budget (follow-up task in flight), and the chat-turn-writes-a-node pair blocked on 0394 phase 2. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
crs48
added a commit
that referenced
this pull request
Jul 29, 2026
…open budget (#655) ## Summary Closes out the last open 0406 validation item: desktop cold-open was +~70% over the pre-unification baseline (renderer entry chunk carried every surface the first paint never executes). This lazy-loads everything except the shell frame + home canvas, and the cold-open marker window lands **under** the pre-unification baseline. **Measured** (`electron out/main/index.js`, `[boot] main module loaded` → `renderer loaded`, warm runs after one warm-up, same machine): | Build | Cold-open | Entry chunk | |---|---|---| | Pre-unification reference (`af6fc9a6d`, rebuilt + measured identically) | 0.512–0.520 s | 10.7 MB | | Unified shell before this PR | 0.597–0.622 s (+17%) | 11.4 MB | | **This PR (merged end state)** | **0.462–0.479 s** | **7.9 MB** | ## Changes - **apps/electron**: `App.tsx` focused surfaces (Page, Database, Settings, SocialImport, Meetings, DataWorkspace, Storybook, AI chat) and the hosted-view table load via `React.lazy` behind a `Suspense` inside the mounted `Workbench`. `CanvasView` stays static — the home canvas is first paint. - **@xnetjs/workbench**: every heavy builtin slot view loads on demand (`lazySlotView`), extending the isolation `AiChatPanel` already had. - **@xnetjs/dashboard**: `XChart` loads on first chart render — echarts+zrender are 1.3 MB of parse the shell entry graph was retaining. - **@xnetjs/charts**: `sideEffects: false` so barrel consumers (the charts-extra plugin) don't retain the module-scope `echarts.use(...)` registration. - **@xnetjs/editor**: katex (0.5 MB) loads on the first inline-math render; documents without math never pay for it. - **@xnetjs/devtools**⚠️ **behavior change**: the exports map resolved `"import"` → the full dev implementation, so *production* builds shipped the documented-as-no-op devtools (0.5 MB). `"import"` now resolves the production no-op; dev builds still get the full implementation via the `"development"` condition. Packaged apps lose the hidden ⌘⇧D debug console — if that's wanted in production, revert the one `exports` line. All touched packages are private — no changesets. Changelog fragment included. ## Verification - Pre-unification reference built at `af6fc9a6d` in a throwaway worktree and measured with the identical harness on the same machine. - Unified shell + home canvas render over CDP with **zero console errors**; page create → inline BlockNote editor loads on demand; lazy chunks resolve. - `vitest --project dom` 3138/3138, `--project electron` 157/157 (incl. the #653 parity test), `--project editor` 102/102; full `pnpm typecheck` green; lint 0 errors. - One test updated: the chart-widget jsdom fallback assertion now awaits the lazy XChart import. 🤖 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 was referenced Jul 30, 2026
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.






The final implementation phase of exploration 0406: the
xnet:unified-shellflag is gone and the shared<Workbench/>is the desktop app's only shell.SystemMenu(the "three dots"), the overlay renderer, the second command palette (useShellPaletteCommands+@xnetjs/uiCommandPalette mount) — net −1000 lines.ShellState/useDocumentShellsurvive as the navigation implementation behind the port.share.addSharedcommand (the desktop host now supplies the real dialog), Open Stories is a dev-only palette command, devtools toggle lives in the status bar, share-payload/cloud-connect dialogs mount beside the shell. The ActionDock stays — it is the canvas's tool dock, not shell chrome — and its search button drives the workbench palette viasearch.open.--titlebar-height(default 0 — web unaffected) so the bottom status islands stay on-screen. This fixed a live regression the user spotted, and fixing it once in the package healed all three frames — the exploration's acceptance criterion demonstrated in the wild.workspace-parity.test.tsnow fails ifApp.tsxstops mounting the shared Workbench or any source resurrects a bespoke shell component.Verified live over CDP with the flag cleared: canvas home default, dock → palette, palette → Add Shared dialog / Open Stories, page focus into the real editor, status islands on-screen, zero console errors.
Cold-open honestly measured at 0.87–0.90s vs the 0.52s pre-unification baseline (+~70%, renderer dist 26.1→36 MB) — recorded as an open validation item with a code-splitting follow-up, not hidden.
Doc: implementation 22/23 (last item blocked on 0394 phase 2), validation 6/10.
🤖 Generated with Claude Code