Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/app/component-tests/composer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ for (const direction of ["ltr", "rtl"]) {
await expect(
width < 768
? page
.getByRole("dialog", { name: "Choose model variant", exact: true })
.getByRole("dialog", { name: "Choose power", exact: true })
.getByRole("button", { name: "high", exact: true })
: page.getByRole("menuitemradio", { name: "high", exact: true }),
).toBeVisible()
Expand Down Expand Up @@ -774,6 +774,8 @@ story("keeps default thinking accessible by keyboard without composer hover", as
// Tab through Add, Agent, and Model to the visually hidden thinking trigger.
for (let count = 0; count < 4; count++) await page.keyboard.press("Tab")
await expect(control).toBeFocused()
// Screen readers announce the trigger by this name with the current value.
await expect(control).toHaveAccessibleName("Power: Default")
await expect(control).toHaveCSS("opacity", "1")
await page.keyboard.press("Enter")
await expect(control).toHaveAttribute("aria-expanded", "true")
Expand All @@ -789,6 +791,7 @@ story("keeps default thinking accessible by keyboard without composer hover", as
await expect(page.getByRole("menuitemradio", { name: "high", exact: true })).toBeFocused()
await page.keyboard.press("Enter")
await expect(control).toHaveText("high")
await expect(control).toHaveAccessibleName("Power: High")
await expect(control).toBeFocused()
await page.keyboard.press("Enter")
await expect(page.getByRole("menuitemradio", { name: "default", exact: true })).toBeFocused()
Expand All @@ -812,7 +815,7 @@ story.describe("mobile variant drawer", () => {
story(`closes and restores focus when dismissed ${moment} it starts opening`, async ({ mount, page }) => {
const component = await mount("opencode-composer-flow--model-and-variant")
const variant = component.locator('[data-action="composer-variant"]')
const drawer = page.getByRole("dialog", { name: "Choose model variant", exact: true })
const drawer = page.getByRole("dialog", { name: "Choose power", exact: true })
const high = drawer.getByRole("button", { name: "high", exact: true })

// Load the lazy drawer first so the dismissal below races only the drawer's own transition.
Expand Down
4 changes: 2 additions & 2 deletions packages/app/e2e/regression/mobile-model-pickers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for (const direction of ["ltr", "rtl"] as const) {
const variant = composer.locator('[data-action="composer-variant"]')
await expect(variant).toHaveText("balanced")
await variant.click()
const variants = page.getByRole("dialog", { name: "Choose model variant", exact: true })
const variants = page.getByRole("dialog", { name: "Choose power", exact: true })
await expect(variants.getByRole("button", { name: "balanced", exact: true })).toHaveAttribute(
"aria-pressed",
"true",
Expand Down Expand Up @@ -341,7 +341,7 @@ test.describe("touch composer pickers", () => {
const composer = page.locator('[data-component="composer"]')
const variant = composer.locator('[data-action="composer-variant"]')
await variant.tap()
const variants = page.getByRole("dialog", { name: "Choose model variant", exact: true })
const variants = page.getByRole("dialog", { name: "Choose power", exact: true })
await variants.getByRole("button", { name: "default", exact: true }).tap()
await expect(variants).toBeHidden()
await expect(variant).toHaveText("default")
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/runtime/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ export const dict = {
"command.agent.cycle.description": "Switch to the next agent",
"command.agent.cycle.reverse": "Cycle agent backwards",
"command.agent.cycle.reverse.description": "Switch to the previous agent",
"command.model.variant.cycle": "Cycle model variant",
"command.model.variant.cycle.description": "Switch to the next model variant",
"command.model.variant.cycle": "Cycle power",
"command.model.variant.cycle.description": "Switch to the next power level",
"command.prompt.mode.shell": "Shell",
"command.prompt.mode.normal": "Prompt",
"command.prompt.mode.toggle": "Toggle shell mode",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ const source = {
"ui.promptInput.shell": "Shell command",
"ui.promptInput.chooseAgent": "Choose agent",
"ui.promptInput.chooseModel": "Choose model",
"ui.promptInput.chooseVariant": "Choose model variant",
"ui.promptInput.chooseVariant": "Choose power",
"ui.promptInput.agentCurrent": "Agent: {{agent}}",
"ui.promptInput.variantCurrent": "Variant: {{variant}}",
"ui.promptInput.variantCurrent": "Power: {{variant}}",
"ui.promptInput.send": "Send",
"ui.promptInput.stop": "Stop",
"ui.promptInput.exitShell": "Exit",
Expand Down
Loading