fix(devtools): preserve the resize separator tab stop #581
main fromrefs/pull/581/head·opened View on GitHub🎯 Changes#
Opening Devtools removed the resize separator's explicit tabindex="0" because the tabbing hook cleared tabindex from every panel descendant. The panel now uses inert while closed, which keeps the resize separator's tab stop intact and leaves the sibling trigger available to reopen the panel.
A workbench regression test checks the separator's tab stop after opening and verifies that closing makes the panel inert. All 53 workbench tests passed, and pnpm test:pr passed.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested code changes locally with
pnpm test:pr, or these tests do not apply to this pull request. - I fully understand the code in this pull request, including any code generated with AI assistance.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
AI assistance was used to draft the fix and regression test.
Summary by CodeRabbit#
- Bug Fixes
- Improved keyboard navigation in DevTools: the resize handle remains focusable while the panel is open, and the closed panel is removed from the tab order.
- The closed panel is now marked inactive for interaction, while it remains available when open.
- 1
tanstack-source added labelsbug
No actionable comments were generated in the recent review.
Walkthrough
-
DevTools now marks the panel inert when it is closed and removes the recursive tab-index management hook. A workbench test checks the resize handle’s focusability and the panel’s inert state when opening and closing the panel.
Changes: Panel Focus Handling
Layer / File(s) Summary Panel inert state and focus behavior
packages/devtools/src/components/main-panel.tsx,packages/devtools/src/devtools.tsx,packages/devtools/src/hooks/use-disable-tabbing.ts,packages/devtools/tests/workbench.test.tsx,.changeset/quiet-panels-focus.mdThe panel is inert when closed. DevTools no longer wires in the recursive tab-index management hook. The workbench test checks resize handle focusability and panel inert state across open and closed states. A changeset records the patch. Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- TanStack/devtools#580: Changes when the modal host is rendered and when the application dialog becomes inert. This also changes inert behavior for a DevTools surface.
Suggested reviewers:
alemtuzlak,ryansolid
Merge Risk:
Minimal · up to800d3-
This change keeps the resize separator keyboard-focusable after Devtools opens and removes the closed panel from the tab order. It is a small, test-covered fix and carries no identified merge risk.
Pre-merge checks:
4-
Check name Status Explanation Title check The title names the fix and the component (devtools) and states the main change: the resize separator keeps its tab stop. It matches the raw summary, which shows the separator staying keyboard-focusab… Description check The description follows the template sections: Changes, Checklist, and Release Impact. It explains the cause (the tabbing hook cleared tabindex from panel descendants) and the fix (inert while closed)… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Title check
-
Explanation
The title names the fix and the component (devtools) and states the main change: the resize separator keeps its tab stop. It matches the raw summary, which shows the separator staying keyboard-focusable and the tabbing hook being removed. The title is specific and follows the conventional-commit style.
Full details: Description check
-
Explanation
The description follows the template sections: Changes, Checklist, and Release Impact. It explains the cause (the tabbing hook cleared tabindex from panel descendants) and the fix (inert while closed). It also lists the regression test and the test results. The third checklist item is unchecked, which the template allows. The description does not state the changeset file for the release impact, but the summary shows one was added. The description is mostly complete.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: TanStack/devtools
- Branch: main
- File: .coderabbit.yaml
- Commit: 1ff6734
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
56c64591-bcdf-410b-a89d-6ccb68664ffa
Commits-
Reviewing files that changed from the base of the PR and between 1ff67341c1c28af3ce2ae3522e44064f08fea785 and 800d3487fc27e279409225bc39ef1de4b75d8673.
Files selected for processing: 5-
.changeset/quiet-panels-focus.mdpackages/devtools/src/components/main-panel.tsxpackages/devtools/src/devtools.tsxpackages/devtools/src/hooks/use-disable-tabbing.tspackages/devtools/tests/workbench.test.tsx
Files with no reviewable changes: 2-
- packages/devtools/src/devtools.tsx
- packages/devtools/src/hooks/use-disable-tabbing.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
-
-
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 800d3487fc27e279409225bc39ef1de4b75d8673
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR