Feat/021 smoothness fixes#7
Merged
Merged
Conversation
VideoPlayer's attach effect ran video.controls = !prebufferOnly after the
JSX controls binding, overwriting feed mode's controls={false}. Extend the
011 suspension to that line and add controls to the effect deps.
Adds a native v.redd.it item plus a tiny playable mp4 to the E2E fixture so
the previously skipped chromeless and HAVE_CURRENT_DATA tests now execute.
Also stubs /api/reddit/search-subreddits and /api/reddit/related in E2E,
which still hit upstream and flaked runs with 403/429.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tracing the 020-surfaced mobile failure showed the documented diagnosis was
wrong. The grid restores fine after a real tap; the flake was Playwright's
pre-click actionability scroll, which treats the sticky topbar button as
living at its flow position (document top) and zeroes the scroll position
before useMode captures it. The spec now enters feed mode via
dispatchEvent('click'), matching what a real tap does.
The restore itself still moves from a single requestAnimationFrame to
restoreScrollWhenReady, which waits until layout can accommodate the target
and polls with timers because browsers throttle rAF on occluded pages
(observed in headless Chromium during tracing). Unit tested; the mobile
scroll-restore E2E is no longer skipped and passes 6/6 repeats.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FeedMode previously mounted every item at once, so each video item got a full VideoPlayer downloading and autoplaying simultaneously. It now tracks the active index from container scroll position (items are exactly one viewport tall with mandatory snap, so plain division replaces an IntersectionObserver) and mounts real FeedItems only for active plus or minus one. Slots outside the window render as empty same-height placeholders, keeping scroll geometry and snap points identical. Only the active item autoplays; mounted neighbours sit paused and start when scrolled to. Window computation is a pure function with unit tests; component tests cover slot count, window movement, and end clipping. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hls.js was the only statically imported media engine; dashjs was already dynamic. A loadHls helper in utils/videoLoaders.js (the extraction target CLAUDE.md names for VideoPlayer's planned shrink) awaits the import inside the HLS branch. Main chunk drops from 799 KB (246 KB gzip) to 277 KB (84 KB gzip); hls.js becomes a 524 KB lazy chunk fetched on first HLS play. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Smoke testing the windowed feed surfaced an interaction bug: embed items rendered null with no slot div, so the scroll-position index math misaligned and the wrong item was marked active. RedGIFs embeds now play through the backend stream proxy exactly like the lightbox does, which also means RedGIFs items appear in the feed instead of silently vanishing. Anything else unplayable (audio, non-RedGIFs embeds) is filtered out by isFeedRenderable before windowing so every slot is exactly one viewport. Smoke verified against the fixture: active item plays, neighbour mounts paused, swiping flips them, no controls, exit restores scroll exactly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
❌ Deploy Preview for nightfeed failed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.