Skip to content

feat(studio): redesign player scrubber with Studio Console deck and chapter track - #9222

Queued
miguel-heygen wants to merge 1 commit into
mainfrom
dsurvey2/studio-console-scrubber
Queued

miguel-heygen wants to merge 1 commit into
mainfrom
dsurvey2/studio-console-scrubber

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

Upgrades OSS Studio's preview playback scrubber (PreviewSeekBar and PlayerControls) to the Studio Console design:

  1. Floating smoked-glass hardware deck: Wraps the preview transport in a refined floating deck (.hf-scrubber-deck) harmonized with the dark preview stage in both dark and light (paper) Studio themes.
  2. Chapter-segmented micro-tick track: Splits the recessed track at real scene/clip boundaries derived from usePlayerStore((s) => s.elements) with crisp cut gaps, etched micro-ticks, per-segment hover expansion, and satin played fill.
  3. Knurled-cap brushed aluminum dial: Conic-gradient metallic dial whose specular sheen rotates smoothly as you play or scrub (--hf-knob-angle), lifting gently on pointer hover and compressing on active press (prefers-reduced-motion respected).
  4. Floating scene markers & hover time+scene callout: Porcelain-white and iridescent-gradient scene marker dots float above the track at each scene cut; hovering a marker or scrubbing reveals a frosted MM:SS.t · <Scene> callout, and clicking any marker jumps straight to that cut.
  5. 1-frame steppers & full native range accessibility: Adds Previous Frame / Next Frame step buttons flanking the machined Play/Pause button, while keeping the overlaid native <input type="range" aria-label="Seek preview"> so screen-reader semantics (aria-valuetext, min, max, disabled), keyboard seeking (ArrowLeft/ArrowRight/ArrowUp/ArrowDown, Shift+Arrow, PageUp/PageDown, Home/End), and visible :focus-visible ring on the dial all work seamlessly.

All colors and gradients are tokenized in packages/studio/src/styles/theme.css (--hf-scrubber-*).

Before

Before this change (main, registry/examples/product-promo fixture): bare native range input with flat grey track, plain white thumb, no scene markers, no hover timecode, and no frame steppers.

Before dark scrubber

Before light Studio

After

After this change (registry/examples/product-promo fixture): floating Studio Console deck, chapter-segmented micro-tick track with cut gaps, rotating knurled brushed-aluminum dial, scene markers (00:01.5, 00:14.0), hover/drag time+scene tooltip, keyboard focus ring, and 1-frame steppers.

Live Motion Walkthrough

Hovering chapter segments, inspecting and clicking a scene marker, scrubbing across a cut with rotating metallic sheen, stepping frame by frame, and switching Studio themes:

https://static.heygen.ai/hyperframes-oss/pr-captures/studio-console-scrubber-v1/studio-console-scrubber-motion.mp4

Interactive States (2x Captures)

State Capture
Resting at 00:00 (floating deck + chapter cuts + scene pearls) After idle
Hovering iridescent scene marker (00:14.0 · Scene 5 Logo Outro) After marker hover
Active scrub (00:11.2 · Scene 2 4 Canvas, rotated sheen, highlighted segment) After active drag
Keyboard focus ring (:focus-visible on native range input) After keyboard focus
Light paper Studio theme context After light Studio

Verification

fails without the fix: the new unit tests in packages/studio/src/player/components/PreviewSeekBar.test.tsx (scene marker derivation/deduplication, chapter segment rendering, marker jump + hover tooltip, Home/End/Shift+Arrow/PageUp/PageDown keyboard seek, dial rotation on liveTime) and packages/studio/src/player/components/PlayerControls.test.tsx (Studio Console deck + 1-frame steppers) fail against main without these changes.

  • Unit & gate tests (3 consecutive runs, including shuffled seeds 2026 and 7771): 6/6 files passed (hexRatchet.test.ts, tokenGate.test.ts, PreviewSeekBar.test.tsx, PlayerControls.test.tsx, ShortcutsPanel.test.tsx, PreviewPane.test.tsx).
  • Build & static checks: oxfmt --check, oxlint (0 warnings, 0 errors), @hyperframes/studio typecheck (0 errors), @hyperframes/studio build (Vite + tsup ESM + DTS), check:studio-copy-dashes, check:tracked-artifacts, and lefthook (filesize, fallow, commitlint) all green.
  • Live Chrome walkthrough: Verified on registry/examples/product-promo across dark and light paper themes, marker hover and click jump, continuous drag with dial sheen rotation, 1-frame step buttons, and keyboard focus ring with zero console/page errors.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 019ba37dd821f351ed34f6daf3ecef48e113cd8a. Read in full: PreviewSeekBar.tsx, scrubberMarkers.ts, the PlayerControls.tsx diff with the base file beside it, and the playback keyboard path (usePlaybackKeyboard.ts, playbackShortcuts.ts, core typingTarget.ts). The two CSS files I read as hunks only (motion, focus, raw colours); I did not judge the look.

No blocker. Approving.

What I checked

  • The native range is still the control: aria-label, aria-valuetext, min/max, disabled and the settled / unsettled seek contract are the same as on main (pointer scrub unsettled, release and keys settled).
  • The new arrow handling on the range does not double up with the global frame-step keys: the range is an input, so shouldIgnorePlaybackShortcutTarget already leaves its keys alone.
  • The steppers start from the right time after a remount: TimecodeToggleButton seeds currentTimeRef from the store before the first clock tick.
  • Playback does not re-render the bar: knob, fills and the timecode are painted through refs from liveTime.
  • The reduced-motion block covers every element that has a transition.

Ran in a checkout of this head: PreviewSeekBar.test.tsx, PlayerControls.test.tsx, ShortcutsPanel.test.tsx, PreviewPane.test.tsx, lib/time.test.ts and the style gate tests: 11 files, 94 tests pass. Not run: a browser, the build, lint and typecheck (CI had 24 checks pending, none failed, when I posted).

Nits, none blocking

  1. Reuse PlayerControls.tsx stepFrame: lib/time.ts already has stepFrameTime(time, deltaFrames, fps), which the arrow keys use (usePlaybackKeyboard.ts). It snaps to the frame grid; currentTime + delta / fps does not, so from 0.5123 s the button lands on 0.5456 s while the key lands on 16/30. Suggested: onSeek(Math.min(duration, stepFrameTime(currentTimeRef.current, delta, compositionFps())), { settled: true }).
  2. deriveScrubberMarkers makes a marker from every timeline element that starts after 0.15 s, whatever its kind (audio, text, image, expanded sub-composition children), and calls each one a scene. A project with many clips gets a dot and a tab stop per clip (only starts within 0.25 s of each other merge). The marker row also comes before the range in the DOM, so keyboard users tab through every marker to reach the slider. Suggested: keep composition / video kinds only (the sort already knows them), or cap the count, and give the marker buttons tabIndex={-1} since the slider already reaches every point.
  3. SeekRangeInput onPointerMove calls setUi with a new object on every move, so the whole bar and each marker re-render while the pointer moves. Return prev when nearMarkerId and hoveredSegIdx did not change.
  4. handleKeyDown does not look at Cmd / Ctrl / Alt, so a modified arrow on the focused slider is also taken as a seek. Return early when one of them is held.
  5. On the slider an arrow is 0.2 s (1 s with Shift); everywhere else it is 1 frame (10 with Shift). Worth one line in the shortcuts panel, or the same step.

Need: yes, a product design choice by the Studio owner · Size: ok for one visual change (1,251 added, 301 of them CSS, 141 tests) · Reuse: stepFrameTime for the steppers (nit 1) · Simpler: marker derivation could filter by kind instead of deduplicating everything (nit 2) · Structure: fine (checked lib/time.ts helpers, usePlaybackKeyboard step path, studioKeyDefaults; the pure marker math sits in its own module, no split needed)
Risk: low — Studio preview transport only, no data or render path; worst case is a cosmetic or keyboard-order regression.

Rames

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 275 (base branch 275), smooth 77 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@miguel-heygen
miguel-heygen added this pull request to the merge queue Dec 1, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

No deployments
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.

2 participants