Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 43 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@radix-ui/react-tooltip": "^1.2.8",
"@tabler/icons-react": "^3.36.0",
"@tanstack/react-query": "^5.90.12",
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-table": "^9.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ 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/null

Repository: 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 -n

Repository: 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:


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.

"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"json-server": "^1.0.0-beta.3",
Expand Down