chore: Update Tanstack Tables to V9 - #239
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
openshock-app | e6fe8c0 | Commit Preview URL Branch Preview URL |
Aug 07 2026, 01:48 PM |
There was a problem hiding this comment.
Pull request overview
This PR migrates the app’s table implementation from TanStack Table v8 (@tanstack/table-core) to TanStack Svelte Table v9 (@tanstack/svelte-table), refactoring the shared table utilities/components and updating affected pages to the new v9 “features” model. It also replaces a few end-user tables with simpler list UIs where full table functionality isn’t needed.
Changes:
- Replace
@tanstack/table-corewith@tanstack/svelte-tablev9 and update lockfile. - Refactor shared table layer (
DataTableTemplate,SortButton,ColumnUtils) to v9 generics + feature-sets. - Update admin pages to pass per-table
features; convert sessions/tokens/logs to list-style UIs with empty states and action menus.
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/routes/(app)/shockers/logs/+page.svelte | Replaces DataTable with a scrollable list UI, adds sort selector + direction toggle, and empty state. |
| src/routes/(app)/settings/sessions/session-actions.svelte | New actions menu (copy ID / revoke) for session items. |
| src/routes/(app)/settings/sessions/+page.svelte | Replaces DataTable with list UI and relative-time labels driven by a timer tick. |
| src/routes/(app)/settings/api-tokens/token-actions.svelte | New actions UI for tokens (pause/resume, edit, copy ID, delete) with dialogs/tooltips. |
| src/routes/(app)/settings/api-tokens/+page.svelte | Replaces DataTable with list UI, empty state, and relative-time labels driven by a timer tick. |
| src/routes/(app)/admin/webhooks/data-table-features.ts | Adds v9 table feature-set configuration for client-side sorting. |
| src/routes/(app)/admin/webhooks/+page.svelte | Updates webhook table to v9 column builders and passes features into DataTable. |
| src/routes/(app)/admin/users/data-table-features.ts | Adds v9 table feature-set configuration for server-side sorting (manualSorting). |
| src/routes/(app)/admin/users/+page.svelte | Migrates users table to v9 sorting types/features and v9 column-def builders. |
| src/routes/(app)/admin/online-hubs/data-table-features.ts | Adds v9 feature-set configuration for client-side sorting. |
| src/routes/(app)/admin/online-hubs/columns.ts | Migrates online hubs column definitions to v9 column builder factory. |
| src/routes/(app)/admin/online-hubs/+page.svelte | Updates DataTable usage to v9 by passing features. |
| src/routes/(app)/admin/mail/data-table-features.ts | Adds v9 feature-set configuration for server-side sorting (manualSorting). |
| src/routes/(app)/admin/mail/+page.svelte | Migrates mail/outbox table to v9 column builder factory + features. |
| src/routes/(app)/admin/config/data-table-features.ts | Adds v9 feature-set configuration for client-side sorting. |
| src/routes/(app)/admin/config/+page.svelte | Migrates config table columns to v9 factory + passes features. |
| src/lib/utils/datetime.ts | Adds formatRelativeInstant helper for relative time labels with sentinel handling. |
| src/lib/components/Table/types.ts | Introduces SortableTableFeatures type constraint for tables requiring sorting APIs. |
| src/lib/components/Table/SortButton.svelte | Updates generics/types to v9 feature-mapped Column typing for sorting. |
| src/lib/components/Table/DataTableTemplate.svelte | Refactors core DataTable wrapper to v9 createTable + features and controlled/uncontrolled sorting. |
| src/lib/components/Table/ColumnUtils.ts | Refactors column builder utilities for v9 feature-typed ColumnDef and sort functions. |
| package.json | Swaps dependency to @tanstack/svelte-table v9. |
| pnpm-lock.yaml | Locks in @tanstack/svelte-table v9 and its dependencies; removes v8 table-core entry. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
src/lib/components/Table/DataTableTemplate.svelte:100
FlexRenderis also invoked with{cell}here, but it should be given the column'scellrenderer and the cell context (cell.getContext()). As written, this will not render the cell content correctly.
{#each row.getAllCells() as cell (cell.id)}
<Table.Cell>
<FlexRender {cell} />
</Table.Cell>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Table.Head colspan={header.colSpan}> | ||
| {#if !header.isPlaceholder} | ||
| <FlexRender | ||
| content={header.column.columnDef.header} | ||
| context={header.getContext()} | ||
| /> | ||
| <FlexRender {header} /> | ||
| {/if} | ||
| </Table.Head> |
No description provided.