fix(ContentOverview): keep the infinite-scroll list from collapsing on load more - #2006
Open
MrDirkelz wants to merge 1 commit into
Open
fix(ContentOverview): keep the infinite-scroll list from collapsing on load more#2006MrDirkelz wants to merge 1 commit into
MrDirkelz wants to merge 1 commit into
Conversation
…n load more
Scrolling the CMS overview snapped the reader back to the top on every "load
more", flashed a near-empty list, and fired hundreds of POST /query requests.
The CMS syncs a 30-day content window, so most overview rows are API-supplement
docs rather than Dexie docs. Growing `$limit` rebuilt the HybridQuery generation,
which emptied both contributions; `keepPreviousResult` bridged `output` only until
the local read landed, and that read publishes the local-only subset. The list
therefore dropped to a handful of rows for the length of the supplement's round
trip, collapsing the scroll height (browsers clamp scrollTop) and unmounting most
rows. Each ContentDisplayCard ran an unbounded per-parent Content query, which
always takes HybridQuery's always-post branch, so every remount re-issued one
request per row.
HybridQuery now recognises a rebuild that differs only by a larger `$limit` and
carries the local + remote contributions over, re-deciding the supplement for the
widened window. Everything already gathered still satisfies the wider query, so
the list only ever gains rows. Gated on `keepPreviousResult`; any other change to
the query stays a normal rebuild.
Row translations move from a query per card to one `parentId: {$in}` query on the
overview, passed down as a prop, collapsing the per-row requests and Dexie
subscriptions into a single source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MrDirkelz
force-pushed
the
fix/content-overview-infinite-scroll
branch
from
September 4, 2026 08:15
67c953d to
d20930a
Compare
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.
Scrolling the CMS overview snapped the reader back to the top on every "load more", flashed a near-empty list, and fired hundreds of POST /query requests.
The CMS syncs a 30-day content window, so most overview rows are API-supplement docs rather than Dexie docs. Growing
$limitrebuilt the HybridQuery generation, which emptied both contributions;keepPreviousResultbridgedoutputonly until the local read landed, and that read publishes the local-only subset. The list therefore dropped to a handful of rows for the length of the supplement's round trip, collapsing the scroll height (browsers clamp scrollTop) and unmounting most rows. Each ContentDisplayCard ran an unbounded per-parent Content query, which always takes HybridQuery's always-post branch, so every remount re-issued one request per row.HybridQuery now recognises a rebuild that differs only by a larger
$limitand carries the local + remote contributions over, re-deciding the supplement for the widened window. Everything already gathered still satisfies the wider query, so the list only ever gains rows. Gated onkeepPreviousResult; any other change to the query stays a normal rebuild.Row translations move from a query per card to one
parentId: {$in}query on the overview, passed down as a prop, collapsing the per-row requests and Dexie subscriptions into a single source.