Repository navigation
Conversation
|
@copilot resolve the merge conflicts in this pull request |
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.4 via Qwen Code /review
Closes QwenLM#2227 On macOS, keyboard shortcut hints now use native modifier symbols (⌃ for Ctrl, ⌘ for Cmd, ⌥ for Alt, ⇧ for Shift) instead of the generic "ctrl+", "cmd+" text format. - Add formatShortcut() utility in shortcutFormatter.ts - Apply to KeyboardShortcuts panel and retry hint messages - Non-macOS platforms are unaffected
bc3eb5e to
aa8428d
Compare
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.5 via Qwen Code /review
|
@Br1an67 friendly ping — CI is currently red on all 9 Root cause: the PR branch is based on Fix: rebase (or merge) latest Thanks for the contribution! |
|
Reviewed the change. Direction is correct (native symbols on Mac, full no-op elsewhere keeps the blast radius tiny), but a few points worth addressing: Main issues1.
|
Dismissing the prior auto-LGTM: CI is failing on all platforms (build error) and a fresh review surfaced i18n / layout-width / minor issues that need addressing.
|
Two follow-ups on the review state: Dismissed the prior auto-LGTM — the earlier CI is red, but it's not from this change. The failing test is |
DragonnZhang
left a comment
There was a problem hiding this comment.
Downgraded from Approve to Comment: CI has test failures (pre-existing base branch issues in coreToolScheduler.test.ts, not caused by this PR).
[Suggestion] Help.tsx (lines 110-155) still renders shortcuts as hardcoded strings (Ctrl+C, Ctrl+L, Ctrl+O, Alt+Left/Right) without going through formatShortcut. On macOS, the bottom shortcut bar will show symbols like ⌃C, while the Help dialog shows Ctrl+C for the exact same shortcuts — a user-visible inconsistency.
Suggested fix: also route Help.tsx shortcut keys through formatShortcut().
Overall: clean implementation, no blocking issues. The i18n coupling and layout-width concerns previously raised by @wenshao remain valid and are not repeated here. — Qwen Code /review
|
|
||
| return shortcut | ||
| .split(/\s+/) | ||
| .map((combo) => { |
There was a problem hiding this comment.
[Nice to have] combo.split('+') cannot represent the + key itself (e.g., ctrl++ for zoom-in would silently mangle). No current shortcut uses + as a key, but consider documenting this limitation or switching to a regex-based parser that matches known modifiers and leaves the remainder as the key.
— Qwen Code /review
| it('converts modifier keys to Mac symbols on darwin', async () => { | ||
| Object.defineProperty(process, 'platform', { value: 'darwin' }); | ||
| const { formatShortcut } = await import('./shortcutFormatter.js'); | ||
| expect(formatShortcut('ctrl+y')).toBe('⌃Y'); |
There was a problem hiding this comment.
[Nice to have] Consider adding test cases for combined modifiers (ctrl+shift+y → ⌃⇧Y), single-character keys (!, /, @), and mixed-case input (Ctrl+Y) to catch regressions if future shortcuts use these patterns.
— Qwen Code /review
|
@Br1an67 heads up — this PR currently has merge conflicts with Conflicting files:
The rest merges cleanly. Thanks! 中文@Br1an67 提个醒 —— 这个 PR 目前和 冲突文件:
其余文件可以自动合并。谢谢! |
DragonnZhang
left a comment
There was a problem hiding this comment.
Clean extraction of formatShortcut utility for macOS modifier symbols (⌃⌘⌥⇧). Dynamic import via vi.resetModules() correctly handles process.platform detection in tests. KeyboardShortcuts.tsx and useGeminiStream.ts properly consume the new formatter.
Downgraded from Approve to Comment: CI failing.
— claude-opus-4-6 via Qwen Code /review
E2E Tmux Test Report — PR #2484Tested on: Linux (Ubuntu, x86_64) | Branch: Test Results
DetailsTest 1 — UI component tests All 107 test files in the
Test 2 — CLI typecheck Both errors are PR Change Summary4 files changed, +102/-5:
VerdictPASS — All 1568 tests pass. The 2 typecheck warnings are pre-existing infrastructure issues unrelated to the PR changes. The new 中文测试报告E2E Tmux 测试报告 — PR #2484测试环境: Linux (Ubuntu, x86_64) | 分支: 测试结果
详情测试 1 — UI 组件测试
测试 2 — CLI 类型检查
结论通过 — 全部 1568 个测试通过。2 个类型检查警告为预先存在的基础设施问题,与本 PR 变更无关。新增的 |
|
@qwen-code /triage |
|
This pull request has had no activity for 60 days and is being marked as stale. It will be closed in another 30 days if no further activity occurs. To keep it open, push a new commit or leave a comment. Maintainers may apply |
|
This pull request has been closed after 30 additional days of inactivity. You are welcome to reopen it or submit a new pull request if the change is still relevant. Thanks for contributing! |
TLDR
On macOS, keyboard shortcut hints now use native modifier symbols (
⌃for Ctrl,⌘for Cmd,⌥for Alt,⇧for Shift) instead of the generic text format.Closes #2227
Dive Deeper
The CLI keyboard shortcut panel and error retry hints displayed shortcuts like
ctrl+y,cmd+vregardless of platform. On macOS, the convention is to use symbolic modifiers (⌃Y,⌘V).Changes:
packages/cli/src/ui/utils/shortcutFormatter.ts— NewformatShortcut()utility that converts modifier names to macOS symbols whenprocess.platform === "darwin"packages/cli/src/ui/components/KeyboardShortcuts.tsx— ApplyformatShortcut()to shortcut key displaypackages/cli/src/ui/hooks/useGeminiStream.ts— ApplyformatShortcut()to "Press Ctrl+Y to retry" hint messagespackages/cli/src/ui/utils/shortcutFormatter.test.ts— Tests for Mac symbol conversion, multi-part shortcuts, and non-Mac passthroughNon-macOS platforms are completely unaffected — the formatter is a no-op on Linux/Windows.
Reviewer Test Plan
⌃Y,⌃C,⌘Vetc.⌃Yinstead ofCtrl+Yctrl+y,ctrl+c)Testing Matrix
Linked issues / bugs
Closes #2227