Skip to content

fix(studio): prevent negative timeline latency telemetry - #2905

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/studio-timeline-negative-latency
Jul 30, 2026
Merged

fix(studio): prevent negative timeline latency telemetry#2905
miguel-heygen merged 1 commit into
mainfrom
fix/studio-timeline-negative-latency

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

  • Measure scroll-to-next-frame callback latency with performance.now() at both ends.
  • Add a hook-level regression for an animation-frame timestamp that predates the scroll handler.

Why

The animation-frame callback timestamp can represent the current frame and be earlier than performance.now() captured by a scroll handler. Subtracting those two clocks produced impossible negative latency samples.

How

Keep the animation-frame timestamp for frame-to-frame cadence, but use the monotonic performance.now() clock for both the scroll start and callback delivery time.

Test plan

  • Focused telemetry hook regression
  • Studio TypeScript check
  • Full Studio test suite (3,124 tests)
  • Changed-file lint and formatting
  • Manual testing performed
  • Documentation updated (not applicable)

@miguel-heygen
miguel-heygen merged commit b813b17 into main Jul 30, 2026
38 checks passed
@miguel-heygen
miguel-heygen deleted the fix/studio-timeline-negative-latency branch July 30, 2026 20:29
dahans-msft2 pushed a commit to dahans-msft2/hyperframes that referenced this pull request Aug 6, 2026
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