Repository navigation
Fix OpenCode bracketed paste fallback in terminal #2971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e125fc3
test: cover terminal Cmd+V fallback when menu misses
austinywang 81052f4
fix: preserve terminal paste when menu shortcut misses
austinywang 2796ae4
Add regression coverage for paste surface recovery
austinywang 3bc13af
Recover Ghostty surface before consuming paste shortcuts
austinywang 1194c39
Tighten terminal paste regression tests
austinywang 06c6d34
Organize terminal paste fallback regression tests
austinywang a90bc54
Honor Ghostty keybindings after paste menu miss
austinywang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 33790
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 3160
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 2270
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 3699
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 1947
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 167
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 355
🏁 Script executed:
Repository: manaflow-ai/cmux
Length of output: 702
Test only exercises the "Ghostty handled" branch.
The probe defaults
performAfterMenuMissResult = trueand is never toggled, so the window routing is only verified for the case where Ghostty's binding resolution claims the event. The complementary path —performKeyEquivalentAfterMenuMissreturningfalse, causing the window-level V fallback to invokepaste(_:)/pasteAsPlainText(_:)— is not asserted in this file. Per the PR summary, that positive path is covered elsewhere (paste-action swizzling, pasteboard snapshot/restore), so this test's narrow "don't preempt Ghostty" assertion is appropriate on its own.GhosttyCommandEquivalentProbeView(frame:)directly instantiatesGhosttyNSViewrather than using thesurfaceView(in:)lookup elsewhere in the file. This is safe:setup()registers a global scroll-wheel event monitor (cleaned up properly in deinit), sets up tracking areas, and registers drag types—none of which require a Ghostty surface to be present. The probe view has no surface assigned and doesn't accessself.surface, so there's no risk of crashes or state leakage into subsequent tests.🤖 Prompt for AI Agents