Repository navigation
fix(landing): re-arm scroll-reveal observer after the stats block mounts - #586
Merged
Merged
Conversation
Live verification of #585 on commonly.me caught 4 permanently-hidden reveal targets (proof-inner, pricing head, CTA title/sub) that the local stub never reproduced: when /api/stats/public resolves, the conditionally-rendered stats block shifts <main>'s child list and React remounts every section after it (index-based reconciliation) — fresh DOM nodes the already-armed observer never saw, stuck at opacity 0. The observer effect now depends on `stats` and re-queries un-revealed [data-reveal] nodes when it lands. Reproduced the live condition locally (stub returning real stats): 18/18 reveal, 0 hidden. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MnRCAFgjrrGZxo9VRCmCm9
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.
Live verification of #585 on commonly.me caught 4 reveal targets permanently stuck at opacity 0 — everything after the self-proof section. Root cause: when
/api/stats/publicresolves, the conditionally-rendered stats block shifts<main>'s child list, and React's index-based reconciliation remounts every following section — fresh DOM nodes the already-armed IntersectionObserver never observed. The local stub returned empty stats, so the insertion (and the bug) never reproduced until live.Fix: the observer effect depends on
statsand re-queries[data-reveal]:not(.is-revealed)when it lands. Reproduced the live condition locally with a stats-returning stub: 18/18 targets reveal, 0 hidden.Testing lesson banked: stubs must reproduce the data conditions of production, not just the endpoints — an empty-object stub hid a remount-order bug.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MnRCAFgjrrGZxo9VRCmCm9