Skip to content

fix(app): keep the agent picker on touch devices - #62333

Open
patricksmms wants to merge 2 commits into
anomalyco:devfrom
patricksmms:agent-picker-mobile
Open

patricksmms wants to merge 2 commits into
anomalyco:devfrom
patricksmms:agent-picker-mobile

Conversation

@patricksmms

@patricksmms patricksmms commented Nov 6, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #62332

Type of change

  • Bug fix

What does this PR do?

The composer's agent picker was hidden on a phone whenever Settings → General → "Show agent" was off. That preference is per browser, so turning it on in the desktop app does not carry to the phone, and the agent-cycle keybind is unavailable on touch. A session left in Plan mode could not be switched back to Build.

On a coarse pointer with more than one primary agent, the picker now always shows. It also opens in the same bottom-sheet drawer as the model and variant pickers instead of a desktop popover.

How did you verify your code works?

  • bun run typecheck in packages/app.
  • New e2e test touch composer pickers › agent picker stays available when Show agent is off; it fails before the change.
  • The existing touch composer picker e2e tests still pass.

Visual

<svg width="240" height="72" viewBox="0 0 240 72" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="8" y="14" width="224" height="44" rx="10" stroke="currentColor" stroke-opacity=".3"/>
  <rect x="16" y="42" width="44" height="10" rx="5" fill="currentColor" opacity=".25"/>
  <rect x="68" y="42" width="70" height="10" rx="5" fill="currentColor" opacity=".25"/>
  <g>
    <rect x="16" y="42" width="44" height="10" rx="5" fill="currentColor"/>
    <animate attributeName="opacity" values="0;0;1;1;0" dur="4s" repeatCount="indefinite"/>
  </g>
  <g>
    <rect x="146" y="42" width="40" height="10" rx="5" fill="currentColor" opacity=".25"/>
    <animate attributeName="x" values="146;146;96;96;146" dur="4s" repeatCount="indefinite"/>
  </g>
</svg>

Screenshots / recordings

390×844, Show agent off, two primary agents.

Before After
Before After

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #57812, #50269, #59069

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced the bug on the base branch and the fix works. In a 390×844 touch viewport with Show agent off and two primary agents, the base composer has no agent picker and the new e2e test fails. With this change, the picker appears, opens in the bottom-sheet drawer and switches Build to Plan. All tests in mobile-model-pickers.spec.ts pass, as do the related unit tests and tsc -b in packages/app.

The public API is unchanged.

No blocking concerns. list() already leaves out subagents and hidden agents, so list().length > 1 only counts real choices, and the touch check matches the one in editor.tsx. One small note: the drawer itself is gated on (max-width: 767px), so a touch tablet wider than that now shows the picker as the desktop popover rather than the drawer. That is still usable.

Related: #57812, #50269, #59069

Before

After

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit only merges dev. This pull request's own changes are unchanged, and none of my earlier points were open. On the updated head, the touch composer picker e2e tests pass, including the new agent picker test, and tsc -b in packages/app passes. The public API is unchanged. No new concerns.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web: agent picker missing on mobile when Show agent is off

1 participant