Skip to content

chore: Update Tanstack Tables to V9 - #239

Draft
hhvrc wants to merge 4 commits into
developfrom
feat/tanstack-table-v9
Draft

chore: Update Tanstack Tables to V9#239
hhvrc wants to merge 4 commits into
developfrom
feat/tanstack-table-v9

Conversation

@hhvrc

@hhvrc hhvrc commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@hhvrc hhvrc self-assigned this Aug 7, 2026
Copilot AI lite review requested due to automatic review settings August 7, 2026 13:47
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 29b57fbb-14e5-4b42-8b73-96b01402a85a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Copilot AI 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.

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-core with @tanstack/svelte-table v9 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

  • FlexRender is also invoked with {cell} here, but it should be given the column's cell renderer 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.

Comment on lines +85 to 89
<Table.Head colspan={header.colSpan}>
{#if !header.isPlaceholder}
<FlexRender
content={header.column.columnDef.header}
context={header.getContext()}
/>
<FlexRender {header} />
{/if}
</Table.Head>
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.

2 participants