Repository navigation
feat(clients): bring back Plan mode as a Labs opt-in - #1
SHAMALKRISHNA wants to merge 8 commits into
Conversation
|
This PR changes the test suite by +84 test cases (browser +31, unit +53, server 0). New browser test files: Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing. |
|
Note 🤖 Opus 5.5 responding on behalf of Sam Before/after screenshots and the verified checks for this PR are on one page (private; Sam can open it): https://claude.ai/artifact/MntMFcGJKaKJQQA6SUpJGz Upstream merged 5 PRs after this branch's base |
Independent review of the Plan mode restoration found nine bugs. Web: - An inline /plan or /default now sets the draft's mode, so the next message and a retry after a failed send keep it. - /plan typed over a shown approval is sent as that reply's text. - The slash menu no longer offers /plan or /default while an approval or question is showing, so a pick cannot erase the reply. - Implement in a new thread uses the source thread's runtime mode instead of the project default, which could drop its approvals. - Enter on an empty composer no longer implements the plan while Resume is the primary action, and the placeholder stops promising it. - A typed /plan or /default works with multiple models selected. Mobile: - Thread sends and resumes run in default mode unless Plan mode is on. - The /plan and /default menu entries need the opt-in and no pending approval. Both: provider /plan and /default entries are hidden while T3's are offered, because the send path would consume that text anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mobile: - /plan and /default stay literal, and the menu entries stay hidden, while a question or approval is pending. Answers typed in the question card were already literal; this covers the composer's own paths. - Work locally restarts a thread through a helper that applies the Plan mode opt-in instead of sending the stored mode. Web: - A standalone /plan or /default switches modes before the check for whether multiple models can start, since it starts nothing. A message on a draft that cannot start still stops at the warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sumes The server runs a turn in the thread's saved mode, so anything that reaches it without first saving the opted-in mode can run in plan. Mobile: - Outbox delivery resolves every queued message through the opt-in. With Plan mode off or not yet loaded, a message saved with no mode on a plan thread, and a message carrying plan, both go out in default. The drain reads the preference and passes it to each send. - Resuming a held queue saves the mode first. Web: - Resuming a held queue saves the mode first and keeps the thread's runtime mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A turn on an existing thread runs in the thread's saved mode, so these two sends could run in plan with the opt-in off. Web: - An app's message saves the composer's mode first. The thread's runtime mode is left alone, and a failed save stops the send. Web and mobile: - A side chat's first message saves default first, because the server's fork copies the source thread's mode. A failed save drops the side chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mobile outbox: - Nothing is sent or saved until preferences have loaded. - A failed preferences read used to look like "never opted in". The read now keeps the failure beside the value, so the two change together and a retry never passes through "opted out" on the way. - While the setting can't be read, a message that would run in plan waits in the queue with a note in its composer, and the read is retried. Changing Plan Mode in Settings releases it at once. Messages that run in default either way still send. Starting a run from a held queue or a guest message: - These start a run in the thread's saved mode without passing one. With the opt-in off, a plan thread is saved as default first, the same as resume and side chats. Web: queue Send now, guest Send. Mobile: queue Send now, Resume queue, guest Send. - On mobile, an unreadable setting refuses these with an alert, and so does the thread's resume action on a plan thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The map's comment ran into the comment above the drain flags, which read as one five-line comment and broke the comment-length lint rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rebase Upstream's new ComposerPrimaryActions and modelSelection tests predate the Plan mode props, and both sides of the rebase imported the same error type in the fake environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d29881e to
aa97859
Compare
|
Note 🤖 Opus 5.5 responding on behalf of Sam Rebased on upstream Checks on
|
Upstream pingdotgg#33131 removed Plan mode from the clients: the Build/Plan toggle,
/plan,/default, Shift+Tab, and the plan follow-up with "Implement in a new thread". The server still supports Plan mode, but people in the composer can't reach it.This brings it back as an opt-in: Settings → Labs → Plan mode, off by default. With it off, the clients behave like upstream
main./planand/default, Shift+Tab, queued sends and side chats keep the mode, and the plan follow-up offers Refine, Implement, and Implement in a new thread.main(e9e934bb). One extra commit wires the new props into tests added upstream since the rebase.Checks:
vp run check:changedpasses for format, lint, knip, typecheck (37 packages) and the react compiler. The test step had 39 files passing with 0 failed assertions; three browser files ran 0 tests because Vite re-optimized two dependencies partway through and reloaded. Those three pass on their own, and all 12 changed browser files pass together (58/58).Runtime (isolated dev server): on upstream
main,/plansays "No matching command". On this branch,/planswitches Build to Plan. It works with Replay (dev) and with OpenCode 2 on DeepSeek via OpenRouter; the plan agent planned and edited no files.Not reviewed by a second model yet. Merge not authorized.
Tracking: MYK-631.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XcrufoToQXAiwq9sFnSPYU