feat(tables): create and open views from chat - #6058
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Copilot & mothership: Adds write-gated Table UX: Renames the implicit state to Default view; auto-saves filter/sort on an active saved View for editors; lists Views alphabetically. Filter safety: Tests cover embedding, Views menu, resource open/resolve, Reviewed by Cursor Bugbot for commit b3fc19e. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@cursor @greptile-apps Please review the chat-created Table Views implementation, including permission boundaries, canonical filter/sort ID conversion, durable View resources, autosave behavior, and stale-column pruning. Flag any correctness, security, persistence, or regression issues before merge. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
Greptile SummaryAdds durable chat View resources that open the live source Table with a saved View selected.
Confidence Score: 5/5Safe to merge; the prior composite View id open failure is fixed and no remaining blocking issues were identified on that path. open_resource now parses persisted tableId:viewId values, looks up the canonical view id, rejects mismatched source tables, keeps workspace checks, and tests cover reopen and mismatch cases.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/tools/handlers/resources.ts | open_resource parses composite View ids, loads by canonical viewId, rejects table mismatch and cross-workspace sources, and returns tableId:viewId. |
| apps/sim/lib/copilot/resources/types.ts | Adds tableViewResourceId/parseTableViewResourceId and persists view as a chat resource type. |
| apps/sim/lib/copilot/tools/server/table/user-table.ts | Adds write-gated create_view with validation, naming, and resource emission for auto-open. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx | Embedded View selection, missing-view cleanup, and filter/sort auto-save on active Views. |
| apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/embedded-view-table/embedded-view-table.tsx | Parses composite resource ids and mounts the source Table with the saved View when views are enabled. |
Sequence Diagram
sequenceDiagram
participant Chat as Copilot chat
participant UT as user_table.create_view
participant OR as open_resource
participant UI as EmbeddedViewTable
participant T as Table (source)
Chat->>UT: create_view(tableId, filter, sort)
UT-->>Chat: view + resources[view, tableId:viewId]
Chat->>OR: "open type=view id=tableId:viewId"
OR->>OR: parse composite id, load view, check table/workspace
OR-->>Chat: resources[view, tableId:viewId]
Chat->>UI: render resource id
UI->>T: tableId + viewId embedded
Reviews (5): Last reviewed commit: "fix(tables): clear deleted embedded view..." | Re-trigger Greptile
|
@cursor @greptile-apps Please re-review the latest commit a7d12e5. The three reported findings are fixed with regression coverage: composite View reopen, create_view auto-opening the View resource, and synchronous embedded View ownership. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
|
@cursor @greptile-apps Please run a fresh review on a59c683. The latest Bugbot findings are addressed: View embeds now honor the resolved feature flag, and stale stable-column filter IDs are recursively pruned before query/autosave with regression coverage. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
|
@cursor @greptile-apps Please re-review acfef82. The three latest edge cases are fixed with focused coverage: disabled View resources fail closed, stale chat View IDs fall back without adopting another saved View, and empty model filters persist as null. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit acfef82. Configure here.
|
@cursor @greptile-apps Please re-review b3fc19e. It fixes the latest deleted-View embed finding by clearing inherited host state when the missing resource falls back to Default/All. Focused tests (97), Biome, and app TypeScript are green locally. |
|
You need to increase your spend limit or enable usage-based billing to run background agents. Go to Cursor |
|
Merge-readiness update for b3fc19e:
Companion catalog PR: simstudioai/mothership#378 (checks green, mergeable, awaiting the repository-required human approval). |

Summary
viewchat resources that reopen the live source Table with the saved View selecteduser_table.create_viewwith workspace validation, canonical column/option ID conversion, generated collision-free names, and automatic resource openingstagingBefore / after
Before: Chat could query Table rows, but an explicit “show me this filtered/sorted Table” request could not create a durable UI surface.
After: The same request creates a named View, opens it beside the conversation, persists it with the chat, and restores the live filtered Table on reload. Ordinary analytical questions continue using read-only
query_rows.Validation
e2e/.runsartifacts and two existingfit.fit()false positives; changed files are cleanCanonical Copilot contract
Manual demo
Notes