Skip to content
Source
Sign inSign up
TanStack/devtools

fix(devtools): preserve the resize separator tab stop #581

Openpcbeingused33(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/581/headopened View on GitHub

pcbeingused33(GitHub profile, opens in a new tab)commented

🎯 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. 🦋 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
      NameType
      @tanstack/devtoolsPatch
      @tanstack/angular-devtoolsPatch
      @tanstack/preact-devtoolsPatch
      @tanstack/react-devtoolsPatch
      @tanstack/solid-devtoolsPatch
      @tanstack/svelte-devtoolsPatch
      @tanstack/vue-devtoolsPatch
      @tanstack/devtools-example-angular-a11y-devtoolsPatch
      @tanstack/devtools-example-angular-basicPatch
      @tanstack/devtools-example-angular-panelPatch
      @tanstack/devtools-example-angular-with-devtoolsPatch

      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

    2. tanstack-source added labelsbug

    3. tanstack-sourceBotcommented Only here. This is not on GitHub.

      Ready to merge: every factory step passed on 800d348.

      • audit: clean

      TanStack Source bot

    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      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.md
      The 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 to 800d3

      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: Passed 4

      Check nameStatusExplanation
      Title checkPassedThe 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 checkPassedThe 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 checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck 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.

      Share

      Recent review info

      Run configuration

      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.md
      • 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
      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.