Skip to content

Wire up Add Site and Settings menu actions in agentic UI#4085

Merged
wojtekn merged 3 commits into
trunkfrom
fix-agentic-ui-add-site-settings-menu
Jul 9, 2026
Merged

Wire up Add Site and Settings menu actions in agentic UI#4085
wojtekn merged 3 commits into
trunkfrom
fix-agentic-ui-add-site-settings-menu

Conversation

@wojtekn

@wojtekn wojtekn commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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-preview handlers. 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-site and user-settings IPC 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

  1. Start the app in dev mode (npm start).
  2. Enable the agentic UI beta feature (menu → Beta Features).
  3. Trigger File → Add Site… or press ⌘N → the new-site onboarding flow opens.
  4. Trigger Settings… or press ⌘, → the settings screen opens.
  5. Confirm both work from different routes (e.g. while viewing a session).

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

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>
@wojtekn wojtekn requested a review from a team July 6, 2026 10:08
@wpmobilebot

wpmobilebot commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing e89d986 vs trunk

app-size

Metric trunk e89d986 Diff Change
App Size (Mac) 1419.19 MB 1411.68 MB 7.51 MB 🟢 -0.5%

site-editor

Metric trunk e89d986 Diff Change
load 1100 ms 737 ms 363 ms 🟢 -33.0%

site-startup

Metric trunk e89d986 Diff Change
siteCreation 6517 ms 6487 ms 30 ms ⚪ 0.0%
siteStartup 2387 ms 2379 ms 8 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@wojtekn wojtekn requested a review from shaunandrews July 7, 2026 09:27
Comment thread apps/ui/src/data/core/types.ts Outdated
// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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.

They should work on Windows, too. I modified comments and made them more generic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good 👍

}

// Bridges the Electron application menu ("Add Site…", "Settings…" and their
// ⌘N / ⌘, shortcuts) to router navigation. Mounted at the root so the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same note about the comments being platform specific

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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>
@wojtekn wojtekn merged commit f562c40 into trunk Jul 9, 2026
15 checks passed
@wojtekn wojtekn deleted the fix-agentic-ui-add-site-settings-menu branch July 9, 2026 10:00
shaunandrews added a commit that referenced this pull request Jul 10, 2026
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.
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.

3 participants