Repository navigation
fix(threads): load full tool output when it is expanded - #556
Merged
Merged
Conversation
nixuuu
force-pushed
the
fix/lazy-item-expand
branch
2 times, most recently
from
November 12, 2026 12:23
0831cca to
f72b509
Compare
Load large content inside the expanded call, with compact loading and retry states. Keep completed reads in the client session cache and abort reads on collapse. Fixes: #541
nixuuu
force-pushed
the
fix/lazy-item-expand
branch
from
November 12, 2026 12:25
f72b509 to
cf9b557
Compare
nixuuu
marked this pull request as ready for review
November 12, 2026 12:26
nixuuu
added a commit
that referenced
this pull request
Nov 20, 2026
## Change - Web and desktop show the loaded timeline immediately. Scrolling up to a gap reads one older page. “Show earlier work” loads the selected turn, including turns that span several pages. On mobile, a gesture toward the history edge loads at most one page. - Web, desktop and mobile keep the live stream open when an older page covers the changes already received. If the stream advanced past the page, the client replays from the page checkpoint to recover concurrent edits and deletions. - Desktop persists a bounded history tail. Web and desktop limit inactive expanded content to 32 items and 8 MiB and cancel obsolete reads on reset. An oversized result stays available while in use. Clients reuse the measured size of an unchanged snapshot when leaving a conversation. - Header-only updates preserve the timeline rows. Unchanged controls and heartbeats still run validation and connection diagnostics while avoiding redundant view updates. ## Verification - Chromium on Linux, 2,160 items and 19 subagents. Opening the thread issued 0 older-page requests, down from 16 (453,590 response bytes). Checked scroll restoration, a multi-page turn, a quote, retry after a failed read and a timeline that fits on screen. Tested wide and narrow viewports in both themes. - Android emulator. A layout change after scrolling issued 0 history reads, down from 16. A gesture fetched one page on the existing stream. Twelve pairs of unchanged controls and heartbeats produced 0 React commits, down from 21. Sending a message and resuming from the background advanced and restored the live checkpoint. - With 4,608 synthetic items, 32 exits from an unchanged cached thread required 0 full encodings, down from 32. In a 10,000-item renderer probe, median header-update processing fell from 3.10 ms to 0.007 ms. Forty-eight expanded outputs of 512 KiB retained 7.5 MiB of inactive content, down from 24 MiB. - Targeted domain, history cache, gRPC replay, continuity, work-window and mobile synchronization checks passed, along with web, mobile and domain typechecks and repository lint on the edited files. The concurrent-deletion test compares a paged-and-resumed client with a continuously connected client. - Copy audit (§8) passed. The former idle “Loading earlier work…” label now reads “Show earlier work” and acts as a button. “Loading earlier work…” appears during a read and “Retry” after failure. The native equivalent uses the existing “Show earlier messages” button. - The Windows Electron and day-long Windows session remain unmeasured. Native testing used Android. Additional Expo ESLint reported pre-existing hook findings. Fixes: #300 Fixes: #302 Fixes: #541 Fixes: #556 Fixes: #672 Fixes: #687
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.
Collapsed tool calls currently show a separate “Load full item / Showing a preview.” row, even when their truncated content is hidden. Load each call’s full content automatically when its own details open, with a compact inline spinner and loading status. Keep the preview visible on failure and offer Retry. Visible message previews end with “Show full message · ” and load in place. Truncated background output ends with “Show full output · ”.
Completed reads stay in a client session cache keyed by thread and content hash, outside the timeline reducer. Closing a disclosure aborts its read; web cancellation follows the open state even while the body’s exit animation remains mounted. Mobile follows the same behavior with JS-only changes. Reasoning and compaction retain their own disclosure boundaries. The diff is limited to lazy content and preserves the mobile turn animation changes now on dev.
Fixes: #541
Verification
bun installandbun run gen:checkpass. Focused lint and formatting checks pass; web typecheck reports zero errors and warnings, and mobile typecheck passes.tests/integration/thread-sequence-watch.test.ts— 10 pass, 0 fail. Covers bounded windows, on-demand large content, chunked reads, concurrent cancellation, and owner scoping. Domain and gateway loading semantics are unchanged.6ddec9ef559ee0095ac33e94ff9418a942053b17, Android5f6eae3ab278f1cd543e9ed763f923a319b65ec9. No native config or dependencies changed. Fullcheck:tmpwas not rerun locally, as requested; the full suite and web build run in CI.Browser review found and fixed a missing reactive Retry dependency in the Svelte effect, and moved the existing truncated-background-output action after its output with the requested copy and size. The original Static checks failure was formatting in mobile LazyItemContent; that formatting fix is included.
Copy audit (§8)
Audit items 1–10 pass: short sentence-case copy, verb-first actions, existing vocabulary, concrete error recovery, no duplicate facts or new empty states, no humor, and text alongside status cues. Short, typical and long names were checked at desktop and phone width in light and dark.