fixed: web(WalletModal): enable focus trap inside wallet selection modal - #577
Conversation
|
@GABRIELOFGOD Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe wallet modal now traps keyboard focus and restores focus to its trigger after closing. Wallet controls expose explicit semantics. End-to-end tests cover these interactions. Stellar wallet state initialization now reads uppercase persisted addresses and ChangesWallet modal accessibility
Wallet state restoration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant WalletModal
participant WalletTrigger
User->>WalletModal: Open wallet modal
User->>WalletModal: Press Tab or Shift+Tab
WalletModal->>WalletModal: Keep focus inside dialog
User->>WalletModal: Press Escape
WalletModal->>WalletTrigger: Restore focus to trigger
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Biome (2.5.6)apps/web/src/components/organisms/wallet-modal.tsxFile contains syntax errors that prevent linting: Line 136: Unexpected token. Did you mean apps/web/src/providers/StellarWalletProvider.tsxFile contains syntax errors that prevent linting: Line 122: Expected a statement but instead found ')'.; Line 462: expected Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/web/e2e/wallet-connection.spec.ts (1)
87-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftCover focus restoration after a successful connection.
This test closes with Escape before
connect()replaces the disconnected trigger. Add a mocked successful-connect flow that asserts focus lands on the newly mounted connected-wallet trigger after the modal auto-closes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/e2e/wallet-connection.spec.ts` around lines 87 - 106, Extend the wallet connection focus test around the existing Escape scenario to mock a successful connect flow, allowing connect() to replace the disconnected trigger and auto-close the modal. Assert that focus is restored to the newly mounted connected-wallet trigger after the successful connection, rather than only validating the pre-connection Escape behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/test-results/.last-run.json`:
- Around line 1-4: Remove the generated test-results/.last-run.json artifact
from the change, and update the repository ignore configuration to exclude
generated test-result files such as .last-run.json.
---
Nitpick comments:
In `@apps/web/e2e/wallet-connection.spec.ts`:
- Around line 87-106: Extend the wallet connection focus test around the
existing Escape scenario to mock a successful connect flow, allowing connect()
to replace the disconnected trigger and auto-close the modal. Assert that focus
is restored to the newly mounted connected-wallet trigger after the successful
connection, rather than only validating the pre-connection Escape behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9c836ead-b344-47e6-aa92-6e18382050a3
📒 Files selected for processing (4)
apps/web/e2e/wallet-connection.spec.tsapps/web/src/components/organisms/connect-button.tsxapps/web/src/components/organisms/wallet-modal.tsxapps/web/test-results/.last-run.json
|
New commit made |
|
dont forget to offramp using https://stellar.fundable.finance/offramp its fast, free and p2p rates |
2 similar comments
|
dont forget to offramp using https://stellar.fundable.finance/offramp its fast, free and p2p rates |
|
dont forget to offramp using https://stellar.fundable.finance/offramp its fast, free and p2p rates |
close #392
close #394
Summary by CodeRabbit
Summary by CodeRabbit
Accessibility
Style
Tests