Skip to content

feat(electron)!: the shared workbench is the only desktop shell (0406) - #653

Merged
crs48 merged 3 commits into
mainfrom
claude/0406-default-shell
Jul 29, 2026
Merged

feat(electron)!: the shared workbench is the only desktop shell (0406)#653
crs48 merged 3 commits into
mainfrom
claude/0406-default-shell

Conversation

@crs48

@crs48 crs48 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

The final implementation phase of exploration 0406: the xnet:unified-shell flag is gone and the shared <Workbench/> is the desktop app's only shell.

  • Deleted the bespoke shell: SystemMenu (the "three dots"), the overlay renderer, the second command palette (useShellPaletteCommands + @xnetjs/ui CommandPalette mount) — net −1000 lines. ShellState/useDocumentShell survive as the navigation implementation behind the port.
  • Everything the old shell offered has a home in the new one: Add Shared rides the share.addShared command (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 via search.open.
  • Titlebar: a 38px drag strip clears the hiddenInset traffic lights, and the shared frames now subtract --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.
  • Parity guard extended: workspace-parity.test.ts now fails if App.tsx stops 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

xNet Test added 3 commits July 28, 2026 18:16
Signed-off-by: xNet Test <test@xnet.dev>
Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 temporarily deployed to pr-653 July 29, 2026 01:32 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Desktop (Electron)

✏️ Desktop · Canvas home _(SSIM 0.642)_
before after diff
before after diff
✏️ Desktop · Canvas with objects _(SSIM 0.587)_
before after diff
before after diff

Auto-captured by CI · run. Informational — not a blocking check.

github-actions Bot added a commit that referenced this pull request Jul 29, 2026
github-actions Bot added a commit that referenced this pull request Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #653.

github-actions Bot added a commit that referenced this pull request Jul 29, 2026
@crs48
crs48 merged commit 431186a into main Jul 29, 2026
21 checks passed
@crs48
crs48 deleted the claude/0406-default-shell branch July 29, 2026 01:42
github-actions Bot added a commit that referenced this pull request Jul 29, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant