Repository navigation
perf(web): collect active tool calls without array shifts - #18853
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 1 minute. View limit details
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped performance optimization that preserves the existing active-tool ordering and grouping while replacing quadratic array shifting with linear collection plus one reversal. The accompanying test covers the relevant long-group behavior, and no product defaults or static-analysis suppressions are changed. You can add or adjust custom eligibility rules. Learn more. |
## What's Changed * fix(server): apply confirmed Claude subagent outcomes by @Yash-Singh1 in pingdotgg/t3code#18778 * fix(mobile): Browser page no longer logs a duplicate key warning by @tris203 in pingdotgg/t3code#18776 * fix(web): a numeric q in the pull requests URL no longer crashes the page by @ScottN-PV in pingdotgg/t3code#18666 * fix(client): T3 Connect clients reconnect once a new tunnel is ready by @shivamhwp in pingdotgg/t3code#16554 * fix(web): leaving the home page while the app loads no longer bounces you to a new draft by @shivamhwp in pingdotgg/t3code#18672 * fix(mobile): attachment images no longer re-download on every reconnect by @shivamhwp in pingdotgg/t3code#18824 * fix(server): a migration id clash stops startup with a clear error instead of crash-looping by @shivamhwp in pingdotgg/t3code#15925 * fix(server): a thread with an event type from a newer build can still resync after a downgrade by @shivamhwp in pingdotgg/t3code#15937 * fix(server): Codex titles and branch names no longer start the user's MCP servers by @brycedbjork in pingdotgg/t3code#17058 * fix(server): Claude thinking before a tool call stays a collapsed Thought by @maria-rcks in pingdotgg/t3code#18887 * perf(server): cached branch PR lookups no longer start git processes by @SunkenInTime in pingdotgg/t3code#17063 * fix(web): compact merge buttons show when they need a second click by @TonybynMp4 in pingdotgg/t3code#18878 * fix(mobile): pull requests load from another environment when theirs is offline by @juliusmarminge in pingdotgg/t3code#18698 * perf(web): collect active tool calls without array shifts by @saphid in pingdotgg/t3code#18853 * fix(web): center the pace icon on the limit card's "left" label by @akash3444 in pingdotgg/t3code#18580 * fix(web): update everything includes npm-installed servers again by @ScottN-PV in pingdotgg/t3code#18709 * fix(server): review guides find Bitbucket heads reported by short hash by @ahilles107 in pingdotgg/t3code#18900 * fix(web): scheduled task model picker no longer shifts the dialog by @flamboh in pingdotgg/t3code#18940 * fix(ci): CodeRabbit reviews no longer request changes by @Yash-Singh1 in pingdotgg/t3code#18954 ## New Contributors * @brycedbjork made their first contribution in pingdotgg/t3code#17058 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261013.3042...v0.0.46-nightly.20261013.3053 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261013.3053
## What's Changed * fix(server): apply confirmed Claude subagent outcomes by @Yash-Singh1 in pingdotgg/t3code#18778 * fix(mobile): Browser page no longer logs a duplicate key warning by @tris203 in pingdotgg/t3code#18776 * fix(web): a numeric q in the pull requests URL no longer crashes the page by @ScottN-PV in pingdotgg/t3code#18666 * fix(client): T3 Connect clients reconnect once a new tunnel is ready by @shivamhwp in pingdotgg/t3code#16554 * fix(web): leaving the home page while the app loads no longer bounces you to a new draft by @shivamhwp in pingdotgg/t3code#18672 * fix(mobile): attachment images no longer re-download on every reconnect by @shivamhwp in pingdotgg/t3code#18824 * fix(server): a migration id clash stops startup with a clear error instead of crash-looping by @shivamhwp in pingdotgg/t3code#15925 * fix(server): a thread with an event type from a newer build can still resync after a downgrade by @shivamhwp in pingdotgg/t3code#15937 * fix(server): Codex titles and branch names no longer start the user's MCP servers by @brycedbjork in pingdotgg/t3code#17058 * fix(server): Claude thinking before a tool call stays a collapsed Thought by @maria-rcks in pingdotgg/t3code#18887 * perf(server): cached branch PR lookups no longer start git processes by @SunkenInTime in pingdotgg/t3code#17063 * fix(web): compact merge buttons show when they need a second click by @TonybynMp4 in pingdotgg/t3code#18878 * fix(mobile): pull requests load from another environment when theirs is offline by @juliusmarminge in pingdotgg/t3code#18698 * perf(web): collect active tool calls without array shifts by @saphid in pingdotgg/t3code#18853 * fix(web): center the pace icon on the limit card's "left" label by @akash3444 in pingdotgg/t3code#18580 * fix(web): update everything includes npm-installed servers again by @ScottN-PV in pingdotgg/t3code#18709 * fix(server): review guides find Bitbucket heads reported by short hash by @ahilles107 in pingdotgg/t3code#18900 * fix(web): scheduled task model picker no longer shifts the dialog by @flamboh in pingdotgg/t3code#18940 * fix(ci): CodeRabbit reviews no longer request changes by @Yash-Singh1 in pingdotgg/t3code#18954 ## New Contributors * @brycedbjork made their first contribution in pingdotgg/t3code#17058 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261013.3042...v0.0.46-nightly.20261013.3053 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261013.3053
* fix(gitlab): merge request details report their head commit (pingdotgg#18608) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * feat(server): rename built-in models from settings (pingdotgg#18840) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(web): Git actions follow the selected thread (pingdotgg#18862) * fix(desktop): preserve updater failure causes in diagnostics (pingdotgg#18864) * fix(web): attach dropped threads to pending answers (pingdotgg#18789) * fix(web): keep button text stable during press scaling (pingdotgg#18866) * fix(bitbucket): preserve PR head commits for review guides (pingdotgg#18402) * fix(server): return null for unresolved optional commands (pingdotgg#18871) * fix: show computer-use action titles and align app icons (pingdotgg#18865) * fix(server): apply confirmed Claude subagent outcomes (pingdotgg#18778) * fix(mobile): Browser page no longer logs a duplicate key warning (pingdotgg#18776) * fix(web): a numeric q in the pull requests URL no longer crashes the page (pingdotgg#18666) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(client): T3 Connect clients reconnect once a new tunnel is ready (pingdotgg#16554) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(web): leaving the home page while the app loads no longer bounces you to a new draft (pingdotgg#18672) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(mobile): attachment images no longer re-download on every reconnect (pingdotgg#18824) Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(server): a migration id clash stops startup with a clear error instead of crash-looping (pingdotgg#15925) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: PR Batch Tester <agent@local.test> * fix(server): a thread with an event type from a newer build can still resync after a downgrade (pingdotgg#15937) Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: PR Batch Tester <agent@local.test> * fix(server): Codex titles and branch names no longer start the user's MCP servers (pingdotgg#17058) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Yash Singh <saiansh2525@gmail.com> * fix(server): Claude thinking before a tool call stays a collapsed Thought (pingdotgg#18887) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> * perf(server): cached branch PR lookups no longer start git processes (pingdotgg#17063) * fix(web): compact merge buttons show when they need a second click (pingdotgg#18878) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(mobile): pull requests load from another environment when theirs is offline (pingdotgg#18698) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * perf(web): collect active tool calls without array shifts (pingdotgg#18853) Co-authored-by: SAPHID <saphid@users.noreply.github.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com> * fix(web): center the pace icon on the limit card's "left" label (pingdotgg#18580) * fix(web): update everything includes npm-installed servers again (pingdotgg#18709) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(server): review guides find Bitbucket heads reported by short hash (pingdotgg#18900) Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(web): scheduled task model picker no longer shifts the dialog (pingdotgg#18940) * fix(ci): CodeRabbit reviews no longer request changes (pingdotgg#18954) --------- Co-authored-by: Scott Norteman <snorteman@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: Yash Singh <saiansh2525@gmail.com> Co-authored-by: Paweł Mikołajczuk <pawel@mikolajczuk.in> Co-authored-by: Tristan Knight <admin@snappeh.com> Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com> Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Bryce Bjork <brycedbjork@gmail.com> Co-authored-by: maria <maria@kuuro.net> Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> Co-authored-by: Dara Adedeji <76637177+SunkenInTime@users.noreply.github.com> Co-authored-by: Antony <97451137+TonybynMp4@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Alex Southwell <saphid@gmail.com> Co-authored-by: SAPHID <saphid@users.noreply.github.com> Co-authored-by: GPT-6.1 Sol <noreply@openai.com> Co-authored-by: Akash Moradiya <64416825+akash3444@users.noreply.github.com> Co-authored-by: Pawel Mikolajczuk <pmikolajczuk@atlassian.com> Co-authored-by: oliver <97427849+flamboh@users.noreply.github.com>
Merges `pingdotgg/t3code` up to `6002c5c68c` (42 commits, base `5070a83a32`), using a merge commit. No open merge PR to stack on; this branches from `main` at `882bb0a638`. ## Resolution - **`package.json`** (conflict): dropped upstream's `tsc-rs` 0.6.0 bump (pingdotgg#19187). The fork removed `tsc-rs`, and the `tsc-rs` tripwire holds that. New path-policy entry: `root-package-json` (`decide`). - **`pnpm-lock.yaml`** (conflict, `theirs`): took upstream's copy. Its seven `tsc-rs@0.6.0` entries fail `minimumReleaseAge` before resolution can prune them, so I stripped them and let `install.mjs` re-derive the rest. The fork edges (`moatless-api`, `mermaid`) are back, and `verify --only lockfile` passes. - 14 other files that both sides touched merged without conflict. `duplicate-adds` and `resolution-check` are both clean. `FilePreviewPanel.tsx` (`decide`) took upstream's `threadRef` prop and kept both fork deltas. The two unlisted files now have `converged` entries: `terminal-drawer-open-in-editor` and `thread-shell-subtasks`. In `threadShell.ts`, upstream's `isChildRunLive` and the fork's listing filter merged together correctly. - File counts: 136 files landed, against 136 in the upstream range. The only differences are `package.json` (missing, because its one upstream change was the dropped bump) and `docs/fork/inventory.json` (extra, fork-only). The fork delta is 809 files. - **Script fix:** Moatless replaced its dispatch match arms with a `MethodTable` (moatless#1138). Because of that, `unsupported-methods.mjs` found no arms and exited 2. It now reads `.detached`/`.session`/`.stream` registrations and follows handlers passed by name. Result: ADD 0, DROP 0, KEEP 2 (`vcs.switchRef`, `git.preparePullRequestThread`), which matches `gaps.md`. ## Verification `verify.mjs`: these checks pass: duplicate-adds, tripwires, resolution-check, unsupported-methods (after the fix), lockfile, fmt, lint, typecheck, build. `test` fails. Each of the failing files also failed when run alone, and they are the same five files as in the 2026-10-13 merge, all caused by the sandbox: shared `AgentScope`, server `ServerBrowserPage` (no Playwright browser), `AcpAdapterV2`, `OrchestratorReplayFixtures`, and `OpenCodeServerLedger`. ## Usable as-is - Full-screen visual replies with zoom (pingdotgg#17561). Links inside HTML renders open the way chat links do (pingdotgg#18897). App shortcuts keep working after you click into an HTML render (pingdotgg#18898). - Touch-scrolling in terminal output (pingdotgg#11305). Fixed: answering a question reset the editor caret (pingdotgg#11337). Links in agent questions are now clickable (pingdotgg#19197). - Fixed: "Subagent needs input" stayed after the subagent finished (pingdotgg#18996). This is client-side and uses `activityRunStatus` with a fallback to `status`. - Slash skill search now works mid-message (pingdotgg#19107). Fixed: removing a project opened a new thread for it (pingdotgg#15864). Settings now warn when an environment silently drops a setting (pingdotgg#18334). - Smaller fixes: context handoff details use the available width (pingdotgg#19098), pace icon alignment (pingdotgg#18580), tool-call collection perf (pingdotgg#18853), git file paths keep whitespace in the contract schema (pingdotgg#12465), Android beta links (pingdotgg#18955). - Pending context-handoff preview when you pick a model (pingdotgg#18369). It is computed on the client from `server.providers` (`requiresNewThreadForModelChange`, `continuation.groupKey`). If Moatless does not report those fields, the preview shows a handoff on every provider switch. ## Unsupported in Moatless / needs implementation - Delegated tasks in separate worktrees (pingdotgg#19102): `isolation: "worktree"` on the orchestrator MCP `delegate_task`, and `workspaceStrategy` on the child-launch command. Moatless does not create worktrees (`FEATURES.worktreeSelection`). - These land behind flags that are already gated: scheduled-task dialog fix (pingdotgg#18940, `scheduledTasks`), PR merge/auto-merge button sizing (pingdotgg#18478, pingdotgg#19111, `pullRequestSurface`), remembering editor selections (pingdotgg#19078, `openInEditor`), device tool startup failures (pingdotgg#18502, `deviceHub`), npm "update everything" (pingdotgg#18709, `serverUpdateBanner`), clone folder names in the welcome wizard (pingdotgg#12474), Cmd+Enter create-project in the palette (pingdotgg#18901). - No new RPC methods (ADD 0). ## Backend behavior to consider reproducing in Moatless I added these to the "Runtime fixes upstream made to its own server" entry in `docs/fork/gaps.md`: - Worktree isolation for delegated tasks (pingdotgg#19102). - Snoozed threads still take queued automatic wakes (pingdotgg#19099). - Indexed failed-thread error lookup (pingdotgg#18628). - SQLite: no fsync on every commit, and planner stats collected on open (pingdotgg#19205, pingdotgg#18471). - Distinct CI checks with overlapping names (pingdotgg#19162). - Bitbucket short-hash heads in review guides (pingdotgg#18900). - Webhook template backtracking (pingdotgg#19160). - OpenCode timeout formatting (pingdotgg#12469). - Pi tool schemas and turn-start queueing (pingdotgg#18643, pingdotgg#18639). - Usage hubs without a host, and Antigravity accounts deduplicated (pingdotgg#11368, pingdotgg#19207). - Haiku 5.5 as the default for background text generation (pingdotgg#18781). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/db18f6dc-70c1-4d89-ada7-cd4b4f19a247
Problem
deriveMessagesTimelineRowscollects a running turn's contiguous tool and reasoning entries by scanning backward and callingactiveToolEntries.unshift(entry)for each one. Every unshift moves the whole array, so a group of N entries costs N(N−1)/2 moves, and the projection is rebuilt on every streamed tool update, even when the group is collapsed. The initial 75-row snapshot does not bound this, because live updates keep accumulating on the client.Change
Push during the backward scan, then reverse once. Same output, linear work.
Scope and approval
A two-line performance fix, so it uses the no-prior-issue exception.
Verification
Benchmark of the real projector (3 warmups, median of 7) (base, fixed). The complete serialized output is identical to
mainin all six cases:main→ PRmain→ PRNew
MessagesTimeline.active-tools.test.tslocks the behavior over 1,000 entries: chronological grouped entries, the latest call's label, the latest thought, and group anchoring when collapsed or expanded. 162 passed with the existing logic tests (log), rerun after rebasing on currentmain.vp lintandapps/webtypecheck: clean.Independent review by Claude Opus 5.5 (high) through T3 delegated tasks, two rounds: no defects.
Found by a GPT-6.1 Sol (high) audit and implemented by GPT-6.1 Sol (medium) in T3 Code. Reviewed by Claude Opus 5.5. Coordinated by Claude Opus 5.5 in Claude Code via T3 Code. Agent-authored, sponsored by Alex Southwell.
🤖 Generated with Claude Code