Skip to content

Fix flaky busy-day timeline contract at 1440px - #931

Merged
matteius merged 1 commit into
mainfrom
fix/ci-timeline-autoadvance
Nov 8, 2026
Merged

matteius merged 1 commit into
mainfrom
fix/ci-timeline-autoadvance

Conversation

@matteius

@matteius matteius commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Integration Tests › Permission-aware API and browser contracts fails on main (965df7a, a workflow-only change) and on #930 with the same test:

timelineWorkflow.ui.spec.ts › busy-day timeline scrubbing preserves paused and playing intent at 1440px
expect(currentSrc).toContain('/1002?')  // stayed on /1001

The test sets currentTime = 29.8 as soon as video.paused is false after advancing to segment 1001. paused flips the moment play() is requested, before the new source's metadata loads. TimelinePlayer's loadedmetadata handler then seeks to the timeline cursor (≈0 s into the new segment), overwriting the test's seek, so the segment never ends and never advances to 1002. The 390px run usually wins the race; 1440px sometimes loses.

The fix waits for readyState >= HAVE_CURRENT_DATA with currentTime > 0 before jumping near the end. Product behavior is unchanged.

Test plan

  • npm run contracts:typecheck
  • CI Permission-aware API and browser contracts green on this PR

🤖 Generated with Claude Code

The busy-day timeline contract set currentTime=29.8 as soon as the video
reported paused=false. paused flips when play() is requested, before the next
segment's metadata loads, and the player then seeks to the timeline cursor,
overwriting the test's seek. The 1440px case lost that race on main (965df7a)
and on #930. Wait for HAVE_CURRENT_DATA with time advancing first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matteius
matteius merged commit 04b610f into main Nov 8, 2026
14 of 19 checks passed
@matteius
matteius deleted the fix/ci-timeline-autoadvance branch November 8, 2026 11:46
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