Wire up Add Site and Settings menu actions in agentic UI#4085
Conversation
The application menu sends `add-site` and `user-settings` IPC events, but the agentic UI never subscribed to them, so the menu items and their ⌘N / ⌘, shortcuts did nothing. Subscribe to both events and navigate to the onboarding and settings routes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📊 Performance Test ResultsComparing e89d986 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
| // Fires when the user activates the sidebar toggle shortcut or menu command. | ||
| onToggleSidebar( listener: () => void ): () => void; | ||
|
|
||
| // Fires when the user activates "File > Add Site…" (⌘N) in the application |
There was a problem hiding this comment.
Do these shortcuts also work on Windows? If yes, we can modify them to mention the shortcurts that would be valid for each platform (since now they are macOS specific) or we can remove these comments completely
There was a problem hiding this comment.
They should work on Windows, too. I modified comments and made them more generic.
| } | ||
|
|
||
| // Bridges the Electron application menu ("Add Site…", "Settings…" and their | ||
| // ⌘N / ⌘, shortcuts) to router navigation. Mounted at the root so the |
There was a problem hiding this comment.
Same note about the comments being platform specific
katinthehatsite
left a comment
There was a problem hiding this comment.
The functionality works great, both shortcuts 👍
I left some minor non-blocking comments but otherwise the changes make sense and look good
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reconciles the July 6–10 trunk sync: adopts trunk's productionized screenshot/theme tooling (#3982/#4097), grafts the copy-button (#4113), edit-message (#4094), and inline chat artifacts into the redesigned conversation views, keeps the merged Connector surface over trunk's menu-action wiring (#4085), and keeps the blueprint-selector deletion.
Related issues
How AI was used in this PR
Used Claude Code to trace the menu → IPC → renderer flow, identify the missing subscriptions in the agentic UI connector, and implement the fix mirroring the existing
toggle-sidebar/toggle-site-previewhandlers. All changes were reviewed manually; typecheck, lint, and the related unit tests were run locally.Proposed Changes
With the agentic UI beta enabled, the "Add Site…" (⌘N) and "Settings…" (⌘,) application-menu items and their keyboard shortcuts did nothing. The Electron menu emits
add-siteanduser-settingsIPC events for both UIs, but the agentic UI only listened for the sidebar/preview toggles — so these two actions were silently dropped.The agentic UI now responds to both: "Add Site…" opens the new-site onboarding flow and "Settings…" opens the settings screen, from any route. This restores parity with the legacy UI and makes the advertised menu items and shortcuts actually work.
Testing Instructions
npm start).Pre-merge Checklist