perf(web): the git actions panel no longer re-renders on every streamed update#27418

merged1
t3/streaming-perf-2
t3/streaming-perf-3
opened1d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 21h ago

GitActionsControl read the full thread projection only to fall back to its thread record, so every streamed delta re-rendered the panel with its menus, popovers and dialogs. It now reads the quiet projection, which holds through streamed text.

Benchmark

Measured with the PandaCode vs T3 Code streaming bench (W1: a 50 KB Markdown reply delivered as 500 whole-text updates over 32 s, production build, headless Chromium on cups, median of 3 runs). Each row adds one layer of this stack:

T3 buildMain-thread taskScriptWorst delivery lateness
main21.0 s14.8 s73 ms
+ timeline rows (this stack, 1)19.3 s13.0 s26 ms
+ Markdown blocks (2)12.1 s4.4 s10 ms
+ git actions panel (3)10.4 s3.4 s9 ms
+ streamed text bypasses the timeline (4)9.5 s2.6 s9 ms
PandaCode, same machine6.6 s0.5 s2 ms

The bench delivers an update every 64 ms. In the app the default paragraph streaming mode sends at most one every 400 ms, so real streams hit these paths less often, but each update costs what it does here.

Implemented by Claude Opus 5.5 in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

Checks

25 successful · 12 skipped
All checks passed
6761387

Added 1 commit

  • perf(web): the git actions panel no longer re-renders on every streamed update6761387
Synced from GitHub

Approvability

Verdict: Approved at 6761387

Macroscope's review found this PR approvable — The Git actions panel now uses an existing structural thread subscription to avoid re-rendering on streamed text updates. Thread metadata updates and Git action safeguards remain unchanged, limiting the change to rendering performance.

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

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 535b68732edeb4a3b11e77f65aff082a91679e17 and 67613870641071f312e0b7739a55149e28c3e8cd.

External image Files selected for processing: 1
  • apps/web/src/components/GitActionsControl.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

GitActionsControl now uses useQuietThreadProjection to read the active thread projection. The existing useQuietThreadShell usage and conditional thread reference remain unchanged.

Changes: Git actions projection

Layer / File(s)Summary
Switch active-thread projection hook
apps/web/src/components/GitActionsControl.tsx
GitActionsControl imports and calls useQuietThreadProjection instead of useThreadProjection. The conditional thread reference remains unchanged.

Priority: External image Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Refactor

Possibly related PRs

  • pingdotgg/t3code#24055: Changes GitActionsControl to use useQuietThreadProjection for the same streamed-update re-render problem.

Suggested reviewers: maria-rcks

Merge Risk: External image Minimal · up to 67613

No actionable correctness or runtime risk is established for this change.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the performance change: the Git actions panel no longer re-renders during streamed updates. It uses a concise conventional-commit format.
Description checkPassedThe description explains the problem, the code change, and focused benchmark results. It is mostly complete, but it does not provide the required scope and approval information or UI before-and-after …
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, the code change, and focused benchmark results. It is mostly complete, but it does not provide the required scope and approval information or UI before-and-after screenshots.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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