fix(web): make terminal selection actions reliable - #1
Closed
Adamulek123 wants to merge 10 commits into
Closed
Adamulek123 wants to merge 10 commits into
Adamulek123 wants to merge 10 commits into
Conversation
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
…ngdotgg#6495) Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: t3-code[bot] <236186684+t3-code[bot]@users.noreply.github.com> Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Owner
Author
|
Closing this duplicate fork-local PR. The intended contribution is upstream at pingdotgg#6555. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Changed
Terminal text could be selected but then become effectively stuck: Copy was disabled in the desktop fallback menu,
Ctrl+Shift+CandCtrl+Shift+Vdid nothing while the initial selection popup was open, Paste did not work, and Add to chat disappeared after dismissing the first popup. Scrolling the terminal could leave the popup inconsistent with its selection.This makes the initial selection popup and the reopened right-click menu use the same terminal-aware actions. Both expose Add to chat, Copy, and Paste; show the platform shortcut (
Ctrl+Shift+C/Von Windows and Linux,⌘C/Von macOS); execute those shortcuts while open; dismiss on outside clicks or terminal scrolling; and can be reopened without losing the selection.Why
Electron's generic edit menu reads Chromium edit flags, but the terminal renders and owns selection through its canvas-backed Ghostty surface. Those edit flags therefore disabled valid terminal actions and could not paste into the PTY. A shared in-app terminal menu keeps selection, clipboard handling, shortcut behavior, and lifecycle cancellation under the terminal's control while still routing through the local host API.
The menu is aborted when its terminal closes or is replaced, and stale requests cannot act on a removed terminal. Clipboard and chat-context eligibility are tracked separately so newline-only selections remain copyable without creating empty chat context.
UI Changes
Before
Video upload pending:
before_terminal.mp4could not be attached because GitHub's video upload endpoint requires a browseruser_sessioncookie that is unavailable in this environment.After
Video upload pending:
after_terminal.mp4could not be attached for the same reason.Validation
git diff --checkpassedChecklist
Generated with gpt-5.6-sol in the T3 Code Codex harness.