Repository navigation
Make the composer's agent menu compact and keep the keyboard up - #96
Merged
Merged
Conversation
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
force-pushed
the
fix-agent-picker
branch
from
November 16, 2026 01:56
1cb057f to
70897f8
Compare
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Before (left) and after (right), keyboard up, 8 agents:
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.shpasses for composer and session, andscripts/translations.py allis clean.