Repository navigation
feat(terminal): add an opt-in ctrl+c / ctrl+v copy and paste setting - #33979
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The setting is opt-in and off by default, and it answers a linked report (#33285). Every surface it adds has a real consumer: What this change shipsInventory (9 items) — 9 justifiedIntent: a Windows or Linux user can copy with Ctrl+C and paste with Ctrl+V in the dashboard terminal without breaking Ctrl+C as an interrupt. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] acb7bcc Description read[DESCRIPTION-READ] 9883d52dba38089f3993296593247a315c128a3b36857e428ac99775c2282944 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the setting is opt-in and off by default, it is stored per browser, it takes nothing away, and screenshots of this revision are attached. Notes
[DESIGN-REVIEWED] acb7bcc Description read[DESCRIPTION-READ] c3e5335a8f56967104097b0c01244c93cacecc595f038f4f4aea3247169d85ef That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader saw the new toggle in every state: off, on, the hover hint, light theme, the macOS hide and search. They read it correctly and said they would use it. Notes
[UX-REVIEWED] acb7bcc Description read[DESCRIPTION-READ] 9cf67d5c56745b957457fce4b7cdbc525a1a071bffe38580e1dda96f227bf96e That sha256 names everything this verdict read: the PR description, plus the 10 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- website/src/components/TerminalCompletion.tsx:551 -- Apply shortcut changes to already-open terminal popouts
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — LOW. The failure needs a terminal popout opened before the setting is turned on. The store reads False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approved at ebdff0e. Adds an opt-in Ctrl+C / Ctrl+V copy-paste toggle in Settings > Display > Terminal, hidden on macOS (website/src/pages/settings/DisplayPanel.tsx:999-1008). It is off by default and only a stored literal true turns it on (website/src/hooks/useTerminalFont.ts:87, :100). Ctrl+C with no selection, or with the setting off, still reaches the shell as the interrupt (website/src/components/TerminalCompletion.tsx:551-558). GPT, Opus, Design and UX pass on this head. The reds are the main-wide lazy-import count (#34010) and an Analyze (javascript-typescript) run that ended with "CodeQL job status was configuration error", not a finding.
ebdff0e to
7c66d94
Compare
|
Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, docs/feature-map/README.md and the locale catalogs since this head went green (2b5cfe3 -> 3467dd6); CI re-running. The generated find_ui index conflicted with main, so it was rebuilt with [operator: bolichen97] |
7c66d94 to
42a5e0c
Compare
|
Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/components/commandPalette/settingsSearchGovernance.test.ts, docs/feature-map/README.md and the locale catalogs since this head went green (3467dd6 -> 8ae0a1d); CI re-running. GitHub reported the branch as conflicting: the generated find_ui index conflicted with main, so it was rebuilt with [operator: bolichen97] |
[operator: bolichen97] |
833b247 to
2e83244
Compare
|
Rebased: main moved in docs/feature-map/README.md, src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts and the locale catalogs since this head went green (4de745e -> 27e9359); CI re-running. The generated find_ui index conflicted with main, so it was rebuilt with [operator: bolichen97] |
2e83244 to
d9bf929
Compare
|
Rebased: main moved in src/kiro_crew/docs/ui-index.generated.json, src/kiro_crew/docs/settings-registry.generated.json, website/src/components/commandPalette/settingsRegistry.gen.ts, website/src/components/commandPalette/settingsSearchCore.ts and the locale catalogs since this head went green (27e9359 -> 6149be8); CI re-running. GitHub reported the branch as conflicting, only in the generated find_ui index: main's copy was taken and This head was re-checked on Linux (Ubuntu 24.04) against the real dashboard with an isolated gateway. The setting off leaves Ctrl+C and Ctrl+V as before. With it on, Ctrl+C copies and clears a selection, Ctrl+C with nothing selected still interrupts, and Ctrl+V pastes with no [operator: bolichen97] |
|
Re-sync budget reset: this PR conflicts with main again ( [operator: bolichen97] |
|
Rebased: main moved in The old head conflicted with main in The new head also carries one addition: the agent's [operator: bolichen97] |
|
[operator: bolichen97] Re-sync note for head d9bf929. It answers no review finding, so it is a plain note, not a review disposition. Dropped the non-required
|
On Windows and Linux the dashboard terminal sends Ctrl+C to the shell as an interrupt and Ctrl+V as a raw ^V, so copying and pasting needs Ctrl+Shift+C / Ctrl+Shift+V or the selection toolbar. The stray ^V also breaks the next paste in zsh: quoted-insert takes the paste's opening bracketed-paste ESC literally, so the command arrives as ^[[200~... and fails. Settings > Display > Terminal gains "Ctrl+C and Ctrl+V copy and paste", off by default, stored per browser beside Copy on select. It is not offered on macOS: the panel does not draw it, the settings search does not list it, and the find_ui index says it needs Windows or Linux. With it on, Ctrl+C copies and clears a selection and still interrupts when nothing is selected, and Ctrl+V is left to the browser's own paste instead of reaching the shell. The key is matched on the letter typed, falling back to the physical key only on a non-Latin layout, through one helper the find chord now shares. Closes #33285
|
Rebased: main moved in What this fixes on the old head:
The change itself is the same patch. Main's OSC 52 terminal copy (#30742) landed in between: the two keys this setting claims never reach the program, so they neither open nor close its copy window, as Ctrl+Shift+C and Ctrl+Shift+V already do not. The screenshots in the description are re-captured in main's grouped Settings layout. [operator: bolichen97] |
[operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Reviewed head acb7bcc. Checked the new terminal key branch: it acts only on keydown, with Ctrl alone and the setting a literal true. Ctrl+C with a selection copies through the existing native copy route and then clears the selection, Ctrl+C with no selection still interrupts, and Ctrl+V is kept from the shell without cancelling the browser paste. The macOS gating is consistent across the settings panel, both settings searches and the find_ui condition. The settings store defaults the new field off and resets it. The four changed frontend test files and the find_ui tests pass locally on this head, and the new tests fail when the feature code is disabled. The open point about an already open popout not seeing the toggle until reload is the store's existing behaviour on main for every terminal setting and fails safe, so nothing blocks.
Problem / Motivation
Goal: On Windows and Linux, a user can turn on a terminal setting so Ctrl+C copies selected text and Ctrl+V pastes, while Ctrl+C with nothing selected still stops the running command.
In the dashboard terminal on Windows and Linux, Ctrl+C always interrupts and Ctrl+V reaches the shell as a raw
^V, so copy and paste need Ctrl+Shift+C / Ctrl+Shift+V or the selection toolbar. A reporter also saw a pasted command arrive in zsh as^[[200~cp ...and fail withbad pattern. That is the stray^V: zsh reads it as quoted-insert, so it takes the next paste's opening bracketed-paste ESC as a literal character. On zsh 5.9,^Vfollowed by a bracketed paste ofcp a band Enter printszsh: bad pattern: ^[[200~cp.Why it matters
People who come from Windows Terminal or the VS Code terminal press Ctrl+C and Ctrl+V by habit. Today the copy does nothing or kills the running command, and a Ctrl+V before a paste breaks the pasted command, which then fails or has to be retyped. That is risky for the setup commands the agent hands out, many of which edit config files.
Not a goal
What changed (motivation → approach → change)
Windows and Linux users expect Ctrl+C to copy a selection and Ctrl+V to paste, as Windows Terminal and the VS Code terminal do, but this terminal hands both keys to the shell. Settings → Display → Terminal gains Ctrl+C and Ctrl+V copy and paste. It is off by default and saved per browser next to Copy on select in the
mc-terminal-fontstore; only a stored literaltrueturns it on. macOS does not get it: the panel does not draw it, the Settings search and Search Everywhere do not list it, and the agent'sfind_uianswer says it needs Windows or Linux, so neither a search result nor afind_uianswer leads to a page without the switch.With it on, the terminal's own key handler answers two keys:
copyroute Ctrl+Shift+C uses, then clears the selection so the next Ctrl+C interrupts^V; the browser's own paste reaches xterm's paste listenerSo with the setting on, Ctrl+V no longer reaches any program in the terminal: vim's block select, nano's page down and emacs's scroll need it off.
A key matches on the letter it types, and on the physical key only for a non-Latin layout, so on Dvorak the key at QWERTY's C keeps its own Ctrl+J. The find chord already followed that rule; it is now one helper,
isChordLetterinterminalFullscreen.ts, that both use. The toggle sits inDisplayPanel.tsx, the macOS check both searches share insettingsSearchCore.ts, the stored field inuseTerminalFont.ts, the key branch inTerminalCompletion.tsx, and thenot_macosconditionfind_uireports inwebsite/src/uiLocations/(conditions.ts,descriptors.ts); the regeneratedsettings-registry.generated.json,settingsRegistry.gen.tsandui-index.generated.jsonand every catalog inwebsite/src/i18n/locales/carry the new toggle.Backwards compatibility
Compatible: the setting defaults off and a stored preference without the new field loads as off, so every terminal behaves as before until the user turns it on.
Removes nothing: the change adds one setting and the key branch behind it.
Tests
website/src/test/TerminalCompletion.test.tsx: with the setting on, Ctrl+C with a selection copies, clears it and is consumed, and the next Ctrl+C passes through; Ctrl+C with no selection passes through; Ctrl+V is kept from xterm without cancelling the event; a remapped Latin layout matches the typed letter and a Cyrillic layout the physical key. With it off, both keys reach xterm unchanged. Three of these fail on the baseTerminalCompletion.tsx.website/src/test/useTerminalFont.test.ts: the field persists, a fresh load reads only a literaltrueas on, and reset clears it.website/src/components/commandPalette/settingsSearchGovernance.test.ts: the search withholds the setting when the platform is macOS and offers it otherwise; it fails with the macOS line removed fromsettingEntryOffered.test/test_find_ui.py:find_uianswers the setting with thenot_macoscondition; it fails on the index generated without it.Manual verification
d80be9d7b6(the later rebase onto current main changed neither the terminal's key handler nor the Display settings page), served by an isolated gateway (a temporaryKIROCREW_HOME, a free loopback port, no crons), the terminal at/popout/terminalon a real bash pty, and Playwright 1.58.2 pressing the keys in headless Chromium with clipboard access. Every byte the dashboard sent to the pty was recorded at the terminal WebSocket.\x03and left the clipboard alone; Ctrl+V sent\x16.SELWORDput it on the clipboard and sent nothing to the shell; the next Ctrl+C sent\x03; Ctrl+V sentESC[200~CLIPTXT ESC[201~(bash had turned bracketed paste on) and no\x16.navigator.platformreported asMacIntel, the row is not drawn and the Settings search forCtrl+V copyanswers "No matching settings"; on Linux the same search lists the toggle.find_uiforCtrl+C and Ctrl+V copy and paste, through the guide tool's ownmcp_guide._find_with_livewith the isolated gateway, returns the row with its route unchanged and thenot_macoscondition, "the dashboard is open on Windows or Linux, not on a Mac (where Cmd+C and Cmd+V already copy and paste)"; plainui_index.find_uifor the iddisplay.copy-on-selectstill returns Copy on select with no condition.cp a brunscp, while^Vfollowed by the same paste printszsh: bad pattern: ^[[200~cp.--sequence.shuffle --sequence.seed=33285) green, 151 tests;test/test_find_ui.pyran 5 times in a row green, then once with its 180 tests in reversed order green.Screenshots / video
Settings → Display → Terminal and the Settings search, captured with scripted Playwright (headless Chromium, 1440×900) from that same build served by an isolated gateway.
Off, the default (dark):
On (dark), and its hint on hover:
On (light):
macOS (
navigator.platformset toMacIntel): the row is not drawn.Settings search for
Ctrl+V copy: listed on Linux, not listed on macOS.Related Issues
Closes #33285
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)