feat(tables): saved views with filter, sort, and column presets - #5961
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview The table options bar gains a Views switcher, Columns show/hide menu (including workflow groups), and a Save / Save as view chip when live state diverges from the stored view. Active view is reflected in the URL ( Also bumps the CI Build App job timeout from 15 to 25 minutes. Reviewed by Cursor Bugbot for commit 14c2681. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds feature-flagged saved table views with persisted filter, sort, visibility, and column-layout presets.
Confidence Score: 3/5The PR is not yet safe to merge because completing an in-progress layout gesture after switching views can still resolve persistence against the destination view. The current grid binds the layout owner when a gesture completes rather than when it begins, leaving the previously reported cross-view persistence race reachable for resize, reorder, and pin interactions. Files Needing Attention: apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx | Coordinates saved-view selection, creation, explicit saves, and view-owned layout persistence. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx | Adds view-specific layout seeding, persistence routing, hidden-column rendering, and layout snapshot support. |
| apps/sim/hooks/use-table-undo.ts | Associates layout-bearing undo operations with their originating view and guards asynchronous layout application. |
| apps/sim/lib/table/views/service.ts | Implements validated saved-view persistence and patch-based configuration updates. |
| packages/db/migrations/0275_table_views.sql | Introduces the table_views persistence schema and supporting constraints. |
Sequence Diagram
sequenceDiagram
participant User
participant Table as Table UI
participant Grid as Table Grid
participant API as View API
participant DB as table_views
User->>Table: Select or create saved view
Table->>API: Load/create view config
API->>DB: Read/write config
DB-->>API: Saved view
API-->>Table: Filter, sort, visibility, layout
Table->>Grid: Apply active view config
User->>Grid: Change column layout
Grid->>Table: Persist layout patch with owner
Table->>API: PATCH configPatch
API->>DB: Merge layout fields
Reviews (34): Last reviewed commit: "merge: staging into feat/table-views; gr..." | Re-trigger Greptile
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b49a061. Configure here.
Route-count baseline conflict: staging moved to 984 on its own; merged truth with this branch's 2 view routes is 986, confirmed by running the audit.
|
@cursor review |
…ey-scope the load flush Merge housekeeping: table_views migration renumbered 0273 -> 0274 (staging shipped 0273_copilot_tool_permission_decision); route baseline 986 -> 992, confirmed by running the audit. Two review fixes on top: handlePersistLayout routed by activeView, which derives from the URL and lags a render after the resolve effect stamps an adopted or just-created view — a write in that gap fell through to shared metadata. It now routes by seededViewIdRef, the owner record itself, stamped synchronously. This also sends layout for a just-created view to that view before the list refetch resolves it. The load-window flush persisted a full readLayout() snapshot, carrying keys the user never touched (pins still unseeded while the slower detail query loads) over stored metadata. The buffer now records which KEYS were touched; values are still read live at flush, but only touched keys are written.
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 35187658 | Triggered | Username Password | c6acc62 | apps/desktop/src/main/browser-credentials/vault.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c6acc62. Configure here.
table_views migration renumbered 0274 -> 0275; staging shipped its own 0274 (file_folder_cutover_reconcile). Regenerated via drizzle-kit, chain verified.
…their owner Merge resolves the route baseline (staging dropped to 991; merged truth 993, confirmed by audit). Review fixes: routing layout by seededViewIdRef broke three ways, all because the ref updates in a PARENT effect while the grid writes from CHILD effects that run first. The grid now stamps every persist call with the owner it was displaying (viewLayoutKey at write time; async paths already capture at dispatch), so routing is independent of effect ordering: - A view switch's seed reconcile no longer lands on the outgoing owner — the write carries the incoming key. - A deep-linked view's first-load reconcile persists immediately instead of being buffered and dropped by adoption — an owner-stamped write is fully addressed regardless of resolve state. - The terminal views-error path no longer stamps seededViewIdRef, so a later successful refetch still runs first-resolve adoption (with localWork keep); a new ownerResolvedRef marks settle for the All-buffer instead. A create race now also ends on any navigation away, so a reconcile on the destination can't fall back to the still-pending created id.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7b1af41. Configure here.
The build outgrew the 15-minute cap over the last two days of merges: 10m02 (c6acc62), then 14m44 after the folders/desktop/library batch (adc557a, 16s under the limit), then two consecutive timeouts on 7b1af41 after the outlook merge. Staging's own latest runs show the same signature (one cancelled). GitHub labels a job timeout "cancelled", which is why these read as cancellations.
Summary
Columnsmenu to show/hide columns, with workflow outputs nested under their group (hiding all of a group's children drops its spanning header)table_viewstable; "All" is the absence of a view, so no backfill and the table is always reachable unfilteredtable-viewsfeature flag (UI only — routes and migration ship ungated so a view saved during rollout survives the flag being turned off)Type of Change
Testing
Tested manually.
bun run type-check,bun run lint, all 11 CI audits, andcheck:migrations origin/stagingpass. 29 unit tests across the views service, API contracts, and feature flags.Checklist