fix(deps): update dependency @tanstack/react-table to v9 - #204
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe package manifest updates ChangesReact Table dependency update
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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. 🔧 ESLint
package.jsontypescript-eslint does not support TS 7.0. Oops! Something went wrong! :( ESLint: 10.8.0 Error: typescript-eslint does not support TS 7.0. 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
🤖 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 `@package.json`:
- Line 27: Revert the `@tanstack/react-table` dependency to a compatible v8
version, or migrate every consumer of useReactTable and row-model helpers to v9
by importing useLegacyTable from `@tanstack/react-table/legacy` or adopting the v9
tableFeatures/rowModels API. Ensure both table consumers use an API matching the
dependency version and preserve their existing table behavior.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0a50ebc5-df59-4045-a477-aea781eb99a9
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Lint Code Base
| "@tabler/icons-react": "^3.36.0", | ||
| "@tanstack/react-query": "^5.90.12", | ||
| "@tanstack/react-table": "^8.21.3", | ||
| "@tanstack/react-table": "^9.0.0", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Find all consumers of `@tanstack/react-table` that use v8-style APIs.
rg -n --type=ts --type=tsx -C3 "from ['\"]`@tanstack/react-table`['\"]" app 2>/dev/null
rg -n -C3 "useReactTable\(" app 2>/dev/nullRepository: SamuelIVX/MetricForge
Length of output: 1327
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package manifests =="
sed -n '1,80p' package.json | cat -n
echo
if [ -f package-lock.json ]; then
jq '.packages["node_modules/@tanstack/react-table"]? // null' package-lock.json 2>/dev/null || true
echo
rg -n '"`@tanstack/react-table`":|from "`@tanstack/react-table`"|from "' `@tanstack/react-table` app package.json package-lock.json 2>/dev/null | head -200
else
echo "no package-lock.json"
fi
echo
echo "== history_table imports and function =="
sed -n '1,120p' app/components/tables/history_table/table.tsx | cat -n
echo
echo "== task_table imports and function =="
sed -n '1,120p' app/components/tables/task_table/table.tsx | cat -nRepository: SamuelIVX/MetricForge
Length of output: 21723
🌐 Web query:
TanStack React Table v9 v8 migration useReactTable from @tanstack/react-table legacy stockFeatures useLegacyTable
💡 Result:
TanStack Table v9 was officially released as a stable version on August 4, 2026 [1][2]. This major release introduces a new architecture focused on performance and tree-shaking by requiring explicit configuration of features and row models, moving away from the "all-in-one" bundled approach of v8 [3][4][5]. For developers migrating from v8, TanStack provides a transition path using the useLegacyTable hook [3][4][5]. Legacy Migration (useLegacyTable) The useLegacyTable hook is a temporary compatibility layer that accepts the v8-style API while running v9 under the hood [3][4]. - Status: It is deprecated and intended only as a short-term migration aid [4][5]. - Trade-off: It includes all features by default, resulting in a larger bundle size compared to the standard v9 approach [4][5]. - Usage: It allows you to continue using v8-style get*RowModel() options instead of the new v9 rowModels configuration [4][6]. Recommended Migration Path (useTable) To fully utilize v9, you should migrate to the useTable hook [4][5]. - Features: You must explicitly declare required features using the tableFeatures() utility [3][7]. - stockFeatures: If you want to replicate v8 behavior (including all features) but with the modern v9 API, you can import and use stockFeatures [3][7]. - Row Models: Instead of get*RowModel() options, you configure row models via the rowModels option (e.g., createFilteredRowModel()) [3][8]. Key differences for your migration include: - Tree-shaking: Only import and register the specific features and row model functions your table actually uses [3][4][5]. - State Management: v9 introduces more granular state subscriptions (e.g., table.Subscribe) compared to the automatic full-state subscription of v8 [9][4][5]. - Reusable Configurations: useLegacyTable cannot be used with the new createTableHook pattern; you must migrate to the full v9 API to create reusable table configurations [4]. Plan to move away from useLegacyTable as soon as possible to take advantage of improved performance and reduced bundle sizes [4][5].
Citations:
- 1: https://github.com/TanStack/table/releases/tag/%40tanstack/react-table%409.0.0
- 2: release v9 TanStack/table#6512
- 3: https://tanstack.com/table/beta/docs/framework/react/guide/migrating
- 4: https://tanstack.com/table/beta/docs/framework/react/guide/use-legacy-table
- 5: https://tanstack.com/table/beta/docs/framework/react/reference/legacy/functions/useLegacyTable
- 6: https://tanstack.com/table/beta/docs/framework/react/examples/basic-use-legacy-table
- 7: https://tanstack.com/table/beta/docs/guide/features
- 8: https://github.com/TanStack/table/blob/alpha/docs/framework/react/guide/migrating.md
- 9: https://tanstack.com/table/alpha/docs/framework/react/guide/migrating
Remove the incompatible v9 table bump or migrate the consumers.
@tanstack/react-table is now ^9.0.0, but the app still imports useReactTable and row-model helpers from @tanstack/react-table and passes the v8 options object. TanStack Table v9 does not include these features by default. Add useLegacyTable at @tanstack/react-table/legacy, or update both table consumers to the v9 tableFeatures/rowModels API, before merging this change.
🤖 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 `@package.json` at line 27, Revert the `@tanstack/react-table` dependency to a
compatible v8 version, or migrate every consumer of useReactTable and row-model
helpers to v9 by importing useLegacyTable from `@tanstack/react-table/legacy` or
adopting the v9 tableFeatures/rowModels API. Ensure both table consumers use an
API matching the dependency version and preserve their existing table behavior.
This PR contains the following updates:
^8.21.3→^9.0.0Release Notes
TanStack/table (@tanstack/react-table)
v9.0.0Compare Source
Major Changes
2327f80- TanStack Table v9 stable release. See the "Migrating to V9" guide for your framework (e.g. React) for upgrade instructions.Patch Changes
2327f80]:Configuration
📅 Schedule: (in timezone America/New_York)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.