Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add keyboard undo and redo to whiteboard interviews

クローズ
#352 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@xuntla がすでに取り組んでいます。

2026年10月18日 から。

  • #366 @xuntla による — オープン

評価

この issue はまだ評価されていません。

説明

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

  1. 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.
  2. Focus follows the rules above without scrolling; existing buttons remain usable and advertise the correct shortcuts.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

主要言語
Rust
スター
177
フォーク
100
平均マージ
1日 8時間
マージ済み PR(30日)
168

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sysprog21/codetrial のほかの issue

sysprog21/codetrial の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。