Skip to content

Keep completed interviewer captions readable - #271

Open
chenyu50 wants to merge 2 commits into
sysprog21:mainfrom
chenyu50:keep-interviewer-captions
Open

chenyu50 wants to merge 2 commits into
sysprog21:mainfrom
chenyu50:keep-interviewer-captions

Conversation

@chenyu50

@chenyu50 chenyu50 commented Oct 10, 2026 •

Copy link
Copy Markdown

Completed Jim captions lose the opening sentences of long turns and disappear after 12 seconds while the candidate is still thinking. Keep the full completed turn visible until the candidate's next transcribed speech or an edit that changes the code text. Clicking or focusing the editor and switching languages preserve the caption, while candidate captions retain their existing 12-second timeout.

Mark a turn complete only after successfully reading its final transcription stream. Ignore late updates for retired Jim segment IDs and final replays of known, earlier candidate turns. Add behavioral regression tests, update the affected avatar assertions, and document the new caption rule in docs/avatar-contract.md.

Validation:

  • All 1170 browser tests passed (0 skipped).
  • In a local live interview, verified that a long Jim turn remained fully readable by scrolling, stayed visible beyond 13 seconds, and survived editor focus and caret movement.
  • Verified that candidate speech replaced Jim's caption, a new Jim turn replaced the previous turn and remained visible, and a code text edit hid the caption.
  • Added real-browser regression coverage for editor focus, clicks, caret movement, and language switches while a completed Jim caption is visible. Verified that a code text edit dismisses it.

Closes #223


Summary by cubic

Keeps completed interviewer captions visible in full until the candidate's next transcribed speech or a code text change. Previously, completed Jim turns were truncated to 160 characters and hid after 12 seconds while the candidate was still thinking, and editor interactions or language switches dismissed them.

  • Completed turns no longer expire or truncate; candidate captions and the "Listening..." placeholder keep their 12-second timeout.
  • A turn is only marked complete after its final transcription stream is read successfully; late updates for retired Jim turns and final replays of earlier candidate turns are ignored.
  • An edit during the reveal is remembered and dismisses the caption once the final text finishes revealing.
  • Editor clicks, focus, caret movement, and language switches preserve the caption; only changed code text or new speech dismisses it.
  • Adds behavioral tests for retention, dismissal, pacing, idle timing, and scroll reset, and updates the avatar contract docs.

Written for commit 3ab26df. Summary will update on new commits.

View guided diff

cubic-dev-ai[bot]

This comment was marked as resolved.

@chenyu50
chenyu50 force-pushed the keep-interviewer-captions branch from fdbe3a5 to 14b0c14 Compare October 10, 2026 08:02
Comment thread web/captions.js
Comment thread web/captions.js

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase latest main branch and resolve conflicts.

@chenyu50
chenyu50 force-pushed the keep-interviewer-captions branch from 14b0c14 to 954eb66 Compare October 11, 2026 08:02
@chenyu50

Copy link
Copy Markdown
Author

Rebased onto main at 6d556b7 and pushed 954eb66. ./scripts/test.sh exited 0 with all 1058 browser tests passing and 0 skipped.

@jserv

jserv commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Rebased onto main at 6d556b7 and pushed 954eb66. ./scripts/test.sh exited 0 with all 1058 browser tests passing and 0 skipped.

Don't leave messages like the above, as GitHub always tracks commits.

Comment thread web/captions.js
Comment thread web/captions.js Outdated
Comment thread web/interview.js
Comment thread web/captions.js Outdated
Comment thread web/captions.js
Comment thread web/captions.js
Comment thread web/interview.js
@chenyu50
chenyu50 force-pushed the keep-interviewer-captions branch from 954eb66 to 4ae770c Compare October 12, 2026 05:38
@jserv
jserv requested a review from ColtenOuO October 12, 2026 19:45
Comment thread web/captions.js Outdated
Comment thread web/captions.js
Comment thread tests/browser/editor-pipeline.test.js
Caption timing relied on source assertions that could miss runtime
regressions. Add behavioral coverage to preserve candidate captions,
placeholder expiry, and pacing when interviewer retention changes.
Completed interviewer captions lost their opening sentences and expired
while candidates were still considering a hint. Keep the complete turn
visible until transcribed speech or a code text change so candidates can
reread it without leaving the problem.
@chenyu50
chenyu50 force-pushed the keep-interviewer-captions branch from 4ae770c to 3ab26df Compare October 14, 2026 09:17
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.

Keep Jim's last turn on screen until the candidate answers

3 participants