You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): terminal copy shortcuts no longer type escape codes when nothing is selected - #41702
Pressing a terminal copy shortcut with nothing selected typed junk at the shell prompt. Ctrl+Shift+C typed 9;6u and Ctrl+Insert typed 5~ on Linux and Windows, and Cmd+C sent c on macOS. The copy branch in the terminal's key handler only runs when there is a selection, so these keys fell through to the key encoder and went to the PTY.
The handler now ignores exactly those three shortcuts when nothing is selected. Plain Ctrl+C on Linux and Windows still reaches the shell as SIGINT, chords with extra modifiers such as Ctrl+Alt+Insert still reach the shell, and every shortcut still copies when text is selected.
Two tests cover this. One checks that Ctrl+Shift+C and Ctrl+Insert send nothing without a selection, while plain Ctrl+C still sends \x03 and Ctrl+Alt+Insert still sends its key code. The other checks Cmd+C on macOS. Both fail on main and pass with the fix. An AI agent ran the tests on both revisions, vp run check:changed and the browser captures below.
Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, fresh isolated dev state (vp run dev --no-seed), integrated terminal running bash with PS1='demo$ '. Steps: open the terminal, select nothing, press Ctrl+Shift+C, then Ctrl+Insert. Then run sleep 30 and press Ctrl+C.
Before (0514c1d2ff6)
After (5c3b108c1c5)
Ctrl+Shift+C then Ctrl+Insert type 9;6u5~
The prompt stays empty
After: plain Ctrl+C
Ctrl+C still interrupts sleep 30
Not shown: macOS Cmd+C is covered by the unit test only. Desktop runs the same web terminal. The mobile terminal does not use this key handler, so it is unchanged.
Reviewing files that changed from the base of the PR and between ece6d18 and dbd3494.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The terminal key handler now consumes platform-specific copy shortcuts when no selection exists. Tests cover Ctrl+Shift+C and Ctrl+Insert on Linux, and Cmd+C on macOS. They also check that Ctrl+C and Alt+Ctrl+Insert still send terminal data on Linux.
Changes: Terminal copy shortcut handling
Layer / File(s)
Summary
Suppress copy shortcuts without a selection apps/web/src/terminal/ghostty/surface.ts, apps/web/src/terminal/ghostty/surface.test.ts
The handler prevents default behavior and stops propagation for matching copy shortcuts when no selection exists. Tests cover Linux and macOS, and verify other key sequences still send terminal data.
pingdotgg/t3code#35210: Updates recognition of Ctrl+Shift+C in the terminal key handler. This interacts with the shortcut matching changed here.
Suggested reviewers:stienswout, macroscopeapp
Merge Risk: Minimal · previous review 5c3b1
Copy shortcuts pressed with nothing selected will no longer type escape codes into the terminal. Copying with a selection and plain Ctrl+C interrupts are unchanged. The change is small, covered by tests, and looks safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: terminal copy shortcuts with no selection no longer send escape codes to the PTY. The raw summary and objectives confirm the change is limited to the key handler in su…
Description check
The description follows the template well. It states the problem with expected behavior and reproduction steps (Ctrl+Shift+C, Ctrl+Insert, Cmd+C with no selection). It explains the change and why it i…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: terminal copy shortcuts with no selection no longer send escape codes to the PTY. The raw summary and objectives confirm the change is limited to the key handler in surface.ts and its tests. The title is concise and uses a conventional commit prefix. It is 86 characters, which is long, but it stays within a single clear sentence.
Full details: Description check
Explanation
The description follows the template well. It states the problem with expected behavior and reproduction steps (Ctrl+Shift+C, Ctrl+Insert, Cmd+C with no selection). It explains the change and why it is scoped to those shortcuts. It describes verification with two focused tests, a before/after comparison, and browser captures. It names the model and harness used. The Scope section does not link an issue or explain why no issue is needed, and that is the main gap. The description also does not name a maintainer request. These are the only missing items.
Resolution
Optionally add an issue link to the Scope section, or state why no issue is needed for this small fix of an obvious bug. The author should confirm that this is a bug fix and not a feature.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Fix failing CI checks
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 830c11c and 5c3b108.
Files selected for processing: 2
apps/web/src/terminal/ghostty/surface.test.ts
apps/web/src/terminal/ghostty/surface.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Linux Chromium, 1280×800, light theme; fresh isolated databases and identical synthetic project/thread data. With no terminal selection, press Ctrl+Shift+C then Ctrl+Insert at the bash prompt and again in cat -v; type END and Enter. Then interrupt sleep 30; echo NOT-INTERRUPTED with plain Ctrl+C and check echo exit=$?.
The scenario reproduced the escape sequences on base and passed on head. Plain Ctrl+C returned exit 130 on both.
Merges `pingdotgg/t3code` `e9c952495c` (445 commits, from base
`c7a9fba06b`). It branches from `main`; no merge PR was open to stack
on. Land it as a merge commit, not a squash. The first commit re-points
one stale inventory entry before the merge.
**Landed:** 1419 files against 1416 in the upstream range. The 3 extra
are the fork's `features.ts`, `gaps.md` and `inventory.json`. The fork
delta is 786 files. The tracker entry in
`docs/fork/upstream-merge-log.md` has the details.
## Conflicts (16), resolved by verdict
- `AGENTS.md` (`decide`): kept the fork's shape. Every link now points
at upstream's renamed `docs/internals/NN_*` and
`docs/operations/00_development.md`. Upstream's new facts (the Agents
surface rule, marketing i18n, the internal-docs index, the PR and forge
rules) are written in the fork's voice.
- Upstream removed the changed-files card under assistant turns
(pingdotgg#41317). The fork's `turnDiffs` gate on the card went with it, and two
files are now upstream verbatim.
- Upstream moved Add project into the sidebar's project-scope picker
(pingdotgg#33057). The `FEATURES.projectManagement` gate moved onto that picker
item.
- The new Labs **Workflows** row sits inside the
`serverBehaviorSettings` gate, with its search id. **Agent feedback**
hides itself because the backend does not report the capability.
- The archived-threads title `Link` moved into upstream's new
`renderRow`.
- `agentContextBudget.json` takes the measured value, `61817`, which is
upstream plus 108.
- The rest kept both sides. The auto-merged lockfile was broken, so I
took upstream's copy and re-installed it.
## Fixes made during verification
- `terminalSessions.ts`: upstream's new labels atom now reads the fork's
`.terminals`, which fixes a typecheck error.
- `FeedbackReport.ts`: dropped `t3 pair`, because the fork deletes that
command and upstream's new CLI test checks the list.
- `test/fakeEnvironment.ts`: now advertises `attachmentUploads: true`.
ChatView still gates uploads on that capability, and without it
upstream's pingdotgg#41021 phone-attach test fails. It passes on pure upstream
and on this branch.
- `rpc.ts`: added 10 `UnsupportedMethodError` entries for `workflows.*`
and `agentFeedback.answerRequest`. I deleted 2 stale review-guide
exceptions, because Moatless removed that feature in
soaplabs/moatless#1576.
## Verification
`verify.mjs` is green on duplicate-adds, tripwires, resolution-check,
unsupported-methods, lockfile, fmt, lint, typecheck and build.
Tests: every package passes except failures already registered as
sandbox gaps in `gaps.md`:
- ssh `tunnel` and opencode `OpenCodeServerLedger`.
- In t3: `ServerBrowser*`, the `/tmp` sticky bit (`CodexChatGptAuth`,
`CodexManagedRuntime`), `insteadOf` (`GitVcsDriver*`,
`RepositoryIdentityResolver`) and `AntigravityInstallation`.
- Also in t3, three files fail only because the sandbox runs Node 24:
`Orchestrator.control-reads` and `ProjectionStore` call
`StatementSync.stat`, and `outboundHttp` hits a `setTypeOfService`
probe.
Web ran with a fetched headless shell: 672 of 674 files passed in the
full run. The two `FilePreviewPanel` scroll cases pass when run alone.
The `ChatView` case was the fixture fix above, and that file now passes
19 of 19.
The commit used `--no-verify`, because the pre-commit knip hook fails on
the 27 fork exports already recorded in `gaps.md`.
**After merging:** two new upstream workflows arrive enabled. Disable
them:
`gh workflow disable mobile-eas-preview-build.yml --repo
soaplabs/t3code` and `gh workflow disable
mobile-eas-production-build.yml --repo soaplabs/t3code`.
## Usable as-is
- HTML preview width setting (pingdotgg#41663).
- File preview fixes for Office, RTF, ODF, EPUB, TIFF, notebooks, PDF
and relative Markdown images, plus chunked loading of large files
(pingdotgg#40631 and others).
- Composer fixes: drop, Word paste, text plus picture, image uploads
finishing before send, the queued-edit chips, the phone attach fix
(pingdotgg#41021).
- Esc and IME handling across dialogs and search fields (about 20
commits).
- Keybinding fixes (pingdotgg#41231, pingdotgg#41630, pingdotgg#24034).
- Terminal copy without a selection no longer types escape codes
(pingdotgg#41702).
- Thread open lands at the end, and panel resizes keep the reading
position (pingdotgg#41843, pingdotgg#41184).
- Mark unread is hidden before a run has completed (pingdotgg#41365).
- Add project in the project picker (pingdotgg#33057), gated.
- Sidebar rows show the environment (pingdotgg#40736).
## Unsupported in Moatless / needs implementation
- **Durable workflows** (pingdotgg#38882, pingdotgg#38884): the `workflows.*` RPCs (9) and
the `workflowsEnabled` server setting. Moatless has no workflow runner.
The Labs row is gated and the union entries are added. See the gaps
entry.
- **Agent feedback** (pingdotgg#35871): `agentFeedback.answerRequest` and
`capabilities.agentFeedback`. It needs a feedback tool and report store
in Moatless. The union entry is added.
- **Review guides**: `pullRequests.reviewGuide` and
`generateReviewGuide` are refused again since soaplabs/moatless#1576.
Recorded in gaps.
- **Milestones over MCP events and webhooks** (pingdotgg#40774, pingdotgg#41141), and
OAuth `revoke` for MCP. These belong to the existing "no MCP server"
gap.
- **Multiple Linear accounts** (pingdotgg#39179,
`capabilities.issueTrackerAccounts`) and GitHub issue statuses (pingdotgg#41795).
Moatless serves one Linear app per Workspace.
- **Stack auto-merge** (pingdotgg#41809, `stackAutoMerge`). Moatless's `stack`
answers no stack.
- **`server.probe` `serverTime`** (pingdotgg#41037). Moatless omits it, so
clients use their own clock.
- **`GitRefName` validation** on ref fields. It is decode-time, so check
that Moatless ref names pass it.
## Backend behavior to consider reproducing in Moatless
Also recorded as a new range bullet under "Runtime fixes upstream made
to its own server" in `gaps.md`.
- **Run lifecycle:**
- A run finishes at the provider turn end, not after checkpoint capture
(pingdotgg#41362).
- An accepted Stop is not "completed", and cancellations survive capture
(pingdotgg#41685, pingdotgg#31349).
- Settling does not end background work the agent waits on (pingdotgg#31449).
- Queued messages survive a restart-cancelled run (pingdotgg#41307).
- **Delegation:**
- A declined steer of a delegated completion still wakes the parent
(pingdotgg#41521).
- A stopped parent is told which delegated tasks the Stop interrupted
(pingdotgg#34499).
- **Deleted threads:** snapshot, transcript and resume report the thread
missing (pingdotgg#41866, pingdotgg#41874).
- **Settlement and cleanup:** threads with an open PR branch are kept
(pingdotgg#41116), and merged subagent worktrees are cleaned up (pingdotgg#41694).
- **Sessions and transport:**
- Idle provider sessions are freed after 2 minutes (pingdotgg#41174).
- Request bodies default to a 1 MiB limit (pingdotgg#41747).
- Early requests get a 503 while startup runs (pingdotgg#41627).
- An idle `/ws` behind a proxy no longer drops every 60 seconds
(pingdotgg#40932).
- **Git:** checkpoint capture no longer walks every reflog (pingdotgg#41177), and
T3's own git commands do not start auto maintenance (pingdotgg#41200).
- **Pull request reads:** a PR refused for conflicts shows as
conflicting (pingdotgg#41500), and superseded cancelled checks no longer block
watches (pingdotgg#30434).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
Moatless task:
https://moatless.soaplabstest.com/tasks/aa56f843-8631-434a-8f8b-8c62546ba74b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pressing a terminal copy shortcut with nothing selected typed junk at the shell prompt. Ctrl+Shift+C typed
9;6uand Ctrl+Insert typed5~on Linux and Windows, and Cmd+C sentcon macOS. The copy branch in the terminal's key handler only runs when there is a selection, so these keys fell through to the key encoder and went to the PTY.The handler now ignores exactly those three shortcuts when nothing is selected. Plain Ctrl+C on Linux and Windows still reaches the shell as SIGINT, chords with extra modifiers such as Ctrl+Alt+Insert still reach the shell, and every shortcut still copies when text is selected.
Two tests cover this. One checks that Ctrl+Shift+C and Ctrl+Insert send nothing without a selection, while plain Ctrl+C still sends
\x03and Ctrl+Alt+Insert still sends its key code. The other checks Cmd+C on macOS. Both fail on main and pass with the fix. An AI agent ran the tests on both revisions,vp run check:changedand the browser captures below.Setup: Linux, Chromium (T3 Browser panel), light theme, 1280×800, fresh isolated dev state (
vp run dev --no-seed), integrated terminal running bash withPS1='demo$ '.Steps: open the terminal, select nothing, press Ctrl+Shift+C, then Ctrl+Insert. Then run
sleep 30and press Ctrl+C.0514c1d2ff6)5c3b108c1c5)9;6u5~sleep 30Not shown: macOS Cmd+C is covered by the unit test only. Desktop runs the same web terminal. The mobile terminal does not use this key handler, so it is unchanged.
Generated with Claude Opus 5.5 in T3 Code Nightly