Skip to content

fix: preserve reverse search shortcut - #453

Merged
AmethystLiang merged 2 commits into
stablyai:mainfrom
colinchambachan:feat-reverse-search-shortcut
Apr 10, 2026
Merged

AmethystLiang merged 2 commits into
stablyai:mainfrom
colinchambachan:feat-reverse-search-shortcut

Conversation

@colinchambachan

@colinchambachan colinchambachan commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This fixes terminal reverse search being blocked by Orca's app-level reload shortcut handling.

Changes:

  • stop using optimizer.watchWindowShortcuts(window), which prevented KeyR with Ctrl or Cmd in packaged builds
  • replace the default Reload / Force Reload menu roles with explicit menu items so plain reload no longer reserves CmdOrCtrl+R
  • keep Force Reload on Shift+CmdOrCtrl+R
  • preserve dev-only F12 devtools behavior in the main window input handler
  • update Settings > Shortcuts to list Force Reload with platform-correct shortcut labels

User-visible behavior:

  • Ctrl+R now reaches the shell for reverse-i-search in terminal panes
  • Reload remains available in the View menu, but no longer has a keyboard shortcut
  • Force Reload is now the only reload shortcut: ⇧⌘R on macOS and Ctrl+Shift+R on Linux/Windows

Closes #443.

Terminal reverse search:
image

Force Reload shortcut update:
image

Testing

Ran:

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build

Added regression coverage for:

  • packaged main-window key handling no longer intercepting Ctrl/Cmd+R
  • preserved dev-only F12 behavior after removing the Electron toolkit shortcut hook
  • menu wiring for Reload and Force Reload

Manual notes:

  • verified packaged behavior on macOS via local packaged build
  • Windows/Linux not manually smoke-tested, but the shortcut behavior is now driven by cross-platform menu wiring and platform-aware shortcut labels

UI Notes

Minor visual change only:

  • Settings > Shortcuts now shows Force Reload

No layout or styling changes beyond that shortcut row.

AI Review Summary

Cross-platform compatibility review:

  • removed the cross-platform CmdOrCtrl+R conflict at the menu layer instead of relying on renderer-only behavior
  • preserved platform-aware shortcut labels in Settings (⌘ / ⇧ on macOS, Ctrl / Shift on other platforms)
  • kept the explicit Shift+CmdOrCtrl+R accelerator for Force Reload

Security audit summary:

  • no new IPC channels, preload surface, or privilege expansion
  • reload handling still operates through Electron webContents on the focused window only
  • change reduces unexpected app-level interception of terminal control input without widening renderer privileges

@colinchambachan
colinchambachan marked this pull request as ready for review April 10, 2026 22:31
@AmethystLiang
AmethystLiang self-requested a review April 10, 2026 23:29
@AmethystLiang
AmethystLiang merged commit 874ba49 into stablyai:main Apr 10, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix: preserve reverse search shortcut

* test: cover cmd+r reverse search regression
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.

No support for reverse-i-search shortcut (ctrl + r)

2 participants