Skip to content

feat(app): build/plan mode toggle in v2 composer toolbar #237

Closed

Description

@dzianisv

Problem

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`

Agent-owned

Activity

  1. dzianisv commented on Jun 24, 2026

    @dzianisv
    OwnerAuthor

    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 — showBuildPlanToggle memo + Build/Plan segmented toggle in v2 toolbar before model selector
    • packages/app/e2e/utils/mock-server.ts — optional agents? field in MockServerConfig
    • packages/app/e2e/regression/prompt-mode-switch.spec.ts — 7 regression tests

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions