Skip to content

fix: Partition Modal to use BasicTable component#9257

Merged
royendo merged 8 commits intomainfrom
royendo/partitions-basictable-search
Apr 20, 2026
Merged

fix: Partition Modal to use BasicTable component#9257
royendo merged 8 commits intomainfrom
royendo/partitions-basictable-search

Conversation

@royendo
Copy link
Copy Markdown
Contributor

@royendo royendo commented Apr 17, 2026

Migrates the model partitions table (used in Rill Developer and Rill Cloud) from a custom tanstack-table + virtualizer to the shared BasicTable component, and tightens the dialog overlay layout.

  • Adds a search input that filters across partition key, data, and error message.
  • Adds clickable-header sorting on Executed on (default desc), Elapsed time, and Watermark.
  • Fixes the dialog overlay: the table fills the dialog body via flex-1 min-h-0 overflow-auto instead of a fixed 600px height.
  • Auto-fetches all pages on open so search and sort cover the full set (the errored/pending server-side filter still limits the result set).
    https://www.loom.com/share/9d1ba05bf66e4336a1b290486e80cd49
Screenshot 2026-04-17 at 16 41 41

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

royendo and others added 7 commits April 17, 2026 16:25
Replaces the custom tanstack-table + virtualizer in `PartitionsTable`
with the shared `BasicTable` component, and updates the dialog hosts
(`ModelPartitionsDialog`, `PartitionsBrowser`) used by Rill Developer
and Rill Cloud.

- Adds a search input that filters across partition key, data, and error.
- Adds clickable-header sorting on Executed on (default desc), Elapsed
  time, and Watermark.
- Fixes the dialog overlay: the table fills the dialog body via flex
  sizing instead of a fixed 600px height.
- Auto-fetches all pages on open so search and sort cover the full set.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Enable header sorting on the `Data` column using each partition's
  `data.uri` value.
- Widen the actions column (`minmax(180px, auto)`) so the
  `Refresh partition` button is no longer clipped at the right border.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Fall back to `partition.key` when a partition has no `data.uri` (SQL-
  based partitions), so Data-column sort is deterministic for all
  partition types.
- Rewrite `PartitionsFilter` as a `DropdownMenu` with the same trigger
  styling (border, bg-input, caret) as the resources filters.
- Use the resources toolbar pattern in both partition dialogs: `large`
  `Search` input on the left in a `flex-1 min-w-0 min-h-9` wrapper, with
  the filter dropdown to the right.
- Give the dialog a fixed `h-[80vh]` instead of `max-h-[90vh]` so the
  overall modal no longer resizes while typing in the search box.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Swap `DropdownMenu.RadioItem` (filled-circle indicator) for
`DropdownMenu.CheckboxItem` (check indicator) to match the resources
filter visual pattern. Single-select semantics are preserved by
ignoring uncheck events — clicking an option sets it, clicking the
already-selected option is a no-op.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Watermark still renders with millisecond precision; `Executed on` now
shows seconds only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@royendo royendo changed the title Migrate model partitions table to BasicTable with search and sort fix: Partition Modal to use BasicTable component Apr 17, 2026
@royendo
Copy link
Copy Markdown
Contributor Author

royendo commented Apr 17, 2026

⏺ Code review results

Agents run: svelte-frontend-reviewer (✓), design-reviewer (failed — model access error), validators (failed — same). I
validated the Svelte findings manually against the source.

Findings after manual validation

All critical/warning findings from the reviewer were false positives. Keeping only what's actionable:

#: 1
Severity: Critical
File: PartitionsTable.svelte:40-42
Finding: "Infinite loop in auto-fetch"
Status: Rejected. TanStack Query's hasNextPage flips to false on the final page when the backend's getNextPageParam returns
undefined, terminating the loop. The reviewer's hypothetical "backend returns hasNextPage: true forever" is a backend bug,
not
a frontend one. Their proposed hasStartedFetching guard is actually buggy — it wouldn't reset on filter change, blocking
refetches.
────────────────────────────────────────
#: 2
Severity: Warning
File: PartitionsTable.svelte:70-115
Finding: "Stale resource captured in const columns"
Status: Rejected in practice. Both call sites (LocalProjectTables.svelte, ProjectTables.svelte) set selectedResource and toggle

the dialog open — the Dialog.Content unmounts its children on close, so PartitionsTable remounts with a fresh const capture
each time. No live resource-swap happens.

────────────────────────────────────────
#: 3
Severity: Warning
File: BasicTable.svelte:28-44
Finding: "Column ID resolution mismatch on Data column"
Status: Rejected. That init block only runs for the column with sortDescFirst: true — which is executedOn (uses accessorKey).
The Data column has no sortDescFirst, so the fallback branch isn't taken.
────────────────────────────────────────
#: 4
Severity: UX
File: PartitionsFilter.svelte:38-40
Finding: "Clicking already-selected item diverges visual from state"
Status: Rejected. DropdownMenu.CheckboxItem is controlled via the checked prop bound to selectedFilter === option.value. On
click, bits-ui fires onCheckedChange(false), our handler ignores it, and Svelte re-renders with checked still true — state
stays consistent.
────────────────────────────────────────
#: 5
Severity: Suggestion
File: PartitionsTable.svelte:47-56
Finding: "Filter IIFE recomputes on every keystroke"
Status: Keep as suggestion. Fast (<10 ms) at realistic partition counts; debouncing only matters at very large scale. Not
blocking.

Net: no blocking issues found. Ship it.

@royendo royendo requested a review from AdityaHegde April 17, 2026 20:59
@royendo royendo merged commit f2f96b7 into main Apr 20, 2026
11 checks passed
@royendo royendo deleted the royendo/partitions-basictable-search branch April 20, 2026 13:30
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