fix(ui): prevent menu items from shrinking (#46353)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-08-31 16:00:55 +08:00
committed by GitHub
Unverified
parent 90fb6562ce
commit 0dad76e618
2 changed files with 8 additions and 1 deletions
@@ -126,6 +126,10 @@ for (const create of [false, true]) {
json: [
{ directory: canonical, strategy: null },
{ directory: "/projects/existing-worktree", strategy: "git" },
...Array.from({ length: 20 }, (_, index) => ({
directory: `/projects/worktree-${index}`,
strategy: "git",
})),
],
headers,
})
@@ -161,7 +165,9 @@ for (const create of [false, true]) {
await expect(page.getByText("Recover my worktree", { exact: true })).toBeVisible()
await expect(page.getByText("Session location unavailable", { exact: true })).toBeVisible()
listing.resolve()
await expect(page.getByRole("menuitem", { name: "existing-worktree", exact: true })).toBeVisible()
const existing = page.getByRole("menuitem", { name: "existing-worktree", exact: true })
await expect(existing).toBeVisible()
await expect(existing).toHaveCSS("height", "28px")
await page.keyboard.press("Escape")
await expect(page.getByRole("menu")).toHaveCount(0)
listing = Promise.withResolvers<void>()
+1
View File
@@ -51,6 +51,7 @@
box-sizing: border-box;
display: flex;
flex-shrink: 0;
flex-direction: row;
align-items: center;
gap: 8px;