Skip to content

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

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

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