GeezerVison is showing github.com — fix(web,shared): show each background command once by tooooolong · Pull Request #39705 · pingdotgg/t3code
Conversation
tooooolong
commented
Nov 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
When a provider reports a background task ID that differs from the command's native tool call ID, the same running command appears twice in Background work — inflating the command count and splitting the command text/output onto a separate row. Each command should appear once with its command text and output attached to that row, and live foreground commands should not appear in the background list.
Change
Link provider tasks and turn items through nativeItemId (and itemId) across the three places that render background work for this bug:
- Shared projection (
packages/shared/src/orchestrationV2PendingBackgroundWork.ts): deduplicate roster tasks and turn-item-derived tasks when their nativeItemId or itemId matches.
- Foreground filtering (
apps/web/src/components/ChatView.logic.ts): exclude pending background tasks whose taskId, nativeItemId, or itemId matches an active foreground run item.
- Command detail lookup (
apps/web/src/components/chat/BackgroundWorkDetails.tsx): fall back to nativeItemId before taskId when attaching command text and output to a task row.
Scope
Small, directly reproducible display bug with no separate issue. Both packages/shared and apps/web changes are required so the deduplicated task row also resolves its foreground state and command output panel.
Verification
- Before/after browser reproduction: on upstream
main (e6e1ce70c8), a Chromium fixture with task ID session/task-9 and tool call ID call-9 rendered two "Run tests" rows. With this fix, it renders a single Waiting row with the pnpm test command and its output panel (stubbed to verify attachment to the matching turn item).
- Unit & browser regression tests: added cases covering a failed run with a still-running command, a live foreground command whose task and tool call IDs differ, and rendered command detail attachment.
- Checks: scoped repository checks passed (95 tests across 5 test files; typecheck across 36 packages).
Before and after
| Before |
After |
 |
 |
The fix was implemented with GPT-6.2 Astra (Max) in Codex through the T3 Code harness. GPT-6.2 Sol used the same harness to prepare this PR and add the Chromium regression test.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Match pending tasks to their native tool call or turn item so the same command does not appear twice and its details stay on the retained row.
coderabbitai
Bot
commented
Nov 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Background-task derivation now matches roster tasks, turn items, and live-run items using task IDs and item IDs. Display matching uses a task’s native item ID when available. Tests cover deduplication and rendered command output.
Changes: Background task identity matching
| Layer / File(s) |
Summary |
Merge roster and turn-item tasks packages/shared/src/orchestrationV2PendingBackgroundWork.ts, packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts |
Roster nativeItemId and itemId values prevent duplicate turn-item-derived tasks. Tests cover matching task IDs and distinct native tool-call IDs. |
Exclude live-run items from background tasks apps/web/src/components/ChatView.logic.ts, apps/web/src/components/ChatView.logic.test.ts |
Live-run item IDs are added to the foreground ID set. Pending tasks are excluded when their task, native item, or item ID matches a foreground ID. |
Match background tasks to displayed commands apps/web/src/components/chat/BackgroundWorkDetails.tsx, apps/web/src/components/chat/BackgroundWorkDetails.browser.test.tsx |
When task.itemId is undefined, command matching uses nativeItemId before taskId. The browser test checks the task heading and command output. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#29591: Adds the
nativeItemId link between a Claude background task and its originating tool call, which the web uses for matching.
- pingdotgg/t3code#26668: Maps Claude task IDs to tool-use IDs and uses
nativeItemId for background-task matching.
Suggested labels: bugfix
Suggested reviewers: juliusmarminge, yash-singh1
Merge Risk: Minimal · up to 98921
-
This change makes each background command show once when a provider reports separate task and native tool call IDs. The matching logic is narrowly scoped and covered by regression tests, so merge risk is minimal.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Title check |
 |
The title "fix(web,shared): show each background command once" follows conventional commit format and matches the main change: deduplicating background command rows when a provider task ID differs fro… |
| Description check |
 |
The description follows the template well. It has a Problem section with expected behavior and a reproduction environment (upstream main commit, Chromium fixture, task ID session/task-9 versus tool ca… |
Full details: Title check
-
Explanation
The title "fix(web,shared): show each background command once" follows conventional commit format and matches the main change: deduplicating background command rows when a provider task ID differs from the native tool call ID, and excluding live foreground commands from the background list. The scope covers both the web and shared packages, which the changeset touches.
Full details: Description check
-
Explanation
The description follows the template well. It has a Problem section with expected behavior and a reproduction environment (upstream main commit, Chromium fixture, task ID session/task-9 versus tool call ID call-9). The Change section explains the fix across shared and web packages and why both are needed. The Scope section states this is a small, directly reproducible display bug with no separate issue, which the template allows. The Verification section lists before/after browser reproduction, unit and browser regression tests, and check results, and it includes before/after images. It also ends with the model and harness used, as the template asks. One gap: the Scope section does not say whether a maintainer requested the PR, and the template asks for that only when one did. The description is mostly complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 3e961e0 and 989213b.
Files selected for processing: 2
-
apps/web/src/components/chat/BackgroundWorkDetails.browser.test.tsx
packages/shared/src/orchestrationV2PendingBackgroundWork.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tooooolong
changed the title
fix: show each background command once
fix(web,shared): show each background command once
Nov 23, 2026
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|