Skip to content

Make the composer's agent menu compact and keep the keyboard up - #96

Merged
Tarquinen merged 1 commit into
devfrom
fix-agent-picker
Nov 16, 2026
Merged

Tarquinen merged 1 commit into
devfrom
fix-agent-picker

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Switching agents in the composer no longer drops the keyboard, and the menu is a small list of names that opens just above the composer.

Agent switcher

  • The keyboard, draft and cursor stay put while you open the menu and pick an agent. Before, the menu took focus, so the keyboard hid and then came back after the pick, and the composer jumped twice
  • The menu is an OpenCode-style popover: the floating fill, a hairline border and small radii, sized to fit its names. It opens upward from the chip and never covers the session header. With many agents it scrolls
  • Rows show only the agent's name, with a thin checkmark on the current one, like the desktop's agent select. Rows are still at least 48 dp tall
  • It fades and scales in from the chip's corner, using only a fade under Reduce Motion
  • Back closes the menu first, and tapping the chip again closes it
  • The model picker is separate code (it opens in the keyboard's place) and is unchanged

Before (left) and after (right), keyboard up, 8 agents:

Agent menu before and after

Opening, picking and closing the menu:

agent-menu-open-close.mp4

Checked on the emulator against session-lab with 8 agents that have long descriptions, and with only Build and Plan, in light and dark at 2× font size: the keyboard stays up through opening, picking and Back, the draft and cursor are kept, the chip toggles the menu, and the pick applies. scripts/check.sh passes for composer and session, and scripts/translations.py all is clean.

The agent menu was a focusable Material DropdownMenu: opening it took
window focus and hid the keyboard, picking brought the keyboard back (the
composer jumped twice), and each row showed the agent's description, so a
few agents filled the screen and covered the session header.

The menu is now a small OpenCode-style popover: a non-focusable Popup
(PopupProperties(focusable = false)) so the keyboard, draft, cursor and
focus stay put, placed just above the composer with its names lined up
with the chip's. It uses the floating fill, hairline border and popover
radius from OpenCodeSurfaces, hugs its content (140-260 dp), caps its
height under the header and scrolls with many agents. Rows show only the
agent's name with a thin trailing checkmark on the current one, like the
desktop's agent select, at least 48 dp tall. It fades and scales in from
the chip's corner on Motion's micro roles (fade only under Reduce
Motion). An overlay-priority back callback closes it before the
keyboard, and tapping the chip again closes it. The "Agent" heading,
shortDescription and the composer_agent_section_title string are gone.
The session passes the composer's top edge (menuBottomInWindow) so the
menu sits above it. Picking still plays the selection haptic from
AgentPicked. The model picker is separate code (a panel in the
keyboard's place) and is unchanged.

Verified on the emulator against session-lab with 8 agents with long
descriptions and with only Build and Plan: keyboard stays up on open,
pick and back; draft and cursor kept; chip toggles; light and dark; font
scale 2.0. scripts/check.sh :feature:composer and :feature:session pass;
scripts/translations.py all is clean.
@Tarquinen Tarquinen changed the title Keep the keyboard up when switching agents Make the composer's agent menu compact and keep the keyboard up Nov 16, 2026
@Tarquinen
Tarquinen merged commit 05b78a8 into dev Nov 16, 2026
3 checks passed
@Tarquinen Tarquinen mentioned this pull request Nov 16, 2026

This branch was previously deployed

1 inactive deployment
release — 70897f81 Deployed Nov 16, 2026 by Tarquinen via check #329
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.

1 participant