Skip to content

fix(web): allow expanding duplicate tool call commands - #10981

Merged
Yash-Singh1 merged 1 commit into
mainfrom
t3code/fix-expanded-tool-calls
Sep 9, 2026
Merged

fix(web): allow expanding duplicate tool call commands#10981
Yash-Singh1 merged 1 commit into
mainfrom
t3code/fix-expanded-tool-calls

Conversation

@Yash-Singh1

@Yash-Singh1 Yash-Singh1 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

What Changed

  • Allow tool-call rows to expand when their command matches the visible preview text.
  • Simplify mobile glass surfaces by removing blur-target plumbing and using explicit fallback styles.
  • Remove the provider model bulk enable/disable control and its associated helper tests.

Why

Duplicate tool call commands could appear non-expandable when the visible label matched the command text. Expansion now depends on whether additional content is available, so duplicate commands remain inspectable.

The mobile glass cleanup reduces unnecessary blur-target complexity, while provider model settings retain their existing per-model controls.

Implemented with Codex (GPT-5).

UI Changes

Before/after screenshots are not included. This change affects web tool-call expansion and mobile/settings UI behavior.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Summary by CodeRabbit

  • Bug Fixes
    • Improved work-entry expansion in the chat timeline. Entries can now expand consistently when they include commands, details, changed files, or viewed images—even when the displayed label matches the command.
    • Updated label wrapping behavior to respond consistently to the entry’s expanded or collapsed state.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 9, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at ed019e2

Macroscope's review found this PR approvable — This is a small, self-contained web UI fix that re-enables expansion for duplicate tool-call commands and preserves the existing expansion rendering path. It affects only one component and introduces no schema, deployment, security, billing, or configuration changes.

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

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f3fdaeed-3071-4195-bac8-6982b8182d58

📥 Commits

Reviewing files that changed from the base of the PR and between e16b8b0 and ed019e2.

📒 Files selected for processing (1)
  • apps/web/src/components/chat/MessagesTimeline.tsx

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


📝 Walkthrough

Walkthrough

PlainWorkEntryRow now expands when expandable content exists, even when the command matches the visible label. Label wrapping now depends only on the expanded state.

Changes

Work entry expansion

Layer / File(s) Summary
Expansion detection and label rendering
apps/web/src/components/chat/MessagesTimeline.tsx
canExpand now checks raw command, trimmed command, detail, changed files, and viewed image data without comparing the command to the visible label. Label wrapping applies only when the row is expanded.

Priority: ⬇️ Low

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

Merge Risk: ⚪ Minimal · up to ed019

Work-entry rows with duplicate command previews can now expand whenever additional content is available, with no concrete current-head merge-blocking risk identified.

Suggested reviewers: t3dotgg, juliusmarminge, maria-rcks

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary fix: allowing duplicate tool-call commands to expand.
Description check ✅ Passed The description includes the required sections, explains the changes and rationale, and provides a checklist. It also identifies that UI screenshots are missing, but the overall description remains co…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/fix-expanded-tool-calls

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

@Yash-Singh1

Copy link
Copy Markdown
Collaborator Author

Generated by GPT-6-Astra

Before and after in the web client, replaying the same 75-line cat command with no output in an isolated environment. Same viewport and fixture; before uses the parent commit, after uses ed019e2.

Before: the entire command wraps into the timeline by default, with no expand/collapse control.

Before: command fills the timeline

After: the command stays on one truncated line with an expand control. Verified that clicking reveals the full script and collapsing restores the single-line row.

After: command stays collapsed and can be expanded

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.6 KiB +61 B (+0.4%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB +3 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +58 B (+0.9%) 7.8 KiB
Codex Live turn WebSocket decoded 57.0 KiB 57.0 KiB +44 B (+0.1%) 66.4 KiB
Codex Live turn messages 8 9 +1 (+12.5%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB −5 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB +2 B (+0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB −7 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 57.8 KiB 57.8 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 9 9 0 (0.0%) 21

Baseline: e16b8b0 · PR result: ed019e2 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@Yash-Singh1
Yash-Singh1 merged commit 50f918c into main Sep 9, 2026
21 checks passed
@Yash-Singh1
Yash-Singh1 deleted the t3code/fix-expanded-tool-calls branch September 9, 2026 21:26
@Yash-Singh1
Yash-Singh1 restored the t3code/fix-expanded-tool-calls branch September 9, 2026 21:26
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 10, 2026
## What's Changed
* fix(web): allow expanding duplicate tool call commands by @Yash-Singh1 in pingdotgg/t3code#10981
* fix(mobile): prevent Android chat rows overlapping during sync by @SunkenInTime in pingdotgg/t3code#10983
* fix(mobile): prevent text leaking through Android glass by @juliusmarminge in pingdotgg/t3code#10998
* feat(pull-requests): link multiple pull requests to threads by @juliusmarminge in pingdotgg/t3code#10839
* feat(search): find threads by linked pull request by @juliusmarminge in pingdotgg/t3code#10870
* feat(prs): navigate, merge and rebase GitHub stacks by @juliusmarminge in pingdotgg/t3code#10875
* fix(server): preserve recent PR reads across server restarts by @juliusmarminge in pingdotgg/t3code#11007
* feat(web): zoom and pan expanded images by @maria-rcks in pingdotgg/t3code#10869
* fix(ui): use available space for composer model names by @juliusmarminge in pingdotgg/t3code#11002


**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260909.1461...v0.0.41-nightly.20260910.1473

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260910.1473
aorwall added a commit to aorwall/t3code that referenced this pull request Sep 10, 2026
Merges `pingdotgg/t3code` `2a3035353..0f602b3` (16 commits) into the
fork.

- **Landed:** 283 files (`HEAD^1..HEAD`) against 277 in the upstream
range — `merge-stats.mjs` reports an exact 277/277 file match, so
nothing in the range was dropped and nothing extra came in. The six over
are three typecheck fixes and three fork docs, both listed below. Fork
delta 733 files (`HEAD^2..HEAD`).
- **Conflicts:** 6 files, all on one upstream feature (pingdotgg#10839, linking
several pull requests to a thread). Resolutions in
`docs/fork/upstream-merge-log.md`.
- **Sweep:** 13 owned-concern hits, all `infra/relay/**`
FCM/Android-push files under the decided-out `cloud-relay-connect`
concern. Inherited in tree, adopted by nothing.
- **Unsupported methods:** 0 ADD, 0 DROP — no
`packages/contracts/src/rpc.ts` edit needed.

## What upstream shipped

### Usable as-is against Moatless

Pure client work, no backend involvement — these are live the moment
this merges.

- **pingdotgg#11020** message copy buttons show on touch devices.
- **pingdotgg#11018** middle-click pastes in the terminal on Linux.
- **pingdotgg#10869** expanded images zoom and pan.
- **pingdotgg#11002** the composer uses the available space for model names.
- **pingdotgg#10981** duplicate tool-call commands can be expanded independently.
- **pingdotgg#10947** provider settings grow a bulk model toggle.
- **pingdotgg#10609** the PR list's diff counts return to the top right.
- **pingdotgg#11022** remote projects open in Zed
(`packages/contracts/src/editor.ts` plus the desktop shell — the fork
ships both).
- **pingdotgg#10998 / pingdotgg#10983 / pingdotgg#10964** three Android glass/overlap fixes in
`apps/mobile`.

### Unsupported in Moatless — needs backend implementation

- **pingdotgg#10839 — several pull requests per thread.** This is the substantive
decision in the merge. Upstream now carries `thread.pullRequests:
ThreadPullRequestLink[]`, `packages/shared/src/threadPullRequests.ts`,
and a `ThreadPullRequestBadgeControl` pill with its own `pull-requests`
stack tab. That is exactly the equivalent the fork's
`task-bound-pull-request` convergence entry said to re-home its `+N`
menu onto — but it cannot be re-homed yet: Moatless serves no
`pullRequests` array on a thread and does not advertise the new
`threadPullRequests` capability, so upstream's badge would resolve to
nothing and paint an empty pill over a working one. Taking `theirs`
would have silently deleted live fork behaviour.

**Resolution:** upstream's implementation landed whole, and the two
presentations are switched on `useSupportsMultiplePullRequests` —
upstream's badge and stack where the server advertises the capability,
the fork's binding-derived pill and `+N` menu where it does not.
Additive, no prop threading, and it re-homes itself the day the backend
advertises. `docs/fork/inventory.json` and `docs/fork/gaps.md` are
updated with the switch and with the exact deletion list for when that
happens.

**To close it:** serve `thread.pullRequests` on
`OrchestrationThread`/`OrchestrationThreadShell` from `task_bindings`,
and report `capabilities.threadPullRequests: true`.

- **pingdotgg#10870 — find threads by linked pull request.** Search terms come
off the same `thread.pullRequests` array, so sidebar and command-palette
search by PR number/URL match nothing here until the array is served.
Closes with pingdotgg#10839.

- **pingdotgg#10875 — navigate, merge and rebase GitHub stacks.** Adds two RPC
methods, `pullRequests.stack` and `pullRequests.linkedThreads`, which
the Moatless backend does not dispatch. Both are already covered by the
shared `PullRequestRpcError` union, so the client decodes the refusal
correctly and the stack UI stays inert — no contract change needed.
Implementing the two methods is what turns it on.

- **pingdotgg#10416 — Android agent notifications and ongoing activity.** Rides
FCM through `infra/relay`, which is part of the decided-out
`cloud-relay-connect` concern (being removed with Clerk). Inherited in
tree, not adopted.

### Backend behaviour worth reproducing in Moatless

- **pingdotgg#11007 — recent PR reads survive a server restart.** Upstream added
`apps/server/src/pullRequest/PullRequestReadCache.ts`, persisting which
pull requests a user has already read so a restart does not re-mark the
whole list unread. Moatless owns this surface itself, so nothing in this
repository holds it open — recorded so whoever touches the backend's PR
read state knows the answer exists upstream.

## Verification

`verify.mjs`, seven of eight green: `duplicate-adds`, `tripwires`,
`resolution-check`, `unsupported-methods`, `fmt:check`, `lint`,
`typecheck`.

`test` is red on `@t3tools/desktop` alone —
`scripts/browser-secret-native.test.mjs > bundled libsecret helper`
fails to compile because `libsecret-1` is not installed in this sandbox.
**Pre-existing environment gap, not merge-introduced:** it is already an
entry in `docs/fork/gaps.md`, and `git diff --name-only HEAD^1 HEAD |
grep browser-secret` is empty. 100 of 102 desktop files pass. Four
packages did not finish under `vp run -r test` (`@t3tools/mobile`, `t3`,
`@t3tools/web`, `t3code-relay`) and all four pass when run alone, which
is parallel load rather than the merge.

Three typecheck failures were fixed in the merge commit, all fork-only
web code that upstream's widened shared types reached:
`sandboxControl.placement.test.tsx` needed the two new `RightPanelTabs`
props, and `useSandboxAvailability.ts` / `useSandboxDetail.ts` needed
`isSuccess` threaded through now that `EnvironmentQueryView` carries it.

Nothing is unresolved.

---
Moatless task:
https://moatless.soaplabstest.com/tasks/db1b3cbe-4401-441b-bbec-6b0c725c93ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). 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