Skip to content

Virtualized console logs#1940

Draft
AaronPlave wants to merge 3 commits into
developfrom
feat/virtualized-logs
Draft

Virtualized console logs#1940
AaronPlave wants to merge 3 commits into
developfrom
feat/virtualized-logs

Conversation

@AaronPlave
Copy link
Copy Markdown
Contributor

No description provided.

@AaronPlave AaronPlave added the performance A code change that improves performance label Jun 2, 2026
@AaronPlave AaronPlave self-assigned this Jun 2, 2026
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.
@AaronPlave AaronPlave force-pushed the feat/virtualized-logs branch from d214821 to 5d5669a Compare June 2, 2026 21:18
@AaronPlave AaronPlave deployed to test-workflow June 2, 2026 21:18 — with GitHub Actions Active
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance A code change that improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant