GeezerVison is showing github.com — fix(web,mobile): a settled thread says why it settled and how its PR ended by dominic-r · Pull Request #29869 · pingdotgg/t3code
Conversation
dominic-r
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
When a thread auto-settles because its pull request merged, the status line at the end of the thread says only "Settled 49m ago · Un-settle". The timeline above it usually ends on the PR watch's last update before the merge, for example "#128: checks passed" followed by the agent saying the merge queue will merge it next. Nothing on screen says the PR merged or why the thread settled, so it reads as if T3 Code settled a PR that was still queued. I unsettled six threads by hand for that reason before finding that every one of their PRs had merged.
Change
- Settles now record a reason on the thread record:
user, agent (MCP t3_thread_organize settle and settle-after-run), pull-request with merged or closed and the PR's number and URL, or inactive with the configured number of days. ThreadSettlementService.resolveAutoSettlementAt becomes resolveAutoSettlement and returns the reason with the time; thread.auto-settle and thread.settle take an optional reason, and a settle without one counts as the user's.
settleReason is optional on OrchestrationV2AppThread and the thread shell, so stored threads and events without it still decode. A reason a client cannot read decodes to null instead of failing the thread, the same way opens does. Shells send it only while the thread is settled.
settledThreadLabel in client-runtime builds the status line for web and mobile from the reason and the thread's current PR link:
- "Settled 49m ago: PR Persist composer drafts per thread and reuse hidden draft threads #128 merged" when the merge settled it. If the thread's current PR is a different one that also ended, the line names both.
- "Settled by you 5m ago", or "Settled by an agent · PR Add native context menu to delete threads #12 closed"
- "Settled after 3 idle days". An idle settle shows no time because its
settledAt is the last activity, days before the settle.
- "Settled 49m ago · PR Persist composer drafts per thread and reuse hidden draft threads #128 merged" for threads settled before this change. They have no reason, but the PR's merged or closed state is still shown.
- The "PR"/"MR" term comes from the URL of the pull request that settled the thread, so a GitLab cause reads "MR" even when the current link is on GitHub. When the cause and the current link are different pull requests with the same number, both name their repository, and their host when the repository names match too: "PR acme/api#12 merged · PR acme/web#12 merged".
- The timeline's watch notifications are unchanged. They were true when they were sent; the status line below them now says what happened afterwards.
- One sentence in the thread sidebar guide says where to see why a thread settled.
Scope and approval
No prior issue. This is meant as a focused fix for a misleading status: the line hid why the thread settled, and that led to wrong manual unsettles. The contract and server changes are only what's needed to know the reason, because the settle event didn't record one. If you would rather settle the wording or the reason field in a discussion first, I can rework it.
Verification
- Added cases to the existing tests:
- Settlement decisions now assert the reason for merged, closed and idle settles.
- The settlement worker dispatches the reason for a merged link and for an idle thread.
- Settle-after-run sends the agent reason.
- The orchestrator lifecycle test checks four things: auto-settle stores a merged reason and the shell carries it, a plain settle records the user, re-settling keeps the first reason, and an unsettled shell drops it.
- Shell decoding handles a missing, a valid and an unknown reason.
- A table covers the label for each reason, old threads without one, GitLab, a thread whose current PR is not the one it settled on, a GitLab cause with a current GitHub link, two repositories sharing a number, one repository and number on two hosts, a reason recorded without a URL, and open, merged and closed PRs.
- These tests and the repository's changed-file checks (format, lint, knip, typecheck, tests beside the changes, browser test included) pass.
- Ran the web dev build against a scratch database with one Replay thread. I marked it settled by a merged PR (Persist composer drafts per thread and reuse hidden draft threads #128 in a fictional repository) by editing its stored projection row, then captured the status line with the old and new web code:
| Before |
After |
 |
 |
What I couldn't check:
- I did not run the mobile app. The mobile banner calls the same label function with no time, so it should read "Settled: PR Persist composer drafts per thread and reuse hidden draft threads #128 merged", but I haven't seen it on a device.
- I did not watch a real PR merge auto-settle a thread end to end. The capture uses a hand-written projection row; the reason's path from the settlement worker through the orchestrator to the shell is covered by the tests above.
- Settled threads stop refreshing their PRs (existing, documented behavior). A thread someone settles by hand while its PR is still open keeps showing no merged state until it is unsettled.
Written by Claude Opus 5.5 (claude-opus-5-5) through the Claude Code harness in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ended
When a thread auto-settled because its pull request merged, the status
line said only "Settled 49m ago". The timeline above it often ends on
the PR watch's last update before the merge ("checks passed, the merge
queue merges it next"), so the thread looked settled while its PR was
still queued.
Settles now record a reason on the thread: the user, an agent, the pull
request merging or closing, or inactivity. The status line names it and
the current PR's terminal state, e.g. "Settled 49m ago: PR #128
merged". Threads settled before this keep loading and show only how
their PR ended. An idle settle shows no time, because its settledAt is
the last activity rather than the moment it settled.
Approvability
Verdict: Approved at c72e4f6
Macroscope's review found this PR approvable — Settled threads now explain why they settled and show their pull request’s final state. The change adds backward-compatible metadata and status labels without changing settlement rules or product defaults.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Use the following commands to manage reviews:
@coderabbitai resume to resume automatic reviews.
@coderabbitai review to trigger a single review.
Use the checkboxes below for quick actions:
- Resume reviews
- Trigger review
No actionable comments were generated in the recent review.
Walkthrough
-
Thread settlement now records structured reasons for manual, agent, pull-request, and inactivity settlements. Thread shells carry those reasons. Mobile and web status lines use them to describe settled threads.
Changes: Settlement reasons
| Layer / File(s) |
Summary |
Structured settlement decisions packages/contracts/src/orchestrationV2.ts, apps/server/src/orchestration-v2/ThreadSettlementService.ts, apps/server/src/orchestration-v2/*Settlement*.test.ts, apps/server/src/orchestration-v2/SubagentProjection.test.ts |
Contracts define settlement reason variants. Automatic settlement resolution returns a timestamp and reason, and dispatches both in the command. Tests cover structured decisions and settlement conditions. |
Reason persistence and shell projections apps/server/src/orchestration-v2/Orchestrator.ts, apps/server/src/orchestration-v2/ThreadManagementService.ts, apps/server/src/orchestration-v2/ProjectionStore.ts, apps/server/src/orchestration-v2/runtimeLayer.test.ts, apps/server/src/orchestration-v2/ThreadManagementService.test.ts, packages/client-runtime/src/state/models.ts, packages/client-runtime/src/state/threadCommands.ts, packages/contracts/src/orchestrationV2.test.ts |
Settlement commands record reasons. Repeated settlement preserves the existing reason, and shell projections expose a reason only for settled threads. Client thread shells and optimistic settlement updates include the reason. |
Settled-thread labels and display packages/client-runtime/src/state/threadSettled.ts, packages/client-runtime/src/state/threadSnoozed.test.ts, apps/mobile/src/features/threads/ThreadDetailScreen.tsx, apps/mobile/src/state/use-thread-selection.ts, apps/web/src/components/chat/useThreadLifecycle.tsx, docs/user/thread-sidebar.md |
settledThreadLabel formats settlement causes, optional times, and pull-request states. Mobile and web status lines use the label, and the documentation describes the displayed details. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant ThreadSettlementService
participant Orchestrator
participant ProjectionStore
participant EnvironmentThreadShell
participant settledThreadLabel
participant ThreadDetailScreen
participant useThreadLifecycle
ThreadSettlementService->>Orchestrator: Dispatch thread.auto-settle with settledAt and reason
Orchestrator->>ProjectionStore: Record settled state and reason
ProjectionStore->>EnvironmentThreadShell: Include reason in settled thread shell
EnvironmentThreadShell->>settledThreadLabel: Provide settleReason and pullRequests
settledThreadLabel->>ThreadDetailScreen: Return settled status label
settledThreadLabel->>useThreadLifecycle: Return settled status label
Loading
Possibly related issues
- pingdotgg/t3code#29897: This change records and displays the pull-request settlement reason, including whether the pull request merged or closed.
Possibly related PRs
- pingdotgg/t3code#24760: Both changes modify orchestration-v2 settlement scheduling and automatic-settlement flow.
- pingdotgg/t3code#26895: Both changes touch
ThreadManagementService.settleAfterRun and its settlement command contract.
- pingdotgg/t3code#29576: This change uses source-control terminology in the settled-thread pull-request labels.
Suggested reviewers: juliusmarminge, t3dotgg, maria-rcks
Merge Risk: Minimal · previous review 22b2b
-
No merge-blocking issue is established. A live pull-request merge remains useful follow-up validation.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title "fix(web,mobile): a settled thread says why it settled and how its PR ended" matches the main change. The diff adds settle reasons on the thread record and a client-runtime label (settledThr… |
| Description check |
 |
The description follows the template. It has Problem, Change, Scope and approval, and Verification sections, and it fills each one with specific content. Problem gives the expected behavior and a repr… |
| 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. |
Full details: Title check
-
Explanation
The title "fix(web,mobile): a settled thread says why it settled and how its PR ended" matches the main change. The diff adds settle reasons on the thread record and a client-runtime label (settledThreadLabel) that shows them in the web and mobile status line. The title uses a conventional commit prefix and a plain-language summary. It names the platforms and the PR-state aspect, which fits the changeset. It is concise and specific enough for a teammate scanning history.
Full details: Description check
-
Explanation
The description follows the template. It has Problem, Change, Scope and approval, and Verification sections, and it fills each one with specific content. Problem gives the expected behavior and a reproduction context. Change lists the server, contract, and client edits. Scope and approval explains that there is no prior issue and why the change is a focused fix. Verification lists the focused tests, a before/after web capture, and what was not checked. The description does not link a triaged issue or a maintainer approval. The template requires that for non-trivial changes, and the author's justification for a small fix may not meet that bar. The template's note about the agent harness is also satisfied (the description ends with the model and harness). Because the description is substantially complete, this is a pass, with a note that the scope justification should be reviewed.
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 afd135d and 22b2bf1.
Files selected for processing: 7
-
apps/server/src/orchestration-v2/Orchestrator.ts
apps/server/src/orchestration-v2/ProjectionStore.ts
apps/server/src/orchestration-v2/ThreadSettlementService.test.ts
apps/server/src/orchestration-v2/ThreadSettlementService.ts
apps/server/src/orchestration-v2/runtimeLayer.test.ts
docs/user/thread-sidebar.md
packages/client-runtime/src/state/threadSnoozed.test.ts
Files skipped from review as they are similar to previous changes: 1
-
- docs/user/thread-sidebar.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
left a comment
•
edited
Loading
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.
- Fix comments: Fix CodeRabbit comments on this PR
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.
The status line matched the settle reason to the thread's current pull
request link by state alone. With several merged links, the current
link can be a different pull request from the one whose merge settled
the thread, so the line credited the wrong number. The reason now
carries the number of the pull request the settlement service decided
on, and the line names it, adding the current link only when it is a
different one.
coderabbitai
Bot
left a comment
•
edited
Loading
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.
- Fix comments: Fix CodeRabbit comments on this PR
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.
…ository
A thread can link pull requests on more than one host or repository.
The settle reason carried only a number, so the status line took the
"PR"/"MR" term from the current link and could not tell two pull
requests with the same number apart. The reason now also records the
settling pull request's URL. The line takes the term from it, decides
whether the cause and the current link are the same pull request by
URL, and names both repositories when two different pull requests
share a number. Reasons recorded without a URL fall back to the
current link.
macroscopeapp[bot] reacted with eyes emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
left a comment
•
edited
Loading
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.
- Fix comments: Fix CodeRabbit comments on this PR
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.
coderabbitai
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
When the pull request that settled a thread and the thread's current
link share both repository and number but live on different hosts, the
status line printed them identically. It now prefixes each with its
host in that case.
coderabbitai
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
maria-rcks
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Note Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
tested exact head afd135d846e63df5e0bf298a01c1ca34684bc92c against github/main 61c3794c32 on linux. used separate worktrees, one background dev server at a time, isolated app-created state, repository playwright, and /usr/bin/google-chrome at 1440x1000. no mocks or projection edits.
- created a project pointing at the real checkout through the web client. real codex
gpt-6.1-sol turns completed on main and the pr head.
- main showed only "settled just now" after manual settlement. the pr showed "settled by you just now". the reason survived full navigation/reload.
- a real codex turn called the thread organizer to settle after its run. the client showed "settled by an agent just now" when it completed.
- the older settled thread from main loaded without a reason. un-settle removed the banner and returned the thread to the active sidebar. snooze and wake now also worked. another real provider turn completed afterwards.
- 162 focused existing tests passed on blacksmith: settlement decisions/worker, thread management, contracts, labels, and runtime lifecycle. the lifecycle name filter excluded 50 unrelated cases. existing ci reported 28 successful checks, none failing or pending.
before, main:

after, same prompt and response on the pr:

real codex agent settlement:

un-settle interaction, 4.8 seconds; uploaded playback and seeking checked:

runtime command transcript
Not verified
the central live pr merge/close auto-settlement path remains unverified end to end. creating a new terminal pr event would require touching another pr or merging/closing this one, both prohibited by this verification brief. its existing worker and lifecycle tests passed, but those are not live integration proof. the original merged-pr scenario was therefore not reproduced on main.
also unverified: real days-long inactivity settlement; native ios/android and desktop shells; gitlab/enterprise and multiple-pr identities through live services; remote, relay, and tunnel connections.
no code changes, commits, or pushes were needed for the behaviors exercised here. this is partial runtime verification, not proof of every settlement path.
Merged current main
Note Written by claude-opus-5-5 on behalf of Maria
merged github/main c52df24d28 into the head with a merge commit (af7d829ffe), no rebase. two conflicts:
useThreadLifecycle.tsx: kept main's limitRecoveryHoldsSnooze guard on the snoozed line and this pr's settledThreadLabel on the settled line.
ProjectionSettlement.test.ts: kept main's new isSnoozed import and this pr's resolveAutoSettlement rename.
vp run check:changed passed on blacksmith (format, lint, knip, typecheck, 347 tests), and all 28 ci checks are green on af7d829ffe. the merged status line was not re-captured in a browser.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Claude Opus 5.5 responding on behalf of Dominic
Merged the latest main in 882a740. The branch is no longer conflicting.
There were two conflicts, both in apps/server/src/orchestration-v2/ThreadManagementService.ts and its test. Main rewrote settleAfterRun. It now re-checks for follow-up runs, waits on run.updated events, and guards the settle with expectedLatestRunId. This PR had added reason: { type: "agent" } to the old dispatch. I kept main's version and added the agent reason to its new thread.settle dispatch. In the test I kept main's race cases. The dispatch mock now records whole commands, so the final assertion checks for the agent reason again. All of main's other changes to settlement, the projection store and the mobile thread screen merged on their own. No other code dispatches thread.settle without a reason.
Checks: check:changed passed on the 19 files this PR changes against main. That covers format, lint, knip, the GraphQL check, typecheck of 36 packages, the 14 test files next to the changes (including the useThreadLifecycle browser test) and the React Compiler check. The seven test files this PR edits also pass when run on their own.
|
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.
Assignees
No one assigned
Labels
bugfix
Fix PR opened by an issue lead; enters the PR loop
size:L
100-499 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.
|