Skip to content

perf(web): smooth nested detail motion and resize paint - #62

Merged
blurbery merged 1 commit into
mainfrom
perf/detail-motion-residual
Aug 28, 2026
Merged

blurbery merged 1 commit into
mainfrom
perf/detail-motion-residual

Conversation

@blurbery

Copy link
Copy Markdown
Owner

Summary

  • isolate each episode card's layout/paint surface so Lanterns no longer folds the full episode row back into the document paint during browser-chrome viewport animation
  • give Series → Season and Season → Series the same lightweight-shell handoff, 196px travel, 300ms duration, and cubic-bezier(0.32, 0.72, 0, 1) compositor motion as Home detail navigation
  • keep destination detail content gated until that motion finishes, eliminating the late card/text expansion that made nested transitions jagged
  • preserve reduced-motion behavior, desktop/mobile layouts, hero/background artwork, episode carousel cursors, and the existing history/back-flow correction

Measured root causes

Lanterns / browser sidebar

Production build-105 was profiled signed in with Chrome DevTools while repeatedly shrinking and expanding the content viewport to emulate Brave's browser-chrome sidebar. Hiding the hero or its images did not remove the drops; isolating the episode section did. The clipped Embla episode track was being repainted as part of the document on every resize frame.

Six controlled open/close cycles on Lanterns:

Trace measure build-105 before this branch Change
Paint 195.429ms 162.944ms -16.6%
Document paint 124.748ms 104.950ms -15.9%
Episode-track paint 20.736ms 12.627ms -39.1%
Graphics pipeline 181.972ms 156.548ms -14.0%
Max graphics-pipeline slice 4.992ms 1.243ms -75.1%
BeginMainFrame 274.752ms 228.760ms -16.7%

The full after trace at the 1120px shrunken viewport included scrolling, rapid pointer sweeps, and another resize cycle. It recorded no rAF gaps: resize main-thread max 10.4ms; scroll renderer max 3.851ms; pointer renderer max 5.328ms. Hero/background artwork remained rendered.

Nested detail motion

Before this branch, PR #61 used the right WAAPI distance, duration, and easing, but the destination detail tree was allowed to expand during the final animation frames. Series → Season grew from the 96-element shell to 289/295 elements at 283/300ms and produced a 114.6ms frame gap. Back likewise committed the full Series tree instead of the lightweight shell.

After this branch, both directions commit a 96-element shell at ±196px, hold the same two painted frames as Home, begin movement 50ms after that shell appears, and run the same 300ms easing. The shell remains at 96 elements for the entire motion and details reveal only on completion. Series → Season measured max 17.4ms with no frame above 20ms; Season → Series measured max 17.6ms with no frame above 20ms. Home's transition path and timing were unchanged.

Existing fork work inventoried and preserved

  • PR perf(web): make media interactions consistently responsive #59 / merge be0fb393f43bf4e7b8861257e6ac41fddf828a2e: Brave/browser-chrome viewport resize performance work.
  • PR perf(web): eliminate detail-page resize and interaction jank #60 / merge da04355c07e6d4aa54876d64bc6b1e3962994341: broad detail-page transition, hover, pointer, scrolling, and resize performance work; previously deployed as build-104.
  • PR perf(web): align nested detail motion #61 / merge ea5178fe200c8a5195a3d62275ec785b80fcdfe8: build-105 follow-up. It added desktop nested-detail live main-stage motion using the 196px/300ms shared sidebar easing attempt, detail-carousel layout/paint containment, normal cursor on blank carousel track space with pointer only on actual cards/controls, reduced-motion/browser fallbacks, and focused tests. Current production image digest: sha256:b1e890e7d7e7e418660d3b087d904431abaaf32f3b9d56ff4b8725115a5d4750.
  • Episode/season carousel implementation: original commit 680323ce5deaa9862d031b6d54ed474b21f0c103, merged as 926511db. It moved season episodes into the existing MediaCarousel, preserving one horizontal row for large seasons and the stable Season 4-style header/layout. Blank carousel space remains the normal cursor; only cards and controls use pointer.

Current upstream history was checked read-only. The overlapping performance work in upstream PR Silo-Server#540 (b29aaf94) was already considered/ported by the preceding fork work; newer quick-action changes are unrelated. This PR does not sync upstream or mix unrelated changes.

Verification

  • full web Vitest suite: 306 files, 2,319 tests passed
  • focused transition/layout/episode/CSS tests: 5 files, 55 tests passed
  • TypeScript project check passed
  • targeted Prettier and ESLint passed (one pre-existing Layout.tsx hooks warning remains)
  • Vite production build passed (existing font-resolution and chunk-size warnings only)
  • direct signed-in desktop verification: hero/artwork present, episode row preserved, no horizontal overflow, blank track cursor auto, interactive episode links pointer
  • 199-frame combined Lanterns scroll + rapid pointer sweep: no rAF gaps
  • mobile 390×844 verification: hero/artwork and episode carousel retained, no horizontal overflow
  • reduced-motion desktop verification: no main-stage animation, correct Series → Season route/history
  • PageBack verification: Season → Series returns to the correct history entry; existing automated history tests confirm the prior Series/Season Back loop remains fixed

No production server files, containers, environment, database, or deployment were changed.

@blurbery
blurbery merged commit 43d8c1c into main Aug 28, 2026
3 checks passed
@blurbery
blurbery deleted the perf/detail-motion-residual branch August 28, 2026 08:30
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