Follow new transcript turns until scrolled up

HE
13h ago
+453-28

Once the transcript is longer than the Transcript tab, new turns land below the visible area and the panel does not move, so the candidate has to scroll down after every turn. The panel now follows the newest turn, including one still growing. Scrolling up stops the follow, and scrolling back to the end resumes it. Only the panel scrolls, never the page.

The follow uses the caption bar's own checks, moved into web/scroll-follow.js so there is one copy; caption behavior does not change. selectTab calls the view's new reveal, so the tab opens at the end if it was following. The empty state before the first turn is not followed. While following, the panel turns off scroll anchoring, because Chrome's anchoring moved it when rows rewrapped across the 1024px breakpoint, and that read as the candidate scrolling up; paused, anchoring stays on and keeps the reread line in place. The rule is in the Captions section of docs/avatar-contract.md.

Tests: tests/browser/scroll-follow.test.js covers the shared checks, tests/browser/render.test.js covers the view with a panel laid out like #transcript-panel, and tests/browser/transcript-follow.test.js runs the interview page in Chromium at 1280x720 and 900x700. The browser test fails on main.

Run locally on Windows: the changed and nearby browser tests (486) pass, and eslint, prettier and the commit checks are clean. diagnostic-capture, floor-capture, replay-evidence, replay-fixture, replay-input and review-workbench fail on this machine, the same way on main. The Rust lanes were not run locally.

I also checked it in a live interview with the latest binary (codetrial 0.1.0 (b2c2bc9)) serving this branch's web/ through --web-dir. The video shows the panel keeping Jim's growing turn in view:

https://github.com/user-attachments/assets/0032220b-0d58-4d63-9a72-06bac663d60c

Close #592


Summary by cubic

Makes the Transcript tab follow new turns until the candidate scrolls up, so the newest turn stays in view instead of landing below the visible area. The follow uses the same checks as the caption bar, now shared in web/scroll-follow.js; caption behavior does not change.

  • Scrolling up stops the follow, and scrolling back to the end resumes it; only the panel scrolls, never the page.
  • Opening the Transcript tab reveals the end if it was following, or the candidate's place otherwise.
  • The empty state before the first turn is not followed.
  • Disables overflow-anchor on #transcript-panel while following, so Chrome's rewrapping scroll anchoring is not read as the candidate scrolling.
  • Adds browser tests covering the follow at 1280x720 and 900x700, plus unit tests for the shared checks; the browser test fails on main.

Closes #592.