Skip to content

load large thread history progressively - #79

Open
tarik02 wants to merge 33 commits into
mainfrom
feat/progressive-thread-history
Open

load large thread history progressively#79
tarik02 wants to merge 33 commits into
mainfrom
feat/progressive-thread-history

Conversation

@tarik02

@tarik02 tarik02 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

What Changed

  • Keeps the live thread tail bounded and serves historical messages through indexed, bidirectional windows with absolute message positions and sampled outline landmarks.
  • Projects large activity payloads before returning historical pages.
  • Stores fetched web history in a normalized sidecar IndexedDB cache and reuses covered ranges without another server request.
  • Renders both live and historical windows through one LegendList instead of maintaining a separate TanStack virtualizer path.
  • Lets LegendList own prepend and late-size stabilization, with inline loading skeletons represented as regular list rows.
  • Extends the fork LegendList patch so the selected visible-content anchor also applies to late item-size changes.
  • Uses the minimap as the global conversation-indexed scrubber, with an explicit current-position marker and throttled latest-wins loading while dragging.

Why

Large threads previously transferred and rendered too much history. Earlier progressive-loading iterations then mixed multiple scroll models with manual viewport reconciliation, so page insertion and late row measurements could move content backward, fight user input, or leave the scrollbar in a stale state.

The local scrollbar now has one owner and one coordinate system: LegendList over the current bounded window. Adjacent pages load after native user movement, LegendList anchors visible rows across data and size changes, and the minimap owns global conversation navigation.

UI Changes

Large web threads expose the whole conversation through the left minimap. The local scrollbar remains visible for the bounded window, adjacent pages load near its edges, and compact skeleton rows move naturally with the list while loading. Scroll-to-end returns directly to the bounded live tail.

Verification

  • Focused lint passed for the changed web files.
  • Web typecheck passed.
  • Frozen offline pnpm install passed with the updated LegendList patch.
  • T3 Preview frame-sampled cached and cache-cleared prepends on the 2,116-message fixture, including continuous manual scrolling through late row measurements. The final implementation showed no backward frame; the largest late correction observed was 5.1px.
  • T3 Preview confirmed the native scrollbar remains visible and scroll-to-end lands exactly at the bounded window end.
  • Existing MessagesTimeline.test.tsx: 14 tests passed earlier in the PR.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

GPT-5.6-Sol via T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Jul 28, 2026
@github-actions github-actions Bot added size:XXL and removed size:XL labels Jul 28, 2026
@tarik02 tarik02 changed the title load thread messages progressively load large thread history progressively Jul 28, 2026
tarik02 added 22 commits July 28, 2026 20:15
…ad-history

# Conflicts:
#	apps/web/src/components/ChatView.tsx
…ad-history

# Conflicts:
#	FORK.md
#	apps/server/src/ws.ts
#	packages/client-runtime/src/state/threads.ts
tarik02 added 8 commits July 30, 2026 15:15
…ad-history

# Conflicts:
#	apps/web/src/components/ChatView.tsx
#	packages/contracts/src/orchestration.ts
…ad-history

# Conflicts:
#	apps/server/src/checkpointing/CheckpointDiffQuery.test.ts
#	apps/server/src/orchestration/Layers/OrchestrationEngine.test.ts
#	apps/server/src/project/ProjectSetupScriptRunner.test.ts
#	apps/server/src/provider/Layers/ProviderSessionReaper.test.ts
#	apps/server/src/serverRuntimeStartup.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant