Skip to content

feat(window): drive the player from the keyboard, follow the audio, and mark live speaker guesses - #36

Merged
GeiserX merged 6 commits into
mainfrom
feat/window-p1
Sep 26, 2026
Merged

GeiserX merged 6 commits into
mainfrom
feat/window-p1

Conversation

@GeiserX

@GeiserX GeiserX commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Problem

The window's player couldn't be driven. It showed a bare offset, had no speed control, no seek keys, and the transcript didn't follow the audio. Live speaker labels looked just as final as the ones the final pass writes, even though they are guesses until then. A transcript line had no context menu, so keyboard users couldn't reach its actions at all.

Fix

  • The player shows its position and the part's end as wall times, worked out through the part's clock so pauses count. A scrubber covers the part being played.
  • Speed goes from 0.75x to 2x in 0.25 steps with [ and ], and it survives a reload. Shift+← and Shift+→ seek 5 s and clamp at the part bounds. The same keys work with focus on the scrubber or the speed picker.
  • The line being played is highlighted and kept in view. Any scroll by hand stops following until you press Follow: wheel, keys (even with focus on a line's Play button), or a scrollbar drag.
  • An unnamed live speaker reads c1? with a dashed border, and its screen-reader label says it is a guess. Naming it makes it solid at once. After final.done every label turns solid. A call reopened after final.done shows its new live lines as guesses again.
  • Right-click, Shift+F10 or the Menu key opens a menu on a line. Arrows, Home/End, Enter, and Esc or Tab close it and hand focus back. It has Play from here, Copy line, Copy with time and speaker ([15:41:07 Ben] text), Name this speaker… and Fix a word…, all from one list of line actions.

Per bead

akou-b6y.13 (W4.2). Acceptance: a live cluster chip has the provisional style and c3?; after final.done the same speaker's chip is solid; a named speaker is solid at once.

  • Window test [W4.2] … a live cluster chip reads c1? and is provisional; a name is solid at once; after final.done the same speaker is solid in tests/ui/transcript-audio.test.ts, plus five [W4.2] unit tests in tests/ui-model.test.ts, including a reopen log and a re-run log.
  • Red on the old code: the chip read "Speaker 1". Three mutations each turn a test red: dropping the redraw on final.done, ignoring finalDone, ignoring the name.
  • A live line is solid only if it was written before final.done (seq < final.done.seq) or has a name. Before that rule a reopened call's line l000005 showed a solid Speaker 4; the test caught it.
  • One existing expectation in tests/ui/parity.test.ts changed: a split-off unnamed speaker now reads c2?, as the design says.

akou-b6y.15 (W4.4), partial. Acceptance: each item runs its registry action; keyboard users reach the same menu.

  • Tests: right-click on a line opens its menu, and each item runs its action, Shift+F10 and the Menu key open the same menu on the focused line; arrows move, Enter runs, Esc closes and gives focus back, and a scroll moves the menu with its line; the line leaving the view, a window blur or a resize close it.
  • Red on the old code: no #line-menu. Removing the key handler turns the keyboard test red.
  • Not built: Edit and per-line Change speaker need the segment edit route PG-A5, and Mark needs W3.2. Neither exists yet. I left those items out rather than show buttons that do nothing.

akou-b6y.21 (W5.3), partial. Acceptance: seeking to 50 % shows the wall time of that instant, never a bare offset.

  • Tests: [W5.3] seeking to 50 % shows the wall time of that instant, never a bare offset and the unit test [T3.9] a position after a 5-minute pause shows the wall time of that instant, never an offset.
  • The 50 % rule holds within a part. Still to do: one scrubber across every part of the call, and scrubbing before any line has played. The audio route serves one part at a time, so a call-wide scrubber needs route work first. docs/ux/WINDOW.md marks it partial.

akou-b6y.22 (W5.4). Acceptance: ] twice sets 1.5x; reload keeps it.

  • Tests: [W5.4] ] twice sets 1.5x, reload keeps it, a played line takes it; held at 0.75x and 2x; [ and ] type in a text field, plus three unit tests on the steps, the stored value and the label.

akou-b6y.23 (W5.5). Acceptance: position moves 5 s; clamps at the part bounds.

  • Tests: [W5.5] Shift+→ and Shift+← move 5 s and clamp at the part bounds; in a text field they select text, [W5.5] the keys the player bar promises work with focus on the scrubber and the speed picker, and a unit test on the clamp.

akou-b6y.24 (W5.6). Acceptance: with playback running, the highlighted row's a0 ≤ t < a1; a manual scroll stops auto-scroll.

  • Tests: [W5.6] with playback running the highlighted row's a0 <= t < a1 and stays in view; a manual scroll stops auto-scroll until Follow, [W5.6] PageUp with focus on a line's Play, and a drag of an overlay scrollbar, stop auto-scroll too, and a unit test on the row pick.
  • Red on the old code: with focus on .play, PageUp never showed Follow. Putting back only the old offsetX >= clientWidth scrollbar guess turns the drag half red. A positive control checks that a scroll the user didn't make leaves following on.

akou-b6y.51 (W12.2). No new work here. PR #22 already shipped Mod+Shift+C and the header Copy transcript button, tested in tests/ui/window.test.ts. The palette entry waits for W14.5.

Checks run locally

  • bun run test:ui: 62 pass, 0 fail.
  • bun run check with Bun 1.4.2: 945 pass, 1 fail. The failure was a 5 s timeout in tests/handoff-hooks.test.ts, which this PR doesn't touch, with load near 60 on a laptop shared by other jobs. I re-ran that file once. The first test passed and a 1 s process-group timing test in the same file failed instead. Both are timing under load, not this diff. CI decides.

Owner-verifiable

  • The context menu and the Menu key in the real webviews on macOS, Windows and Linux (the tests drive headless Chromium).
  • Audio playback, speed and seeking against a real recorded call.
  • Copy with time and speaker through the real clipboard.

Bead ids fully done

akou-b6y.13, akou-b6y.22, akou-b6y.23, akou-b6y.24. akou-b6y.15 and akou-b6y.21 are partial for the reasons above. akou-b6y.51 needed nothing new; its palette entry is still open under W14.5.

…aker labels as guesses

The player could only play and pause a line. It now shows the position as a
wall time with a scrubber over the part being played (W5.3), plays at 0.75x to
2x with [ and ], kept across visits (W5.4), seeks 5 s with Shift+arrows,
clamped to the part (W5.5), and lights the line being played and keeps it in
view until the reader scrolls by hand; Follow resumes (W5.6).

A live cluster's chip reads c3? and is dashed until it is named or the final
pass is done (W4.2); final.done now redraws every row so the skipped part's
labels turn solid too.

Every line has a menu by right-click, Shift+F10 or the Menu key (W4.4): play
from here, copy the line, copy it with time and speaker, name the speaker, fix
a word. Edit, per-line speaker and Mark wait for PG-A5 and W3.2.

The player bar's code moves out of app.ts into player.ts; the setRate trap
(loading a part resets the element's rate) is covered by keeping
defaultPlaybackRate in step.
…d call's new speakers a guess

A PageUp with focus on a line's Play (where a click leaves it) now stops
auto-scroll, and so does dragging a scrollbar drawn over the content, the
macOS default. Chips go by the seq of final.done, so lines written after a
reopen read c3? again and a re-run no longer turns finished lines back into
guesses. The player's keys work from the scrubber and the speed picker, the
line menu moves with its line and closes on blur and resize, a platform
contextmenu on the menu is cancelled, and a guess chip's accessible name
starts with the text it shows.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e370289c-990d-430e-8cdb-c90d72f60589

📥 Commits

Reviewing files that changed from the base of the PR and between ca58ac4 and b754102.

📒 Files selected for processing (11)
  • docs/ux/WINDOW.md
  • src/ui/app.ts
  • src/ui/index.html
  • src/ui/line-menu.ts
  • src/ui/model.ts
  • src/ui/player.ts
  • src/ui/theme.css
  • src/ui/transcript.ts
  • tests/ui-model.test.ts
  • tests/ui/parity.test.ts
  • tests/ui/transcript-audio.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GeiserX

GeiserX commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@GeiserX

GeiserX commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@GeiserX

GeiserX commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@GeiserX
GeiserX merged commit c1b023c into main Sep 26, 2026
18 checks passed
GeiserX added a commit that referenced this pull request Sep 26, 2026
@GeiserX
GeiserX deleted the feat/window-p1 branch September 28, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant