-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(cli): Ctrl+click hyperlinks and right-click context menu in VP mode #8439
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5a189e7
feat(cli): Ctrl+click hyperlinks and right-click context menu in VP mode
3aab5f3
test(terminal-capture): add VP context menu screenshot scenario
8e9c98f
Merge branch 'main' into feat/vp-native-mouse-parity
qwen-code-dev-bot f6f87a6
fix(ci): align review timeout workflow tests with externalized vars (…
qwen-code-dev-bot eda904c
Merge remote-tracking branch 'origin/main' into feat/vp-native-mouse-…
qwen-code-dev-bot e89ea53
Merge branch 'main' into feat/vp-native-mouse-parity
qwen-code-dev-bot 0271b5e
Merge branch 'main' into feat/vp-native-mouse-parity
qwen-code-dev-bot 6761b3f
Merge branch 'main' into feat/vp-native-mouse-parity
qwen-code-dev-bot 5c26662
Merge branch 'main' into feat/vp-native-mouse-parity
qwen-code-dev-bot 6e55fa3
Merge branch 'main' into feat/vp-native-mouse-parity
wenshao 5fc4607
Merge branch 'main' into feat/vp-native-mouse-parity
wenshao 6cd2f8d
fix(cli): address round-1 review criticals on VP mouse parity
chiga0 7f49f6e
fix(cli): address round-1 review suggestions on VP mouse parity
chiga0 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
57 changes: 57 additions & 0 deletions
57
integration-tests/terminal-capture/scenarios/vp-context-menu.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /** | ||
| * Visual evidence for PR #8439 (VP native mouse parity). | ||
| * | ||
| * Runs the bundled CLI against a mock model that always replies with a | ||
| * markdown link, then injects raw SGR mouse bytes (the app is in VP mode with | ||
| * mouse tracking on): a right-click on the link label must raise the in-app | ||
| * context menu; Escape dismisses it. | ||
| * | ||
| * Prereq: the mock server must be listening, e.g. | ||
| * PORT=8795 node /tmp/vpm-final2/mock-openai-server.js | ||
| * | ||
| * Label geometry verified by E2E on a 120x40 terminal: the `Example Domain` | ||
| * label renders at row 13, cols 9–22 (mid-label col 16). | ||
| */ | ||
| import type { ScenarioConfig } from '../scenario-runner.js'; | ||
|
|
||
| const MOCK_PORT = 8795; | ||
|
|
||
| // SGR right-button press/release at col 16, row 13 (1-based). | ||
| const RIGHT_PRESS = '\u001b[<2;16;13M'; | ||
| const RIGHT_RELEASE = '\u001b[<2;16;13m'; | ||
|
|
||
| export default { | ||
| name: 'vp-context-menu', | ||
|
chiga0 marked this conversation as resolved.
|
||
| spawn: [ | ||
| 'bash', | ||
| '-c', | ||
| `TMUX= CI= CONTINUOUS_INTEGRATION= FORCE_HYPERLINK=1 BROWSER=echo ` + | ||
| `node dist/cli.js ` + | ||
| `--auth-type openai ` + | ||
| `--openai-base-url http://127.0.0.1:${MOCK_PORT}/v1 ` + | ||
| `--openai-api-key sk-mock -m mock-model --approval-mode yolo`, | ||
| ], | ||
| terminal: { | ||
| cols: 120, | ||
| rows: 40, | ||
| title: 'qwen-code — VP context menu', | ||
| cwd: '../../..', | ||
| }, | ||
| flow: [ | ||
| // Dismiss the startup "Built-in Provider Update" dialog if it appears | ||
| // (Escape = "Remind me later"). Harmless when no dialog is shown. | ||
| { sleep: 6000, key: 'Escape' }, | ||
| // A following `key` step disables auto-Enter, so submit explicitly. | ||
| { | ||
| type: 'reply with exactly one line: See [Example Domain](https://example.com/) for details.', | ||
| }, | ||
| { sleep: 1000, key: 'Enter' }, | ||
| // Right-click on the link label → context menu appears. | ||
| { sleep: 500, key: [RIGHT_PRESS, RIGHT_RELEASE] }, | ||
| { capture: '02-menu-open.png' }, | ||
| // Escape dismisses the menu. | ||
| { key: 'Escape' }, | ||
| { capture: '03-menu-closed.png' }, | ||
| ], | ||
| gif: false, | ||
| } satisfies ScenarioConfig; | ||
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.
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.
Uh oh!
There was an error while loading. Please reload this page.