Repository navigation
fix(client-runtime): recognise offline scratch projects - #26825
DanielJBurbridge wants to merge 2 commits into
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — Scratch projects remain recognizable through their existing marker when the environment’s scratch root is unavailable. This also changes their effective mobile new-task workspace default to local, requiring confirmation of that default behavior. You can add or adjust custom eligibility rules. Learn more. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Scratch recognition predicate and validation packages/client-runtime/src/state/projects.ts, packages/client-runtime/src/state/projects.test.ts |
isScratchProject accepts an optional isScratch: true flag and returns true when the flag is set or the non-null scratch root exactly matches the project path. Tests cover unavailable roots, exact matches, and nested paths. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related issues
- Issue 26445 concerns special handling for scratch settings. This change updates scratch recognition but does not implement the settings behavior.
- Issue 23757 concerns scratch identity in the project picker, grouping, and thread views. This change updates the shared recognition predicate, but does not add custom-name or icon rendering.
Suggested reviewers: macroscopeapp, maria-rcks, t3dotgg
Merge Risk: 
Minimal · previous review 9fed7
-
Offline scratch recognition improves without an identified merge-blocking issue.
Pre-merge checks: 
4
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.
|
Note Written by the verification rule applies to #26825 at capture the same project selector before and after disconnecting an environment with an already-loaded scratch project, on main and this head, and attach the before/after evidence with the focused test results before reconsideration. |
Problem
A disconnected environment’s scratch workspace appears as a numbered “No project” entry in the “New thread in…” selector, alongside the normal “No project” action.
Reproduction: connect a remote environment with a scratch project, let its projects load, then disconnect it and open the project selector. The selector passes no available scratch root while disconnected, so
isScratchProjectreturns false even though the loaded project hasisScratch: true.Change
Recognise the existing scratch marker before falling back to the configured path. Connection availability still controls where new scratch chats can start. No saved projects, chats or folders are changed.
The shared helper also serves web/desktop draft selection and mobile project selection. No wire contracts or provider code change.
Scope and approval
This is a small fix for an obvious classification bug: disconnection should not turn a known scratch workspace into an ordinary project. It uses existing identity data and adds no settings or workflow.
Verification
vp run check:changedwas attempted twice, including with reduced CPU threads, but stopped after sustained memory pressure. Its dependent-package type checks and unused-code checks remain incomplete; CI must establish those results.Model: GPT-6.1 Sol through the Codex harness in T3 Code.