Skip to content

Share the desk shell across user and site desks#3410

Merged
youknowriad merged 3 commits into
trunkfrom
codex/add-widget-header-menu
May 9, 2026
Merged

Share the desk shell across user and site desks#3410
youknowriad merged 3 commits into
trunkfrom
codex/add-widget-header-menu

Conversation

@youknowriad
Copy link
Copy Markdown
Contributor

Summary

  • Introduced a shared Desk component that handles the full desk shell for both user and site desks.
  • Kept the behavioral differences behind siteId?: string:
    • user desk persists to desks.user and keeps the welcome note default
    • site desks persist to desks.sites[siteId] and start empty
    • chats are scoped by siteId when present
  • Moved the shared desk canvas, action context, and tldraw adapter under apps/ui/src/ui-desks/desk/.
  • Added site desk IPC/query support plus tests for site desk persistence.
  • Kept the header plus menu registry-driven so widgets can be added from the same menu on both desk variants.

Testing

  • npx eslint --fix on the touched files passed.
  • npm run typecheck passed.
  • npm test -- apps/ui/src/ui-desks/widgets/create-widget.test.ts apps/ui/src/ui-desks/desk/tldraw-adapter.test.ts apps/studio/src/modules/desks/lib/ipc-handlers.test.ts passed.

Comment thread apps/studio/src/modules/desks/lib/ipc-handlers.test.ts Outdated
Comment thread apps/ui/src/ui-desks/chrome/index.tsx Outdated
Comment thread apps/ui/src/ui-desks/chrome/index.tsx
Comment thread apps/ui/src/ui-desks/desk/actions-context.tsx Outdated
Comment thread apps/ui/src/ui-desks/widgets/note/definition.ts Outdated
Comment thread apps/ui/src/ui-desks/widgets/note/definition.ts Outdated
Comment thread apps/ui/src/ui-desks/widgets/note/definition.ts Outdated
w: shapeProps.w,
h: shapeProps.h,
} ),
startEditing: true,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we need this at the moment. Let's assume it's true for all widgets

@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented May 9, 2026

📊 Performance Test Results

Comparing 8d84eb6 vs trunk

app-size

Metric trunk 8d84eb6 Diff Change
App Size (Mac) 1408.80 MB 1408.80 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 8d84eb6 Diff Change
load 1501 ms 1494 ms 7 ms ⚪ 0.0%

site-startup

Metric trunk 8d84eb6 Diff Change
siteCreation 8092 ms 8096 ms +4 ms ⚪ 0.0%
siteStartup 4934 ms 4930 ms 4 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@youknowriad youknowriad merged commit aca986b into trunk May 9, 2026
8 of 10 checks passed
@youknowriad youknowriad deleted the codex/add-widget-header-menu branch May 9, 2026 12:57
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.

2 participants