dashboard: restore focus when the Command Palette closes over an open modal (excluded from #9198)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- accessibility, frontend
Research direction
Start by tracing how the dashboard Command Palette opens and closes, how modal focus traps are managed, and where overlay tests cover keyboard behavior. Add coverage for opening the palette over New Session, restoring focus on close, and keeping Tab inside the modal; the issue also calls for an owner-path check. Done means all three close methods restore focus, with a fallback to the topmost modal when the original element is gone.
Written by the indexing model from the issue text.
Description
Context
This is excluded from #9198 and PR #9205, which harden the overlay-roster test guard and change only tests. The full review of #9205 classified it as a product change, so it is tracked here instead of being folded into a test-only PR. The behaviour predates #9196.
Description
When the Command Palette opens over a still-open modal (for example New Session) and then closes, focus is not returned to the element in the modal that held it before the palette opened. Since #9196 the palette is topmost, so Escape correctly closes only the palette. Focus after that close is not managed, though. A keyboard user can lose their place in the modal, and focus may land outside the modal's focus trap.
Acceptance Criteria
- Closing the palette, by Escape, by selecting an action or by clicking outside, restores focus to the element that had it when the palette opened, when that element is still in the DOM. When it is not, focus goes to the topmost open modal's first focusable element.
- Focus stays inside the topmost modal's trap after the palette closes.
- A test covers palette-over-modal: focus is restored and Tab stays inside the modal. A mutation that removes the restore turns it red.
- An owner-path check on the dashboard: open New Session, focus a field, open the palette, press Escape, and confirm the same field has focus.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 333
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blamechris/chroxy
-
from-review tech-debt testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
blamechris/chroxy#9520 ·
Maintainers usually reply within 1 day
-
priority: low server
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9340 ·
Maintainers usually reply within 1 day
-
documentation from-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
blamechris/chroxy#9237 ·
Maintainers usually reply within 1 day
-
agent-control client: notify() docstring should say the outbound gate applies only in principal modeOpenenhancement from-review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
blamechris/chroxy#9227 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9108 ·
Maintainers usually reply within 1 day
All issues in blamechris/chroxy
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Use one constant for the 10,000-character input limitPossibly taken @NginxL claimed this today. Opengood first issue refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aniru-dh21/snap-validate#51 ·
Maintainers usually reply within 1 day
-
Documentation pleaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area/host bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Fei2411/DeepSeek-Bot#3190 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days