Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The run-stop subscription now waits until a new thread exists, preventing premature loading from hiding its first reply. Existing thread controls remain unchanged, and the reported Windows reproduction confirms replies appear without reloading. You can add or adjust custom eligibility rules. Learn more. |
cf48159 to
ab03ad4
Compare
The run-stop lookup loaded the draft's thread before it existed. The miss cached the thread as deleted, so the chat view never showed the reply. Wait for the thread shell before loading it.
ab03ad4 to
52b678f
Compare
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Gate run-stop atom reads apps/web/src/components/chat/useThreadLifecycle.tsx |
The hook reads the run-stop atom when both the active thread reference and shell are available. If either is unavailable, it uses NO_RUN_STOP_ATOM. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Possibly related issues
pingdotgg/t3code#27482— Reports an empty thread view after a snapshot request precedes thread creation. The PR changes a run-stop atom read that may cause an early lookup, but does not change cache or subscription handling.pingdotgg/t3code#27443— Reports a thread history request before server creation. The PR changes an early run-stop atom read, but does not change the reported deleted-state or subscription handling.pingdotgg/t3code#27527— Reports an empty new-thread view after a draft-time snapshot request. The PR gates the run-stop atom read on shell availability; the issue also describes a background-service setup.
Possibly related PRs
- pingdotgg/t3code#27522 — Changes the same
useThreadLifecyclerun-stop read to avoid requesting a reserved thread ID before the server lists it. - pingdotgg/t3code#25477 — Uses creation-gated thread detail lookup on mobile to avoid caching a missing thread before creation.
Suggested reviewers: juliusmarminge, macroscopeapp
Merge Risk: 
Minimal · previous review cf481
-
The change safely gates run-stop reads until the thread shell is available, so the first reply can appear without introducing a verified regression.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description includes all required sections: Problem, Change, Scope and approval, and Verification. It explains the reproduction, root cause, fix, approval rationale, verification steps, screenshots, checks run, limitations, and agent usage.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- 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.
|
Closing as a duplicate of #27522, which makes the same fix and adds a test. For the record, this isn't Windows-only. It came in with #27252: nightly |
Problem
On Windows desktop (0.1.6-nightly.20261030.3917), the first reply in a new thread never appears in the chat view. The sidebar updates and the turn completes, but the conversation shows only the user's message. Switching away and back shows "Send a message to start the conversation". Only a reload (Ctrl+R) or a restart shows the reply. Later messages in the same thread work. The reporter does not see this on macOS or Linux.
Change
useThreadLifecyclereadrunStopAtom(activeThreadRef)while the route was still a draft. That mounted the thread state for an id the server had not created yet. The bounded snapshot request returnedthread_not_found, somakeEnvironmentThreadStatemarked the thread deleted and parked its subscription. The resume cache kept that state after the thread was created.The run-stop lookup now waits for the thread shell, as
ChatViewalready does for its own detail reads throughresolveThreadDetailRef. For a server thread,activeThreadShellis never null, so the Stop control behaves the same once the thread exists.Scope and approval
This is a small, focused fix for an obvious bug, so I didn't open an issue first. It changes one guard in one hook, with no product-behavior change. A draft has no runs to stop, so the Stop control has nothing to show before the thread exists.
Verification
Tested on Windows 11 with
vp run dev(isolated home) and theReplay (dev)provider,Showcasescenario:threadBoundedSnapshotfailing withthread_not_foundabout 1.6s beforeorchestrationV2.dispatch.threadCreate. The turn completes (the sidebar shows the generated title), but the conversation shows only "go".(The Changes count in the after shot comes from an unrelated broken git index in my local checkout. The machine name is redacted.)
vp run check:changedpasses: format, lint, knip, typecheck and React compiler. No test was added. The fix is wiring in a hook with no existing test, and a ChatView browser test of the draft-to-thread handoff would need much more setup than the change. Happy to add one if you want it.Not checked: macOS and Linux. The cause looks platform-independent, so I don't know why it only shows up on Windows. It may depend on request timing.
Fixed with Claude Opus 5.5 in Claude Code.