Skip to content

Feat/021 smoothness fixes#7

Merged
astrobyte-dev merged 6 commits into
mainfrom
feat/021-smoothness-fixes
Jun 12, 2026
Merged

Feat/021 smoothness fixes#7
astrobyte-dev merged 6 commits into
mainfrom
feat/021-smoothness-fixes

Conversation

@astrobyte-dev

Copy link
Copy Markdown
Owner

No description provided.

astrobyte-dev and others added 6 commits June 13, 2026 00:06
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>
@netlify

netlify Bot commented Jun 12, 2026

Copy link
Copy Markdown

Deploy Preview for nightfeed failed.

Name Link
🔨 Latest commit c1b8809
🔍 Latest deploy log https://app.netlify.com/projects/nightfeed/deploys/6a2c9421c925eb000825871d

@astrobyte-dev astrobyte-dev merged commit 2b56100 into main Jun 12, 2026
3 of 7 checks passed
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