fix(agent-manager): align Cmd+/ fallback with platform binding and one-shot echo - #12694
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Suggestion only — safe to merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files changed since last review)
Resolved since the previous review: the stale-backlog case is fixed — One residual is inherent rather than a defect: two presses less than Fix these issues in Kilo Cloud Previous Review Summary (commit 899d32b)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 899d32b)Status: 2 Issues Found | Recommendation: Suggestions only — safe to merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
The platform gating matches the declared keybinding in Reviewed by claude-opus-5 · Input: 20 · Output: 5.1K · Cached: 433.6K Review guidance: REVIEW.md from base branch |
…e-shot echo (Kilo-Org#12694) * fix(agent-manager): align Cmd+/ fallback with platform binding and one-shot echo * fix(agent-manager): expire dropped terminal-shortcut echoes at press time
Follow-up to #12691 addressing two review findings on the webview-side Cmd/Ctrl+/ fallback in the Agent Manager.
Platform modifier gating. The declared workbench keybinding is
ctrl+/withmac: cmd+/, but the local fallback acceptede.metaKey || e.ctrlKeyon every platform. On macOS that made Ctrl+/ toggle the terminal even though no binding exists for it, and on Windows/Linux the same was true for Meta+/. Worse, for a user with their own keybinding on the non-platform combo, VS Code's forwarding would run their command while the webview simultaneously toggled the terminal. The fallback now accepts only the modifier the workbench binding declares for the current platform (detected via the samenavigator.userAgentcheck the Agent Manager already uses, injectable for tests).One-shot echo dedup. The echo guard was a pure 500 ms timestamp window, so any
showTerminalaction arriving within the window after a local press was dropped, not just the echo of that press — this could swallow an unrelated invocation such as the command palette entry or a quick follow-up press routed throughterminal.integrated.commandsToSkipShell. The guard is now a per-press counter: each local press queues exactly one echo, each consumed echo suppresses exactly one action, and unrelated invocations run normally. The timeout remains, but only as a safety valve that drops a never-arriving echo (e.g. when the user has rebound the key); an echo that outlasts it is indistinguishable from a real invocation and must run — no local design can close that gap, so the window alone could not either.