Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Closedmacodev00(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/12909/headopened View on GitHub

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 https://github.com/pingdotgg/t3code/issues/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 timeline refreshing and row measurement when live groups or expanded agent activity change.
    • Preserved accurate sizing for working, live activity, user, and expanded detail rows.
    • Improved rendering consistency when agent-spawn activity expands or changes.
    • Improved timeline performance and visual stability during updates.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. 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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      Navigate logical layers of code changes, visualize relationships, and explore their 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: ba1a3f5b-f91e-4d85-a33a-a68ba54e887d

      📥 Commits

      Reviewing files that changed from the base of the PR and between 36a3b86c48ac8b663040dc416ac238670ea6ff3a and cc75a2a66bdf90423bab6a2437df88b526eb44fe.

      📒 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
      🚧 Files skipped from review as they are similar to previous changes (2)
      • apps/web/src/components/chat/MessagesTimeline.logic.test.ts
      • apps/web/src/components/chat/MessagesTimeline.logic.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 2 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
      The timeline adds fixed heights for eligible rows. Expanded activity and agent-spawn rows remain measured. Extra-data signatures track expanded content and spawn expansion state.
      LegendList integration and validation
      apps/web/src/components/chat/MessagesTimeline.tsx, apps/web/src/components/chat/MessagesTimeline.logic.test.ts
      LegendList receives the computed row-size helper and extra-data value. The component uses a memoized view. Existing test assertions use named helpers without behavior changes.

      Priority: ➖ Normal

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

      Change: Bug fix · Severity of issue fixed: Low

      Suggested reviewers: maria-rcks

      Merge Risk: ⚪ Minimal · up to cc75a

      The desktop timeline now preserves live-row identity and refreshes expanded-row measurements, addressing overlap during streaming without a remaining merge-blocking risk.

      🚥 Pre-merge checks | ✅ 5
      ✅ Passed checks (5 passed)
      Check nameStatusExplanation
      Linked Issues check✅ PassedThe PR meets the coding requirements in [#12094] and [#12734]. MessagesTimeline.logic.ts keeps live activity identity stable across mid-turn user messages. It includes expanded group entries and `ex…
      Out of Scope Changes check✅ PassedThe changes stay within [#12094] and [#12734]. They modify chat timeline projection, live-row identity, LegendList row sizing and refresh inputs, and focused timeline tests. These changes directly sup…
      Docstring Coverage✅ PassedDocstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 3 files.
      Title check✅ PassedThe title clearly describes the primary fix: preventing mid-turn timeline overlap during streaming tool groups.
      Description check✅ PassedThe description explains the change, the reason, the affected UI behavior, and the issue reference. It is focused and mostly complete, although it uses shortened section headings and does not include …
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create a new PR

      Comment `@coderabbitai help` to get the list of available commands.
    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

      Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

    5. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

      Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

    6. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    7. Sorry, I'm unable to act on this request because you do not have permissions within this repository.

    8. Rate Limit Exceeded

      @macodev00 have exceeded the limit for the number of chat messages per hour. Please wait 24 minutes and 44 seconds before sending another message.

    9. Rate Limit Exceeded

      @macodev00 have exceeded the limit for the number of chat messages per hour. Please wait 23 minutes and 20 seconds before sending another message.

    10. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

      Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

    11. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      ⚠️ Action not completed

      Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

      Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign in to join this conversation.