Skip to content

hotfix: Fixes TableDevtoolsPanel rendering while using as a standalone component in TanStack Devtools - #6516

Open
riccardoperra wants to merge 3 commits into
mainfrom
fix/table-devtools-panel-open-default
Open

hotfix: Fixes TableDevtoolsPanel rendering while using as a standalone component in TanStack Devtools#6516
riccardoperra wants to merge 3 commits into
mainfrom
fix/table-devtools-panel-open-default

Conversation

@riccardoperra

@riccardoperra riccardoperra commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

This pull request implements a hotfix to ensure that the TableDevtoolsPanel renders as open by default when used as a standalone component across all supported frameworks in TanStack Devtools. The default value for the devtoolsOpen prop is changed from false to true, and new tests are added to verify this behavior. This update improves the developer experience by making the panel visible out-of-the-box unless explicitly closed.

Default open state for TableDevtoolsPanel:

  • Changed the default value of the devtoolsOpen prop from false to true in all framework-specific resolvePanelProps functions and component mounts, including Angular, React, Preact, Solid, and Vue implementations (TableDevtools.ts, ReactTableDevtools.tsx, PreactTableDevtools.tsx, VueTableDevtools.tsx, etc.). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

  • Updated the core TableDevtools component to treat devtoolsOpen as true by default if not provided.

Testing improvements:

  • Added tests in Angular and core packages to verify that the panel is open by default when used standalone, and that explicit closed state is preserved. [1] [2]

Documentation and release:

  • Added a changeset describing the hotfix and affected packages.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed standalone Table Devtools panels so they open by default across Angular, Preact, React, Solid, Vue, and core integrations.
    • Preserved the ability to explicitly keep Devtools closed.
    • Improved standalone panel lifecycle behavior, including proper table connection and cleanup.
  • Tests

    • Added coverage for default panel visibility and lifecycle handling.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The standalone table devtools panel now opens by default when devtoolsOpen is omitted. Framework adapters apply this default in development and production builds. Tests cover resolved props, subscriptions, and cleanup.

Changes

Table devtools panel behavior

Layer / File(s) Summary
Core panel contract and lifecycle
packages/table-devtools/src/TableDevtools.tsx, packages/table-devtools/tests/panel-lifecycle.test.tsx
devtoolsOpen is optional and defaults to true. The lifecycle test verifies subscription and cleanup for a standalone panel.
Framework adapter defaults and validation
packages/angular-table-devtools/..., packages/preact-table-devtools/..., packages/react-table-devtools/..., packages/solid-table-devtools/..., packages/vue-table-devtools/..., packages/angular-table-devtools/tests/panel-props.test.ts, .changeset/silent-planets-learn.md
All framework adapters default devtoolsOpen to true in development and production paths. Angular exports resolvePanelProps. Tests cover default and explicit closed states. The changeset records the patch release.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • TanStack/table#6474: Both changes cover TableDevtools open-state handling and lifecycle behavior.

Suggested reviewers: kevinvandy

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the standalone TableDevtoolsPanel rendering hotfix.
Description check ✅ Passed The description clearly explains the default-open change, test coverage, affected frameworks, and changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/table-devtools-panel-open-default

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

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

@nx-cloud

nx-cloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1db0e8a

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 4m 17s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 33s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-04 17:59:01 UTC

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

6 package(s) bumped directly, 12 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/angular-table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/preact-table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/react-table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/solid-table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/vue-table-devtools 9.0.0 → 9.0.1 Changeset
@tanstack/alpine-table 9.0.0 → 9.0.1 Dependent
@tanstack/angular-table 9.0.0 → 9.0.1 Dependent
@tanstack/ember-table 9.0.0 → 9.0.1 Dependent
@tanstack/lit-table 9.0.0 → 9.0.1 Dependent
@tanstack/match-sorter-utils 9.0.0 → 9.0.1 Dependent
@tanstack/octane-table 9.0.0 → 9.0.1 Dependent
@tanstack/preact-table 9.0.0 → 9.0.1 Dependent
@tanstack/react-table 9.0.0 → 9.0.1 Dependent
@tanstack/solid-table 9.0.0 → 9.0.1 Dependent
@tanstack/svelte-table 9.0.0 → 9.0.1 Dependent
@tanstack/table-core 9.0.0 → 9.0.1 Dependent
@tanstack/vue-table 9.0.0 → 9.0.1 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown
More templates

@tanstack/alpine-table

npm i https://pkg.pr.new/@tanstack/alpine-table@6516

@tanstack/angular-table

npm i https://pkg.pr.new/@tanstack/angular-table@6516

@tanstack/angular-table-devtools

npm i https://pkg.pr.new/@tanstack/angular-table-devtools@6516

@tanstack/ember-table

npm i https://pkg.pr.new/@tanstack/ember-table@6516

@tanstack/lit-table

npm i https://pkg.pr.new/@tanstack/lit-table@6516

@tanstack/match-sorter-utils

npm i https://pkg.pr.new/@tanstack/match-sorter-utils@6516

@tanstack/octane-table

npm i https://pkg.pr.new/@tanstack/octane-table@6516

@tanstack/preact-table

npm i https://pkg.pr.new/@tanstack/preact-table@6516

@tanstack/preact-table-devtools

npm i https://pkg.pr.new/@tanstack/preact-table-devtools@6516

@tanstack/react-table

npm i https://pkg.pr.new/@tanstack/react-table@6516

@tanstack/react-table-devtools

npm i https://pkg.pr.new/@tanstack/react-table-devtools@6516

@tanstack/solid-table

npm i https://pkg.pr.new/@tanstack/solid-table@6516

@tanstack/solid-table-devtools

npm i https://pkg.pr.new/@tanstack/solid-table-devtools@6516

@tanstack/svelte-table

npm i https://pkg.pr.new/@tanstack/svelte-table@6516

@tanstack/table-core

npm i https://pkg.pr.new/@tanstack/table-core@6516

@tanstack/table-devtools

npm i https://pkg.pr.new/@tanstack/table-devtools@6516

@tanstack/vue-table

npm i https://pkg.pr.new/@tanstack/vue-table@6516

@tanstack/vue-table-devtools

npm i https://pkg.pr.new/@tanstack/vue-table-devtools@6516

commit: c9d1495

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud is proposing a fix for your failed CI:

We removed the accidental export keyword from resolvePanelProps in packages/angular-table-devtools/src/production/TableDevtools.ts, which was introduced by the PR but has no external consumers (the new test correctly imports from the non-production src/TableDevtools.ts). This fixes the table:test:knip failure that reported the function as an unused export.

Tip

We verified this fix by re-running table:test:knip.

diff --git a/packages/angular-table-devtools/src/production/TableDevtools.ts b/packages/angular-table-devtools/src/production/TableDevtools.ts
index 6c7b911d..a4fb711a 100644
--- a/packages/angular-table-devtools/src/production/TableDevtools.ts
+++ b/packages/angular-table-devtools/src/production/TableDevtools.ts
@@ -3,7 +3,7 @@ import { TableDevtoolsCore } from '@tanstack/table-devtools/production'
 import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/angular'
 import type { TableDevtoolsAngularInit } from '../TableDevtools'
 
-export function resolvePanelProps(
+function resolvePanelProps(
   props?: TableDevtoolsAngularInit,
 ): DevtoolsPanelProps {
   return {

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally 94wk-NT8D

Apply fix locally with your editor ↗   View interactive diff ↗



🎓 Learn more about Self-Healing CI on nx.dev

@riccardoperra
riccardoperra marked this pull request as ready for review August 4, 2026 17:53

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
packages/table-devtools/tests/panel-lifecycle.test.tsx (1)

42-55: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert subscription cleanup during teardown.

This test verifies the initial subscription, but it does not verify unsubscribe. Destructure unsubscribe from createDevtoolsTable() and assert it after dispose() and target cleanup. Otherwise, a store-subscription leak can pass this lifecycle test.

Proposed test assertion
-    const { subscribe, table } = createDevtoolsTable()
+    const { subscribe, table, unsubscribe } = createDevtoolsTable()
     ...
     dispose()
     cleanupTarget?.()
+    expect(unsubscribe).toHaveBeenCalledTimes(1)
🤖 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 `@packages/table-devtools/tests/panel-lifecycle.test.tsx` around lines 42 - 55,
Update the standalone panel lifecycle test around createDevtoolsTable to also
destructure unsubscribe and assert it is called during teardown after dispose()
and cleanupTarget?.(). Keep the existing subscription assertion unchanged and
verify the store subscription is released.
packages/angular-table-devtools/src/TableDevtools.ts (1)

7-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep resolvePanelProps private.

Line 7 exports the helper, but the PR objective says resolvePanelProps should be private. The new test depends on that export. Remove the export and test TableDevtoolsPanel through its public API, or colocate the helper test, so this module does not expose an internal helper solely for testing.

Suggested change
-export function resolvePanelProps(
+function resolvePanelProps(
🤖 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 `@packages/angular-table-devtools/src/TableDevtools.ts` around lines 7 - 12,
Remove the export from resolvePanelProps so it remains private to the module.
Update tests to exercise TableDevtoolsPanel through its public API, or colocate
helper-specific coverage without exposing resolvePanelProps.
🤖 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.

Nitpick comments:
In `@packages/angular-table-devtools/src/TableDevtools.ts`:
- Around line 7-12: Remove the export from resolvePanelProps so it remains
private to the module. Update tests to exercise TableDevtoolsPanel through its
public API, or colocate helper-specific coverage without exposing
resolvePanelProps.

In `@packages/table-devtools/tests/panel-lifecycle.test.tsx`:
- Around line 42-55: Update the standalone panel lifecycle test around
createDevtoolsTable to also destructure unsubscribe and assert it is called
during teardown after dispose() and cleanupTarget?.(). Keep the existing
subscription assertion unchanged and verify the store subscription is released.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6140c351-cc0f-4225-89be-f79dbf7e1431

📥 Commits

Reviewing files that changed from the base of the PR and between 50feff8 and c9d1495.

📒 Files selected for processing (14)
  • .changeset/silent-planets-learn.md
  • packages/angular-table-devtools/src/TableDevtools.ts
  • packages/angular-table-devtools/src/production/TableDevtools.ts
  • packages/angular-table-devtools/tests/panel-props.test.ts
  • packages/preact-table-devtools/src/PreactTableDevtools.tsx
  • packages/preact-table-devtools/src/production/PreactTableDevtools.tsx
  • packages/react-table-devtools/src/ReactTableDevtools.tsx
  • packages/react-table-devtools/src/production/ReactTableDevtools.tsx
  • packages/solid-table-devtools/src/TableDevtools.tsx
  • packages/solid-table-devtools/src/production/TableDevtools.tsx
  • packages/table-devtools/src/TableDevtools.tsx
  • packages/table-devtools/tests/panel-lifecycle.test.tsx
  • packages/vue-table-devtools/src/VueTableDevtools.tsx
  • packages/vue-table-devtools/src/production/VueTableDevtools.tsx

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