Cap the config panel to available height, add menu keyboard navigation and drop the unreachable model fallback

This commit is contained in:
Chris Scott committed 2026-11-27 22:06:10 -05:00
1 parent c586bcb4ad
commit bc36df403f
3 files changed
+60 -14

No files matched your search

@@ -419,6 +419,24 @@ describe.each([
expect(screen.getByRole('menuitemcheckbox', { name: /Accept all permissions/ })).toBeInTheDocument()
})
it('moves focus between menu items with the keyboard and exposes named sections', async () => {
const { user } = await renderConfig(mobile, {
agents: [makeAgent({ id: 'build', mode: 'primary' })],
})
await openConfig(user)
expect(await screen.findByRole('group', { name: 'Session' })).toBeInTheDocument()
expect(screen.getByRole('group', { name: 'Agent' })).toBeInTheDocument()
const first = screen.getByRole('menuitem', { name: /Change agent: Build/ })
first.focus()
await user.keyboard('{ArrowDown}')
expect(screen.getByRole('menuitem', { name: /Change model/ })).toHaveFocus()
await user.keyboard('{End}')
expect(screen.getByRole('menuitem', { name: 'Attach image or PDF' })).toHaveFocus()
})
it('updates the trigger summary when cycling the agent through the handle', async () => {
const ref = createRef<PromptInputHandle>()
await renderPromptInput({