Skip to content

fix(web): render rows below expanded tool calls at thread bottom - #3

Merged
asfires merged 1 commit into
mainfrom
fix/timeline-bottom-expand-blank
Aug 10, 2026
Merged

asfires merged 1 commit into
mainfrom
fix/timeline-bottom-expand-blank

Conversation

@asfires

@asfires asfires commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Fixes the blank rows below an expanded command-output row at pinned thread bottom.

Root cause was an app-side disclosure asymmetry in MessagesTimeline.tsx: turn folds and "+N previous tool calls" suspend LegendList end-scroll maintenance before resizing, but the command-output row only toggled local state. With maintainScrollAtEnd still active, the row's growth scheduled a compensating end scroll against a render window computed for the pre-growth geometry, blanking the rows below until the next re-render.

Fix routes the command-row toggle through the same suspendEndScrollMaintenanceForDisclosure settling path, so expansion/collapse keeps the viewport anchored like the other disclosure types.

An earlier revision ported the upstream @legendapp/list 3.3.4 end-maintenance guard instead; it was applied and executing but guards a different scenario and did not fix this bug (see comments). It has been dropped to keep the diff minimal.

Verified: 62 timeline unit tests pass; headed Chromium shows expand/collapse scroll delta of 0.00 both directions with full row coverage (pre-fix, expansion moved scrollTop by exactly the height delta). Draft until manual confirmation on a dev instance.

Codex CLI (diagnosis + fix) + Claude Fable 5 (Claude Code)

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Aug 10, 2026
Base automatically changed from tool-row-output-contrast to main August 10, 2026 19:57
@asfires asfires closed this Aug 10, 2026
@asfires asfires reopened this Aug 10, 2026
@asfires

asfires commented Aug 10, 2026

Copy link
Copy Markdown
Owner Author

Round 2, after the first version failed manual testing.

Actual root cause was app-side, not the library. The 3.3.4 port from round 1 was applied and executing, but it guards a different failure (content growth pushing the end past the threshold cancels the pass). The blank rows came from a disclosure asymmetry in MessagesTimeline.tsx: turn folds and "+N previous tool calls" call suspendEndScrollMaintenanceForDisclosure before resizing, but the command-output row only flipped local state — so maintainScrollAtEnd stayed enabled, LegendList scheduled a compensating end scroll, and native scrollTop moved while the render window and absolute row containers were still computed for the pre-growth geometry.

Fix: route the command-row toggle through the same settling path (982ee778b). maintainScrollAtEnd goes false for the two-frame settle window, and MVCP position restore stays scoped to the disclosed row. Expansion/collapse now keeps the viewport anchored like the other two disclosure types (headed Chromium: scroll delta 0.00 both directions, no uncovered rows; previously expansion moved scrollTop by exactly the height delta).

The round-1 library patch stays — it fixes a real adjacent bug upstream fixed in 3.3.4, it just wasn't this one.

Manual verification: open a long thread, scroll to exact bottom, expand the last Ran command row that has rows below it — the toggle and assistant text below should stay rendered, and scrollTop should not jump.

Codex CLI (diagnosis + fix) + Claude Fable 5 (Claude Code)

…t rows

Route the command-output disclosure through the same settling path as turn folds and work-group toggles. Expanding a row at pinned bottom no longer lets LegendList schedule a compensating end scroll against a stale render window, which left the rows below blank until the next re-render. The library-patch port from round 1 stays: it fixes a real adjacent bug but was not the cause here.

Codex (gpt-5.6-sol) via Claude Code
@asfires
asfires force-pushed the fix/timeline-bottom-expand-blank branch from 982ee77 to 2e2b2f8 Compare August 10, 2026 20:21
@github-actions github-actions Bot added size:S and removed size:L labels Aug 10, 2026
@asfires
asfires marked this pull request as ready for review August 10, 2026 20:36
@asfires
asfires merged commit 78349bb into main Aug 10, 2026
12 of 16 checks passed
@asfires
asfires deleted the fix/timeline-bottom-expand-blank branch August 10, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 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