Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused fix to the existing optional Working-shelf classification, keeping threads with live background commands visible there while preserving inbox treatment for failures and user-action states. The change is self-contained and covered by targeted tests, with no schema, infrastructure, security, or default-setting impact. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe thread-working predicate now considers pending background tasks for inactive runtimes and excludes failed runtimes. Sidebar tests cover how command, monitor, subagent, and background-task rosters affect Working shelf classification. ChangesWorking shelf classification
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change keeps threads with pending background work in Working while preserving the existing exclusions. No supported defect remains that should block merging. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description covers the problem, change, cases, and verification. However, the Scope and approval section states that maintainer sign-off is missing, while the template requires explicit approval for this behavior change. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
b674ab8 to
2da72ef
Compare
When an agent leaves a background command running and ends its turn, the composer shows "Running: ..." with a Stop button. With the Working section beta on, that thread still drops into the inbox as if it were done. I hit this with a Claude thread that started a background Bash to wait out a lockout and then rerun QA. The agent was waiting on that command, but the thread looked finished.
The cause is
isThreadWorkinginpackages/client-runtime/src/state/threadInbox.ts. It only counts background work that parks the runtime atidle, and #14872 made commands stop parking it. Subagents, monitors, and other background tasks already land in Working. Commands do not.This PR makes
isThreadWorkingtreat any live background task as work. Web and mobile both call it, so one change covers both. Notifications, idle parking, and auto-settle keep the #14872 rule. A failed run, an approval, a question, or a ready plan still keeps the thread in the inbox.Trade-off: a dev server left running keeps its thread in Working until you stop it. The thread does return to the top of the inbox when the command ends.
Before / after
Same live thread (Claude Sonnet 5.5 ran
sleep 1800withrun_in_background, then ended its turn). Working section beta on. The only difference isthreadInbox.ts.While the turn is still running, the row is already in Working on both main and this PR. The difference is only what happens after the turn ends.
Mid-turn (same on main and this PR)
Cases
Verification
vp test run packages/client-runtime/src/state/threadInbox.test.ts apps/web/src/components/Sidebar.logic.test.ts: 146 passed. New cases cover each background kind (command, monitor, subagent, background_task) and a failed run with a live command.vpr typecheckpasses inpackages/client-runtime,apps/web, andapps/mobile.Not checked: the mobile Working section in a simulator. It calls the same function.
Approval
This changes how the Working section beta treats commands, which #14872 decided on purpose. I have not had maintainer sign-off on the direction. Discussion: #15433. If you'd rather keep commands out of the Working section, close this and I'll drop it.
Claude Opus 5.5 via Claude Code in T3 Code.