mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
Cap the config panel to available height, add menu keyboard navigation and drop the unreachable model fallback
This commit is contained in:
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({
|
||||
|
||||
Reference in new issue
Block a user