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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(display): shortcut surfaces follow remaps everywhere
enesfe107713e1ad
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex 8dc946316..d27b40495 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -9089,7 +9089,7 @@ export function Canvas() {cmds.push({id: 'toggle-kanban',label: kb ? 'Canvas view' : 'Kanban view',- hint: '⌘⇧B',+ hint: chipFor('view.kanbanToggle') || undefined,section: 'View',icon: kb ? <IconCanvasView /> : <IconKanban />,run: () => useViewMode.getState().toggle(kanbanId)diff --git a/src/renderer/components/ShortcutsPanel.tsx b/src/renderer/components/ShortcutsPanel.tsxindex 859bab8a3..346819db4 100644--- a/src/renderer/components/ShortcutsPanel.tsx+++ b/src/renderer/components/ShortcutsPanel.tsx@@ -53,7 +53,9 @@ function buildSections(dictationChord: string): { title: string; rows: Row[] }[]...cmd('app.settings', 'Settings'),...cmd('app.shortcutsPanel', 'This shortcuts panel'),...cmd('panel.explorer', 'Explorer'),- ...cmd('panel.sourceControl', 'Source Control'),+ // `panel.sourceControl` used to be listed here AND in the Source Control section below —+ // one command, two rows, both showing the same chord. The section row ("Open Source+ // Control") is the one that belongs, so the General duplicate is gone....cmd('view.kanbanToggle', 'Kanban board'),...cmd('panel.sessions', 'Pin the sessions sidebar'),// Desktop only: browsers own Cmd/Ctrl+1-9 for tab switching and a page cannot take it@@ -110,6 +112,12 @@ function buildSections(dictationChord: string): { title: string; rows: Row[] }[]export function ShortcutsPanel({ onClose }: ShortcutsPanelProps) {// A string selector, so an unrelated settings write cannot re-render the panel.const dictationChord = useSettings(() => dictationBinding())+ // Every OTHER row reads the registry through a plain `commandKeys()` call, which is not a+ // subscription — so a panel left open while a chord is remapped (Settings in another window,+ // or an outside edit to settings.json the store watcher picks up) kept showing the old key+ // unless the remap happened to be dictation's. Subscribing to the overrides object itself is+ // what makes the whole panel re-render; the value is unused on purpose.+ useSettings((s) => s.settings.keybindings)const SECTIONS = buildSections(dictationChord)useEffect(() => {diff --git a/src/renderer/components/TabBar.tsx b/src/renderer/components/TabBar.tsxindex 8205e41e9..9b182e32f 100644--- a/src/renderer/components/TabBar.tsx+++ b/src/renderer/components/TabBar.tsx@@ -11,6 +11,7 @@ import { useSystemAccount } from '../state/systemAccount'import { sessionCount, sessionForProject, useProjectSession } from '../session/session'import { tabClickAction } from '../session/relay-tab'import { useMenuFlip } from '../ui/useMenuFlip'+import { commandTooltip } from '../lib/keybindingOverrides'import { IconCanvasView, IconKanban } from './icons'import {ALL_PERMISSION_MODES,@@ -335,9 +336,16 @@ export function TabBar({)}{active && editingId !== p.id && (+ // The title was a hardcoded `(⌘⇧B)` — mac glyphs shown to Linux/Windows users+ // (a pre-existing bug: it was never even hintLabel-wrapped), and stale after a+ // remap. `commandTooltip` fixes both and drops the chord entirely when the+ // command is unbound.<buttonclassName="tab__board-toggle"- title={kanbanActive ? 'Canvas view (⌘⇧B)' : 'Kanban view (⌘⇧B)'}+ title={commandTooltip(+ kanbanActive ? 'Canvas view' : 'Kanban view',+ 'view.kanbanToggle'+ )}onClick={(e) => {e.stopPropagation() // a tab click switches projects, this only flips the viewuseViewMode.getState().toggle(p.id)diff --git a/src/renderer/components/onboarding/OnboardingFlow.tsx b/src/renderer/components/onboarding/OnboardingFlow.tsxindex 831b80461..2934b2a46 100644--- a/src/renderer/components/onboarding/OnboardingFlow.tsx+++ b/src/renderer/components/onboarding/OnboardingFlow.tsx@@ -2,10 +2,15 @@ import { useCallback, useEffect, useState } from 'react'import { createPortal } from 'react-dom'import { DEFAULT_SETTINGS, type SpeechModelInfo } from '@shared/types'import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type BuiltinAgentId } from '@shared/agents/config'-import { isHoldChord, shortcutKeyParts } from '@shared/shortcut'+import { isHoldChord, matchesShortcut, shortcutKeyParts } from '@shared/shortcut'import { hasSpeechModel, SPEECH_MODEL_NONE } from '@shared/speech'import { keyLabel } from '@shared/platform-utils'-import { dictationBinding } from '../../lib/keybindingOverrides'+import {+ chipFor,+ commandKeys,+ dictationBinding,+ effectiveBindings+} from '../../lib/keybindingOverrides'import { IOS_APP_STORE_URL } from '../../lib/links'import { useSettings } from '../../state/settings'import { useEntitlement } from '../../state/entitlement'@@ -114,14 +119,20 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {}}- // ---- kanban try-it: catch a real ⌘⇧B while the step is up (capture phase, so the- // canvas's own toggle handler never fires under the tour) ----+ // ---- kanban try-it: catch the REAL kanban-toggle chord while the step is up (capture phase,+ // so the canvas's own toggle handler never fires under the tour). Matched through the registry+ // rather than by hand, so a remapped chord is what the tour accepts — and so the acceptance is+ // exactly as strict as dispatch. The old test was LAX in two directions: `metaKey || ctrlKey`+ // accepted Ctrl+Shift+B on a mac (where the command is ⌘⇧B) and Cmd+Shift+B on Linux, and it+ // ignored `altKey` entirely, so ⌘⌥⇧B — a different chord — also lit the checkmark. Narrowing+ // it means the tour can only be satisfied by the key that actually toggles the board. ----const [kanbanTried, setKanbanTried] = useState(false)const [kanbanPulse, setKanbanPulse] = useState(0)useEffect(() => {if (STEPS[step] !== 'kanban') returnconst onKey = (e: KeyboardEvent) => {- if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.key.toLowerCase() === 'b') {+ // Read at event time, not at effect setup: a remap mid-tour takes effect immediately.+ if (effectiveBindings('view.kanbanToggle').some((s) => matchesShortcut(e, s, isMac))) {e.preventDefault()e.stopPropagation()setKanbanTried(true)@@ -168,6 +179,11 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {const dictationChord = useSettings(() => dictationBinding()) || DEFAULT_SETTINGS.speech.shortcutconst dictKeys = shortcutKeyParts(dictationChord, isMac)const dictHold = isHoldChord(dictationChord)+ // Both read through the SAME `settings` subscription above (`useSettings((s) => s.settings)`+ // re-renders this component on every settings write, a remap included), so these plain calls+ // are live. `''` / `[]` mean the command is unbound — each site below says what it does then.+ const newAgentChip = chipFor('node.newAgent')+ const kanbanKeys = commandKeys('view.kanbanToggle')const stepId: StepId = STEPS[step] ?? 'cover'const next = () => setStep((s) => Math.min(s + 1, STEP_COUNT - 1))@@ -242,7 +258,11 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {its own persistent tmux session.</p><div className="onb-label">- Default agent (what {isMac ? '⌘⇧C' : 'Ctrl+Shift+C'} opens)+ {/* Follows a remap of `node.newAgent`. When the user unbound it there is no+ key to name, so the label drops the parenthetical instead of promising a+ chord that no longer fires — the setting itself still matters (the pane+ menu, the dock and ⌘K all open the default agent). */}+ {newAgentChip ? `Default agent (what ${newAgentChip} opens)` : 'Default agent'}</div><div className="onb-agent-grid">{BUILTIN_AGENT_IDS.map((id) => (@@ -329,22 +349,30 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {Every project is a canvas — and also a kanban board. Cards are your livesessions: drag them across columns, open them, comment on them.</p>- <div className={`onb-tryit ${kanbanTried ? 'is-done' : ''}`}>- {kanbanTried ? (- <>- <OnbCheck /> That's the toggle — it works in any project.- </>- ) : (- <>- Try it now — press{' '}- {['⌘', '⇧', 'B'].map((k, i) => (- <kbd key={i} className="kbd">- {keyLabel(k, isMac)}- </kbd>- ))}- </>- )}- </div>+ {/* No chord to press when the user unbound the toggle, so the try-it PROMPT is+ dropped — the scene, the copy and the default-view choice all stay. (Kept+ while `kanbanTried` so an unbind mid-tour doesn't retract a checkmark the+ user already earned; nothing can set it once unbound.) The chips are+ `commandKeys`, which already renders platform-correct parts — no keyLabel+ rewrite on top. */}+ {(kanbanKeys.length > 0 || kanbanTried) && (+ <div className={`onb-tryit ${kanbanTried ? 'is-done' : ''}`}>+ {kanbanTried ? (+ <>+ <OnbCheck /> That's the toggle — it works in any project.+ </>+ ) : (+ <>+ Try it now — press{' '}+ {kanbanKeys.map((k, i) => (+ <kbd key={i} className="kbd">+ {k}+ </kbd>+ ))}+ </>+ )}+ </div>+ )}<div className="onb-defaultview"><span className="onb-defaultview__label">Open new projects as</span><div className="onb-seg" role="group" aria-label="Default view">