Repository navigation
fix: improve accessibility of entry actions trigger in document histo… - #755
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Keyboard-driven entry actions menu:
openUpdateEntryMenuindocs.spec.tsnow finds the trigger by itsEntry actionsaccessible name and opens it withfocus()+Enterinstead of a forced click, keeping thetoPassretry loop intact.
Both mechanisms this relies on check out in the current tree: the base-ui Menu.Trigger in components/shared/activity-pane.tsx carries the activityPane.actions aria-label, and base-ui supports keyboard activation (trigger-press with a KeyboardEvent). The trigger is only hidden via opacity-0 on desktop (focus-visible:opacity-100 reveals it, pointer-coarse:opacity-100 on phones), so focus() is a valid way in and opacity does not block focus.
ℹ️ Touch users still cannot reach row actions in the bottom-right of the pane
If the diagnosis in the PR description is correct, the overlap is also a real user-facing defect, not just a test problem: the activity pane sticks to the newest entry (scrollTop = scrollHeight) and its full-width rows put the actions trigger at the right edge, exactly where the global agent button is pinned on phones. The spec now bypasses that path entirely, so nothing exercises tapping the trigger on a touch viewport. Worth a separate follow-up rather than blocking this test fix.
Technical details
# Entry actions trigger overlapped by the floating agent button on phones
## Affected sites
- `apps/web/src/components/projects/ai-chat-float-global.tsx:276` — `fixed bottom-6 right-6 z-70 ... size-12`, so a 48px circle covers the bottom-right corner of every page, the docs activity pane included.
- `apps/web/src/components/shared/activity-pane.tsx:365` — the pane is `w-full` below `lg`, so its right edge is the viewport right edge; `activity-pane.tsx:752-757` renders the entry actions trigger flush right in each row.
- `apps/web/src/components/shared/activity-pane.tsx:247-252` — the pane scrolls to the newest entry, which puts the most recent row's trigger in the overlap region.
- `apps/e2e/tests/docs/docs.spec.ts:506-511` — the fixed spec opens the menu from the keyboard, so the touch/pointer path is no longer covered by any test.
## Required outcome
- On touch viewports, the entry actions trigger of every activity row must be tappable, including rows scrolled into the bottom-right corner.
- Keep at least one spec covering pointer activation for narrow viewports if the product fix lands (e.g. assert the trigger is the topmost hit target, or open it with a tap once the overlap is gone).
## Suggested approach (optional)
- Reserve space in the activity pane (or offset the float while the pane is open) so fixed overlay and row actions do not share the corner; alternatively move the float's anchor clear of the pane on mobile.
## Open questions for the human
- Is the overlay intended to stay above the activity pane on phones (it is z-70, above the pane), or should it hide while the activity pane is open?deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Summary
Fixes the mobile-safari failures of the
e2e-testsworkflow run 43576316503:tests/docs/docs.spec.ts› "User can view what changed in a document update" and "User can revert a document update" failed on all three attempts.Cause
openUpdateEntryMenuopened the "updated content" entry's options menu with a forced click. On the phone viewport the floating agent button sits over the right edge of that row, on top of the trigger. A forced click skips the check for what is on top, so it landed on the agent button, the menu never opened, andgetByRole('menuitem')was never found. The "Entry actions" aria-label added earlier was present in the run, so it was not the problem.Change
apps/e2e/tests/docs/docs.spec.ts: locate the trigger by its accessible name ("Entry actions"), focus it and press Enter, so opening the menu no longer depends on where the trigger is painted. The retry loop is kept.Testing