Skip to content

perf(ui): virtualize nested session list#586

Open
pascalandr wants to merge 3 commits into
NeuralNomadsAI:devfrom
pascalandr:perf/virtualize-session-list
Open

perf(ui): virtualize nested session list#586
pascalandr wants to merge 3 commits into
NeuralNomadsAI:devfrom
pascalandr:perf/virtualize-session-list

Conversation

@pascalandr

@pascalandr pascalandr commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • flatten expanded session trees into a stable pre-order row projection
  • render only the viewport and buffer with the existing Solid virtua integration
  • preserve nested connectors, dynamic heights, search expansion, focus, active-session scrolling, and loading sentinel behavior

Why

Large or deeply expanded session trees currently mount every visible row. Status updates then affect a large DOM tree even when most sessions are far outside the sidebar viewport. This PR bounds mounted rows while leaving selection, deletion, filtering, and store semantics unchanged.

Validation

  • UI TypeScript typecheck
  • 47 focused session-tree, pagination, and virtual-scroll tests
  • 1,000-session projection regression test
  • production Vite build
  • git diff whitespace check
  • final focused regression review
  • manual test

Flatten the currently visible session tree into a stable pre-order projection and render it through the existing virtua Solid integration. This bounds mounted session rows to the viewport and buffer while preserving arbitrary nesting, forced-open search results, dynamic row heights, selection, and expansion behavior.

Scroll newly active sessions by virtual index instead of querying unmounted DOM nodes. Keep focused rows mounted to avoid losing keyboard focus, preserve separators around the loading sentinel, and anchor future pagination to the real scroll viewport.

Cover collapsed ancestry, nested ordering, connector metadata, filtered trees, parity with existing visibility semantics, and 1,000-session projections. Validated with UI typecheck, focused component/store tests, production build, whitespace checks, and a final regression review.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29260867849

Artifacts expire in 7 days.
Artifacts:

  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-tauri-macos
  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-tauri-windows
  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-tauri-macos-arm64
  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-tauri-linux
  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-electron-linux
  • pr-586-18c6298f3e65d946830e97b8746e599bd36e5cd0-electron-windows

@pascalandr pascalandr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatekeeper verdict: APPROVE.

No blocking code findings. The virtualized projection preserves nested ordering, expansion and search semantics, stable Solid/virtua identity, dynamic measurement, focused-row mounting, active-index scrolling, and correct sentinel rooting. Focused projection tests and UI typechecking pass.

The required macOS check should be rerun before merging: its failure was an external connection reset while downloading the Electron darwin-arm64 archive, after the preceding build validations and macOS x64 packaging had succeeded.

Residual risks are limited to missing browser-level coverage for active scrolling, focus retention, expansion under virtualization, responsive/RTL rendering, and same-length reorder measurement. Touched oversized files remain session-list.tsx at about 917 lines and session-layout.css at about 572 lines.

@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29325119470

Artifacts expire in 7 days.
Artifacts:

  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-macos
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-windows
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-macos
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-macos-arm64
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-linux
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-linux
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-windows

@pascalandr

Copy link
Copy Markdown
Contributor Author

@shantur LGTM

@pascalandr pascalandr requested review from shantur and removed request for shantur July 14, 2026 11:57
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29330694015

Artifacts expire in 7 days.
Artifacts:

  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-windows
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-macos
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-macos-arm64
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-tauri-linux
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-linux
  • pr-586-3e9423374e7ea9ec96b91a244cd406e74f2bc471-electron-windows

@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29331879096

Artifacts expire in 7 days.
Artifacts:

  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-electron-macos
  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-tauri-windows
  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-tauri-macos-arm64
  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-tauri-linux
  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-electron-linux
  • pr-586-fa282603d0c285b0edb021d3501450ff17982225-electron-windows

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.

2 participants