Virtualized console logs#1940
Draft
AaronPlave wants to merge 3 commits into
Draft
Conversation
The All Problems tab (and other ConsoleLogs tabs) previously rendered
every BaseError via {#each}, producing ~5 DOM nodes per entry. On a plan
with 20k+ activity validation errors that put 100k+ nodes in the layout
tree, which made every global style invalidation (e.g. opening any
Stellar dropdown's focus trap) run a full recalc and forced 500ms+
UpdateLayoutTree on each click.
Virtualize the list with @tanstack/svelte-virtual using a stable
`const virtualizer` plus reactive `setOptions`, so the measurement cache
and scroll position survive prop updates (every $allProblems emit would
otherwise destroy them). Wire the virtualizer's onChange callback into
a scrollTick counter that participates as an explicit dep of the
totalSize/virtualItems reactives — the wrapper emits same-reference
writable updates that don't reliably retrigger Svelte template
expressions, and the canonical recreate pattern would lose scroll/
measurement state on every backend update.
Render the scroll container unconditionally (toggled via class:invisible
when there is nothing to show) so bind:this resolves before onMount,
matching the working canonical test setup. Move the empty state to a
sibling overlay so it can coexist with the always-mounted virtualized
list.
Also drop the competing overflow-y-auto on the Console slot wrapper —
it was acting as an outer scroll boundary that swallowed scroll events
the virtualizer needed to see.
d214821 to
5d5669a
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.



No description provided.