Skip to content

Agentic UI: Keyboard Shortcuts and Settings#3738

Draft
shaunandrews wants to merge 2 commits into
interface-improvementsfrom
codex/move-keyboard-shortcuts
Draft

Agentic UI: Keyboard Shortcuts and Settings#3738
shaunandrews wants to merge 2 commits into
interface-improvementsfrom
codex/move-keyboard-shortcuts

Conversation

@shaunandrews

Copy link
Copy Markdown
Contributor

Related issues

  • None.

How AI was used in this PR

AI helped split the keyboard shortcut work out of the larger interface-improvements branch, keeping the branch focused and rerunning the relevant checks.

Proposed Changes

  • Adds classic UI keyboard shortcut handling and a settings surface for configuring how chat messages are sent.
  • Keeps shortcut-specific preferences, IPC wiring, menu actions, and shortcut labels in a focused stacked PR instead of the base interface work.

Testing Instructions

  • npm run typecheck
  • npm test -- apps/ui/src/lib/keyboard-shortcuts.test.ts apps/studio/src/tests/menu.test.ts apps/ui/src/components/settings-view/index.test.tsx apps/ui/src/components/site-preview/index.test.tsx apps/ui/src/ui-desks/widgets/site-shortcuts/component/index.test.tsx

Pre-merge Checklist

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

@shaunandrews shaunandrews changed the title Add classic keyboard shortcut controls Agentic UI: Keyboard Shortcuts and Settings Jun 9, 2026
@shaunandrews shaunandrews force-pushed the interface-improvements branch from a4e0429 to eff2e73 Compare June 9, 2026 13:18
@shaunandrews shaunandrews force-pushed the codex/move-keyboard-shortcuts branch 2 times, most recently from 767716a to c8483ce Compare June 9, 2026 13:46
@shaunandrews shaunandrews force-pushed the interface-improvements branch 2 times, most recently from bf73f44 to f221373 Compare June 9, 2026 14:04
@shaunandrews shaunandrews force-pushed the codex/move-keyboard-shortcuts branch from c8483ce to 38adfeb Compare June 9, 2026 14:04
@shaunandrews shaunandrews force-pushed the codex/move-keyboard-shortcuts branch from 38adfeb to c78b950 Compare June 9, 2026 14:47
@shaunandrews shaunandrews force-pushed the interface-improvements branch from f221373 to 48ec056 Compare June 9, 2026 14:47
@shaunandrews

Copy link
Copy Markdown
Contributor Author

Code review findings (via Claude Code) that apply to this branch:

1. Cmd+N does nothing on the Desks UI (the default mode)
CommandOrControl+N was removed from the "Add Site" menu item and reassigned to the new-chat-in-current-site shortcut, but the handler for that shortcut is only registered in ui-classic's session view. On ui-desks — currently the default mode — Cmd+N silently does nothing. Either register a desks handler or keep a menu accelerator as fallback.

2. Duplicate subscriptions to toggle-site-preview
Both apps/ui/src/hooks/use-session-ui.tsx (~L119) and apps/ui/src/ui-classic/router/layout-dashboard/index.tsx (~L98) subscribe to the same IPC event. The provider has a nesting guard, but the layout-dashboard subscription lives outside it — if both end up mounted and active, one menu click toggles twice (net no-op). Worth consolidating into a single owner.

3. isApplePlatform duplicates isMacPlatform
apps/ui/src/lib/keyboard-shortcuts.ts adds isApplePlatform() while apps/ui/src/lib/platform.ts already has isMacPlatform(), with slightly different regexes. These should be one function so platform detection can't drift. (The third copy in inspector-script.ts is fine — it's serialized into the guest page and can't import.)

4. window.confirm() for destructive preview-site deletion
settings-view/index.tsx uses native window.confirm() to confirm deleting a preview site. The app already has a styled Dialog pattern for destructive actions (e.g. DeleteSiteDialog in site-list); native confirm breaks the visual language and can behave inconsistently in Electron renderers.

5. Saved-defaults resolution duplicated in settings form logic
In settings-view/index.tsx, toFormData and diffFromSaved each independently resolve saved defaults (defaultSiteDirectory ?? '', messageSendShortcut ?? DEFAULT_MESSAGE_SEND_SHORTCUT, studioCliInstalled ?? false). Changing a default requires updating both in sync — worth extracting a single resolver.

Things checked that look good: i18n coverage in the new settings view is complete, ⌘/Ctrl shortcut display handles Windows/Linux correctly with test coverage, and the settings CSS consistently uses design tokens.

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