Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(terminal): find bar follows the terminal.find binding

enesfb194ac11dfd
diff --git a/src/renderer/components/ShortcutsPanel.tsx b/src/renderer/components/ShortcutsPanel.tsx
index 3400a6e54..77b838e81 100644
--- a/src/renderer/components/ShortcutsPanel.tsx
+++ b/src/renderer/components/ShortcutsPanel.tsx
@@ -21,11 +21,11 @@ interface Row {
/** Registry rows derive their keys from the effective binding, so a remap in settings.json
* shows up here without touching this file — and a command the user unbound (or that ships
* unassigned) drops off the panel instead of advertising a chord that no longer fires.
- * That promise only holds while every row's KEYBOARD path also reads the registry, which is
- * what makes the panel and the key agree. One row does not yet: `terminal.find` still matches
- * a hardcoded Cmd/Ctrl+F in TerminalNode — it becomes registry-backed in the next change.
- * Gesture/mouse rows stay literal: they are not commands and the registry knows nothing
- * about them. "Dictate" also stays literal — its chord still lives in
+ * That promise holds because every row's KEYBOARD path also reads the registry, which is
+ * what makes the panel and the key agree — `terminal.find` included, whose match in
+ * TerminalNode now reads `effectiveBindings('terminal.find')` instead of a hardcoded
+ * Cmd/Ctrl+F. Gesture/mouse rows stay literal: they are not commands and the registry knows
+ * nothing about them. "Dictate" also stays literal — its chord still lives in
* `settings.speech.shortcut` (the registry's `speech.dictation` row is display-only for now),
* and a modifier-only chord is hold-to-talk, which the label spells out. */
function buildSections(dictationKeys: string[], dictationLabel: string): { title: string; rows: Row[] }[] {
diff --git a/src/renderer/nodes/TerminalNode.tsx b/src/renderer/nodes/TerminalNode.tsx
index 24189a3b8..56e68f3b4 100644
--- a/src/renderer/nodes/TerminalNode.tsx
+++ b/src/renderer/nodes/TerminalNode.tsx
@@ -166,12 +166,17 @@ import { agentEnvSnapshot } from '@renderer/lib/agentEnv'
import { normalizedAgentModel } from '@shared/agents/model-gateway'
import { ensureActivePermissionMode } from '../state/permissionMode'
import { buildSshArgs, sshConnectionIdForProject, sshHostKey, type SshConnection } from '@shared/ssh'
-import { chipFor } from '../lib/keybindingOverrides'
+import { chipFor, effectiveBindings } from '../lib/keybindingOverrides'
+import { matchesShortcut } from '@shared/shortcut'
+import { isMacPlatform } from '@shared/platform-utils'
import { ColumnPill } from '../components/kanban/ColumnPill'
import { BoardLogPanel } from '../components/kanban/BoardLogPanel'
import { AgentMascot } from './AgentMascot'
import { connectHostAttachment } from '../lib/sshAttachments'
+/** Which physical modifier the registry's abstract `Cmd` resolves to for the find-bar chord. */
+const isMac = isMacPlatform()
+
/** How long a remote terminal waits for its project's ControlMaster before giving up and showing
* the offline overlay. Sized for the SLOW-but-fine case (a cold app load whose connect is still
* authenticating, a passphrase prompt, a distant host), not for the unreachable one — the
@@ -4117,7 +4122,7 @@ export function TerminalNode({
// needed (the Electron renderer has no native find UI), unlike Cmd+M.
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
- if ((e.metaKey || e.ctrlKey) && !e.altKey && e.key.toLowerCase() === 'f' && hoveredRef.current) {
+ if (hoveredRef.current && effectiveBindings('terminal.find').some((s) => matchesShortcut(e, s, isMac))) {
e.preventDefault()
setSearchOpen((v) => !v)
}