Skip to content

fix/menu dialog focus and node tests - #142

Merged
aashu2006 merged 2 commits into
mainfrom
fix/menu-dialog-focus-and-node-tests
Sep 29, 2026
Merged

aashu2006 merged 2 commits into
mainfrom
fix/menu-dialog-focus-and-node-tests

Conversation

@aashu2006

@aashu2006 aashu2006 commented Sep 29, 2026 •

Copy link
Copy Markdown
Member
  • Close the card menu before opening the Share and Report dialogs
  • Make the tests pass on Node 25 and newer

Summary by CodeRabbit

  • Bug Fixes
    • Selecting Share from a prompt’s desktop menu now opens the share dialog and closes the menu.
    • Selecting Report now opens the report dialog for signed-in viewers and closes the menu. Viewers who aren’t signed in are still prompted to log in.

Both menu items called preventDefault, which tells Radix to keep the menu
open. It stayed behind the dialog, and closing the dialog left focus
nowhere with the page unclickable until the menu was dismissed. #115
fixed the same thing for Delete.

The menu assertion now includes hidden elements. An open dialog hides
everything else from the accessibility tree, so the old check passed even
while the menu was still open behind it.
Node 25+ has its own localStorage and sessionStorage globals that take
over from jsdom's. localStorage is undefined without --localstorage-file,
and neither is a jsdom Storage, so about 24 tests failed locally while CI,
on the .nvmrc version, passed. The test setup now swaps in an in-memory
Storage on those versions and leaves jsdom's alone everywhere else.
@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

So far, Strix has reviewed 14 pull requests across this workspace.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 536960e9-bd61-4598-bab8-010c22d07f65

📥 Commits

Reviewing files that changed from the base of the PR and between d036efb and 8a5f386.

📒 Files selected for processing (3)
  • src/components/prompts/PromptCard.test.tsx
  • src/components/prompts/PromptCard.tsx
  • src/test/setup.ts
 __________________________________________
< Duck and cover! I'm reviewing your code. >
 ------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@aashu2006
aashu2006 merged commit 3583d07 into main Sep 29, 2026
12 of 13 checks passed
@aashu2006
aashu2006 deleted the fix/menu-dialog-focus-and-node-tests branch September 29, 2026 14:11

This branch was successfully deployed

1 active deployment
Preview — 8a5f3860 Deployed Sep 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant