Skip to content

fix(web): the desktop Actions menu scrolls instead of spilling out of its panel - #593

Merged
ibrahimroshdy merged 2 commits into
keptinventory:mainfrom
canblmz1:fix/action-menu-scroll-591
Nov 30, 2026
Merged

ibrahimroshdy merged 2 commits into
keptinventory:mainfrom
canblmz1:fix/action-menu-scroll-591

Conversation

@canblmz1

Copy link
Copy Markdown
Contributor

What and why

Closes #591.

On a thing's page, the desktop Actions menu could be taller than the room below its button. React Aria caps the popover's height to that room, but the popover had no overflow rule, so the menu kept its full height and its last items (Move to Trash on a box) were drawn outside the panel. The popover now scrolls (overflow-y-auto), as the Select and Combobox popovers already do. The phone's bottom sheet is unchanged.

e2e/action-menu.spec.ts opens the seed's Ramadan decorations box at 1280 × 600 on the household instance, checks that the panel ends inside the window, scrolls Move to Trash into view and checks it stays inside the panel. Without the change it fails (the item ends at 596 px, the panel at 588.5 px); with it, it passes.

Checks

  • bash scripts/ci-local.sh passes (or --fast, and say which steps you couldn't run): I didn't run the whole gate. I ran the new spec (KEPT_E2E_INSTANCES=household pnpm --filter @kept/web exec playwright test action-menu.spec.ts --project=desktop) against built server and web, with and without the change, plus biome check on both files and pnpm --filter @kept/web typecheck.
  • Tests first, on their own database; the leak test and route catalogue updated for a new table or route (no new table or route)
  • Migrations are additive (no migration)
  • New strings in every catalogue, Arabic in the house style; logical CSS; works at 375 px and 1280 (no new strings; the phone keeps its sheet)
  • Conventional commit messages; no AI attribution in commits or this description (D173)
  • The CLA signed (once, on your first pull request; see CONTRIBUTING.md)

… its panel

React Aria caps the popover's height at the room below the button, but the popover had no overflow rule, so a long menu (a box's) drew its last items outside the panel. The popover scrolls now, like the Select and Combobox popovers.

Closes keptinventory#591.
@canblmz1
canblmz1 requested a review from a team as a code owner November 28, 2026 16:41
@canblmz1

Copy link
Copy Markdown
Contributor Author

The red db-test (2) is src/imports/homebox/boxes.test.ts (purchases 11 vs 10). It fails the same way in the scheduled runs on main since 2026-11-27 (a21cba9, e.g. run 46252202416), so it is unrelated to this change; the e2e shards, including the new action-menu.spec.ts, pass.

@ibrahimroshdy
ibrahimroshdy merged commit f958260 into keptinventory:main Nov 30, 2026
21 checks passed
@ibrahimroshdy

Copy link
Copy Markdown
Collaborator

Thanks @canblmz1, merged. It ships in 1.14.9.

One small follow-up, if you'd like to take it: the test checks that the last item is reachable, but not that the menu overflows to begin with, so it would still pass if the window were tall enough to fit everything. A line like this before the scroll would pin it down:

expect(await panel.evaluate((el) => el.scrollHeight > el.clientHeight)).toBe(true);

@ibrahimroshdy ibrahimroshdy added this to the 1.14.9 milestone Nov 30, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actions menu on a thing: the last items spill out of the menu instead of scrolling

2 participants