Add keyboard undo and redo to whiteboard interviews
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Who is affected
Candidates drawing in a whiteboard interview must return to the toolbar to undo an accidental stroke. Keyboard shortcuts would let them correct a drawing and continue from the canvas.
Current behavior and initial analysis
At 5526176, initWhiteboard() in web/interview.js:3882 binds Undo and Redo buttons through applyBoardEdit(), but no keyboard handler invokes those operations. The model and operation journal already support both in web/whiteboard.js:288 and :303.
I verified this with an automated Chromium browser test. It loaded the existing interview module and used test-only setup to make the board editable without connecting to a live interview. After drawing two strokes, Ctrl+Z did nothing, while the Undo button removed one stroke. Ctrl+Y did nothing, while the Redo button restored it. Simulated Cmd-key combinations also had no effect. Drawing did not focus the canvas, and Tab could not reach it. This check did not cover a full live interview or a native macOS browser.
The toolbar buttons are the current workaround.
Proposed behavior
| Operation | Windows/Linux | macOS |
|---|---|---|
| Undo | Ctrl+Z | Cmd+Z |
| Redo | Ctrl+Y | Cmd+Shift+Z |
A page-wide listener could take undo away from text fields. Instead, scope the shortcuts to focus within the whiteboard canvas or drawing toolbar, excluding editable text targets. Make the canvas reachable with Tab, show keyboard focus, and focus it without scrolling after an accepted drawing start. After a successful Undo, Redo or Clear board action, return focus to the canvas so a newly disabled button does not lose the next keyboard operation.
Scope
Limit the change to keyboard interaction and focus handling in whiteboard interviews, with browser tests and shortcut documentation. Reuse the existing undo/redo, editing restrictions, synchronization and recording behavior. Document the shortcuts in the existing Undo/Redo row under "Whiteboard interviews" in the root README.md.
Shortcuts for the coding example drawing, new drawing tools, changes to scoring or storage, and additional AI calls are outside this proposal.
Acceptance criteria
- Each distinct keypress matches one button action. Preserve stroke/eraser undo, undoable Clear board, and the existing rule that drawing after undo discards the redo branch.
- Focus follows the rules above without scrolling; existing buttons remain usable and advertise the correct shortcuts.
- Refuse keyboard edits whenever the existing board rules prohibit editing, including before the interview starts, while paused, during the behavioral round, or after the interview ends. Also refuse them during an unfinished stroke, without queuing them.
- Preserve text-field undo and ignore input-method composition, held-key repeats, unsupported modifier combinations and key events already handled elsewhere. Focus outside the board panel is unaffected.
- Empty history does nothing, with no warning or new operation record. Suppress the browser's default key behavior only when an available whiteboard action is actually handled.
- Keyboard edits redraw, synchronize and record the board through the same process as button edits.
Validation plan
Add automated browser tests that draw strokes and exercise the shortcuts. The new tests must fail before the feature is implemented and pass afterward. Cover the acceptance criteria, including focus, editing restrictions, synchronization and operation recording. Run the relevant tests and ./scripts/test.sh, and report any skipped checks or platforms not tested.
Related: #65 and #72 introduced whiteboard mode, but keyboard shortcuts for Undo and Redo are not yet supported.
- Ngôn ngữ chính
- Rust
- Star
- 160
- Fork
- 64
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 135
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/codetrial
-
Audio output can be confirmed without playing a test soundCó thể đã có người làm @ChenYingHan1121 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
sysprog21/codetrial#359 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add a Copy code button to the final reportCó thể đã có người làm @yansawu đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
sysprog21/codetrial#318 · 5 bình luận · 2 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
C tests accept a wrong next pointer on the last node in Org Chart Row NavigationCó thể đã có người làm @winter77777 đã nhận hôm nay. Đang mở
sysprog21/codetrial#370 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
"Let me think about it for a moment" does not start a thinking holdCó thể đã có người làm @PeteChiang1211 đã nhận hôm nay. Đang mở
sysprog21/codetrial#369 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
sysprog21/codetrial#368 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sysprog21/codetrial
Issue tương tự
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Có thể đã có người làm @ericz7900 đã nhận hôm nay. Đang mởllm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Package Request]: LificĐang mởHelp-Wanted Needs-Triage Package-Request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
microsoft/winget-pkgs#456324 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ClickHouse/ClickHouse#126833 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/runtime good first issue size/S type/refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
lorica-labs/volant#681 ·
Maintainer thường phản hồi trong vòng 1 ngày