Repository navigation
fix(server): scrolling back through a long thread no longer re-reads the whole thread on every page - #11
fix(server): scrolling back through a long thread no longer re-reads the whole thread on every page#11bompus wants to merge 166 commits into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Handled, no push needed (head stays 2328eba, so this review is current).
|
|
cubic waiver for this pull request: on 2026-10-16 the owner selected the option "Waive cubic for fork PR #11" (reply "9c, 9b"), because cubic is over its account limit ("AI review line limit reached", expected until about 2026-11-11). CodeRabbit finished on the final head 2328eba with no actionable comments. |
…the whole thread index on every page Each history or timeline page read every turn item of the thread and rebuilt the visible-item index in JS, so a full scrollback cost time quadratic in thread length (13,000 items: 72 pages, 2.3 to 2.7 s). The index is now kept for the 4 most recently read threads and reused while the newest event of the thread and its fork sources is unchanged, using the same revision check thread find already relies on.
2328eba to
0f04d16
Compare
|
@coderabbitai full review |
|
…23) The desktop app installs its own version on an SSH host and relaunches the server it started there whenever it connects, but that server reports no self-update path, so the update banner offered a relaunch command to run by hand. SSH connections to a standalone server now say the desktop app updates it when it reconnects, and the banner no longer counts them as needing a manual update.
) * perf(server): stop serializing terminal chunks just to measure them The terminal output window stringified every RPC chunk only to count its bytes, then the protocol serialized the same frame again for the wire. Windowed chunks carry terminal events, so charge them with the existing queuedSize model (envelope + payload bytes) instead; unrecognized values keep the exact JSON measurement. * fix(server): charge error and snapshot fields in the terminal byte budget Review finding on the size-estimate change: an error event was charged only the 128-byte envelope although its message is unbounded, so the window could retain eight large error chunks under its 64 KiB limit. queuedSize now charges every variable-size field (output data, error message, activity label, snapshot history/cwd/path/label), and the window fast path only applies to the known terminal event types; other shapes keep the exact JSON measurement. Adds a regression test where one 64 KiB error message fills the window. * chore(server): drop an effect-diagnostics directive that no longer applies * fix(server): charge thread and terminal ids in the terminal byte budget
…r/pr11-20261108 # Conflicts: # apps/server/src/orchestration-v2/ProjectionStore.ts
|
Bompus AI Review could not run on c95785e: no reviewer seat finished the review (GPT-6.1 Terra: daily credit stop; GPT-6.1 Sol: daily credit stop; SWE-2 Max: usage limit reached). Nothing was reviewed. Pushing a new commit or re-running the review tries the seats again. |
|
Closing: superseded by upstream pingdotgg#24422. Branch perf/history-page-index is kept. |
Fork review only, never merged: this is the diff intended for pingdotgg/t3code (see pingdotgg#20427).
Scrolling back through a long thread rebuilt the whole thread index on every history page. This keeps the index for the 4 most recently read threads and reuses it while the newest event of the thread and of its fork sources is unchanged.
The revision query moved from
ThreadFind.tstothreadRevision.ts. Focused tests: ThreadFind, ProjectionStore, threadHistoryPaging and ThreadSearch, 90 passed.Summary by cubic
Scrolling back through a long thread no longer rebuilds the whole thread index on every history page, cutting scrollback time from quadratic in thread length (13k items: 72 pages, 2.3–2.7s) to a few cached reads.
ThreadFind.tsto the newthreadRevision.tsso both callers use the same check.Written for commit 5dcc490. Summary will update on new commits.