Skip to content

feat(electron): mount the unified workbench shell behind a flag (0406) - #651

Merged
crs48 merged 3 commits into
mainfrom
claude/0406-desktop-mount
Jul 28, 2026
Merged

feat(electron): mount the unified workbench shell behind a flag (0406)#651
crs48 merged 3 commits into
mainfrom
claude/0406-desktop-mount

Conversation

@crs48

@crs48 crs48 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

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.
  • `` 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

xNet Test added 3 commits July 28, 2026 16:12
…kage (0406)

Signed-off-by: xNet Test <test@xnet.dev>
The desktop implements WorkbenchHost (real tags + Space-aware creation
through the port; explicit not-on-desktop-yet panels for comms, habits
and share links) and registers its hosted-view table (real PageView and
DatabaseView; visible placeholders elsewhere). With
localStorage xnet:unified-shell=1 the shared <Workbench/> renders
instead of the bespoke shell — verified live over real SQLite: sidebar
islands, explorer rows from the desktop store, port navigation into the
real page editor, and the ⌘K palette searching native data.

Also: sidebar channel rows degrade via useCommsMaybe instead of
throwing on hosts without a comms layer.

Signed-off-by: xNet Test <test@xnet.dev>
…ce renderer load (0406)

Signed-off-by: xNet Test <test@xnet.dev>
@crs48
crs48 temporarily deployed to pr-651 July 28, 2026 23:15 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

✓ Changelog fragment found — thanks!

@crs48 crs48 added the skip-changelog Exclude this PR from the changelog label Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Warning

1 changed UI file(s) map to no capture target.
Only the home shell was captured, so the surface you changed is not shown
here. Add a routes[] entry — or a flows[] entry + runner if the UI is
behind a tab/inspector/modal/seed data — in scripts/visuals/manifests.json
(scripts/visuals/README.md → Tuning).

Unmapped files
  • apps/web/src/platform/workbench-host.tsx

CI run

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

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #651.

github-actions Bot added a commit that referenced this pull request Jul 28, 2026
@crs48
crs48 merged commit c25884a into main Jul 28, 2026
22 of 23 checks passed
@crs48
crs48 deleted the claude/0406-desktop-mount branch July 28, 2026 23:29
github-actions Bot added a commit that referenced this pull request Jul 28, 2026
crs48 added a commit that referenced this pull request Jul 29, 2026
#652)

Exploration 0406, the increment after #651: the desktop differentiators
now live inside the shared shell.

- **Hosted views**: `canvas`, `meetings`, and `data` resolve to the real
desktop components (port-navigating wrappers) instead of "not on desktop
yet" panels.
- **Canvas home stays the default surface** inside `<Workbench/>` — full
home wiring (ref, pending inserts, create handlers), per the
exploration's open question 1 ("default preset, not a different shell").
- The unified shell's children slot now renders every ShellState:
meetings, data workspace, social import, settings, assistant, stories.
- **Port**: `/social-import` path intent resolves on desktop (the
workbench sidebar's Import row was a dead click before).
- **Capability gating**: AiChatPanel's preload bridge control now flows
through `PlatformPort.capabilities.agentBridge` — the last direct
`window.xnet*` sniff in the shared package is gone.

Verified live in Electron under `xnet:unified-shell=1`: canvas home
renders with real nodes, sidebar Import → Social Import (importer
registry), Meetings list, palette "Go to data workspace" → Data
Workspace, assistant panel auto-pairs the bridge ("Running claude ·
v3.0.0") with the agent-switch control present. Zero console errors.

Checklist: +2 implementation items (18→20 of 23).

🤖 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

skip-changelog Exclude this PR from the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant