Skip to content

fix(web): stop mid-turn timeline overlap on streaming tool groups - #12909

Open
macodev00 wants to merge 1 commit into
pingdotgg:mainfrom
macodev00:cursor/mid-turn-timeline-overlap-9712
Open

macodev00 wants to merge 1 commit into
pingdotgg:mainfrom
macodev00:cursor/mid-turn-timeline-overlap-9712

Conversation

@macodev00

@macodev00 macodev00 commented Sep 21, 2026

Copy link
Copy Markdown

What

  • Keep streaming tool-group / live work rows from overlapping mid-turn by measuring expandable agent-spawn work-live rows (unpinned fixed size) and remasuring when spawn expand changes.

Why

Fixes #12094

Redo of closed #12734 addressing Macroscope Not-approved / Medium: mechanical LegendList sizing + expandedSpawnEntryIds in list extraData; avoid oversized layout policy rewrite.

UI

Desktop chat timeline: live agent-spawn expand should not overlap the following Working row.

Checklist

  • I read CONTRIBUTING.md and kept this small / bug-only
  • What + why explained above
  • Followed AGENTS.md documentation rules (no new docs)
  • No unrelated changes
  • CLA / AI-reviewed standing override for macodev00 auto-contrib

Summary by CodeRabbit

  • Bug Fixes
    • Improved chat timeline behavior when new user messages appear during an active turn.
    • Stabilized live activity group placement and identity across timeline updates.
    • Improved list refresh and row measurement when live groups or expanded agent activity change.
    • Preserved accurate sizing for working, live activity, user, and expanded detail rows.

Keep live tool-group identity across a steer so LegendList does not remount
the row at the 90px estimate. Pin chrome sizes, leave agent-spawn work-live
unpinned, and remasure via extraData when expanded groups grow or spawn
details expand.

Co-authored-by: maco <macodev00@users.noreply.github.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 21, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at a58096c

Macroscope's review found this PR approvable — The PR makes a localized fix to existing web timeline virtualization: it preserves live-row identity and remasures variable-height streaming groups to prevent overlap. It adds focused regression tests without changing product defaults, APIs, security-sensitive code, or static-analysis settings.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7436088e-d1ec-4a9b-ab43-12660be25d88

📥 Commits

Reviewing files that changed from the base of the PR and between 1de563c and a58096c.

📒 Files selected for processing (3)
  • apps/web/src/components/chat/MessagesTimeline.logic.test.ts
  • apps/web/src/components/chat/MessagesTimeline.logic.ts
  • apps/web/src/components/chat/MessagesTimeline.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The timeline keeps live activity rows stable across mid-turn steers. LegendList now uses row-specific fixed sizes and height signatures that include expanded activity and spawn content.

Changes

Timeline overlap and row sizing

Layer / File(s) Summary
Live activity stability
apps/web/src/components/chat/MessagesTimeline.logic.ts
Activity groups remain active when only user messages follow. Active live rows receive a stable identity.
Row sizing and height signatures
apps/web/src/components/chat/MessagesTimeline.logic.ts, apps/web/src/components/chat/MessagesTimeline.tsx
The timeline adds fixed heights for eligible rows. Expanded activity and agent-spawn rows remain measured. LegendList extra data now tracks expanded content and spawn expansion state.
Timeline regression coverage
apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Tests cover stable live-row identity, expanded-group changes, fixed-size selection, and spawn expansion updates.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: maria-rcks

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the web fix and the specific mid-turn timeline overlap problem during streaming tool groups.
Description check ✅ Passed The description explains what changed, why the change is needed, the affected UI behavior, and the related issue. It is focused and provides checklist details. It does not include screenshots or a vid…
Linked Issues check ✅ Passed The changes satisfy the coding requirements in [#12094] and [#12734]. assignLiveActivityRowId preserves the live row id across a mid-turn user message. remainderIsOnlyUserMessages keeps the live a…
Out of Scope Changes check ✅ Passed The reviewed changes are limited to desktop chat timeline placement and measurement. They modify timeline derivation, LegendList sizing and refresh inputs, and focused timeline logic tests. The change…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

2 participants