You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(app): build/plan mode toggle in v2 composer toolbar #237
The v2 webapp composer has no visible way to switch between build mode (default: can edit files) and plan mode (read-only planning). Users must know the agent picker dropdown exists and that it's gated behind the `showCustomAgents` setting. The mode switch is effectively invisible.
Goal
A compact, always-visible Build / Plan segmented toggle sits in the v2 toolbar row, below the textarea, before the model and reasoning selectors. Clicking switches the active agent. Active mode shows elevated background; inactive shows muted text.
Acceptance Criteria
Toggle renders in v2 layout (`newLayoutDesigns: true`) when both build + plan agents are available
Toggle is absent when only one agent exists
Toggle is absent in v1 (legacy) layout
Clicking Plan sets `aria-pressed=true` on Plan button, `false` on Build
Clicking Build reverses
Toggle appears before `[data-action="prompt-model"]` in DOM order
Toggle is hidden in shell mode
E2e regression tests cover all above cases
Implementation
Commit `cc73c6a68` on `dev` — `packages/app/src/components/prompt-input.tsx`
Tests: `packages/app/e2e/regression/prompt-mode-switch.spec.ts`
Prod verifier: 7/7 e2e tests pass (see .tasks/237/verify.md). PROD: pass.
Review fixes (3182f65):showBuildPlanToggle now checks options (filtered) not available (raw), preventing hidden agents from rendering a mis-selecting toggle.
Activity
dzianisv commentedon Jun 24, 2026
Root cause: no always-visible UI element for switching build/plan modes; previous agent created wrong feature (shell toggle) on an unmerged branch.
Shipped in commits cc73c6a + 3182f65 on
dev.Changes:
packages/app/src/components/prompt-input.tsx—showBuildPlanTogglememo + Build/Plan segmented toggle in v2 toolbar before model selectorpackages/app/e2e/utils/mock-server.ts— optionalagents?field in MockServerConfigpackages/app/e2e/regression/prompt-mode-switch.spec.ts— 7 regression testsProd verifier: 7/7 e2e tests pass (see
.tasks/237/verify.md). PROD: pass.Review fixes (3182f65):
showBuildPlanTogglenow checksoptions(filtered) notavailable(raw), preventing hidden agents from rendering a mis-selecting toggle.