Uh oh!
There was an error while loading. Please reload this page.
improvement(tables): centralize v2 application operations - #6414
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Coverage in this diff includes table detail (GET/PATCH/DELETE), columns, groups, query/list/find/row CRUD, column and row enrichment runs, cancel-runs, and exports create/status/download. Routes mostly Tests mock Reviewed by Cursor Bugbot for commit 1a6ad87. Bugbot is set up for automated code reviews on this repo. Configure here. |
TheodoreSpeaks
commented
Aug 8, 2026
@cursor review |
TheodoreSpeaks
commented
Aug 8, 2026
Greptile SummaryThe PR migrates the v2 tables API to centralized, Principal-authorized application operations while retaining authoritative workspace and resource checks.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/table/application/authorized-table-use-case.ts | Introduces the shared authorization wrapper that resolves canonical table context before executing semantic operations. |
| apps/sim/lib/table/application/authorization.ts | Defines table delegation and Principal authorization policy for the centralized application layer. |
| apps/sim/lib/table/application/operations.ts | Declares table operation identities and consistently separates read access from mutation access. |
| apps/sim/lib/table/application/groups.ts | Centralizes group mutations while preserving authoritative workflow-to-table workspace containment checks. |
| apps/sim/lib/api/server/routes/v2-json-route.ts | Supports centralized route presentation and preserves private, non-cacheable JSON responses. |
| apps/sim/lib/table/application/rows.ts | Consolidates authorized row operations, validation, bounded selection, and mutation behavior. |
| apps/sim/lib/table/application/imports.ts | Centralizes import lifecycle operations and their workspace-authorized resource handling. |
| apps/sim/lib/table/application/exports.ts | Centralizes export creation, status, cancellation, and download authorization. |
| apps/sim/lib/copilot/auth/table-delegation.ts | Adds scoped Principal delegation for trusted Copilot table operations. |
| packages/auth/src/principal.ts | Extends shared Principal modeling used by the centralized table authorization flow. |
Sequence Diagram
sequenceDiagram
participant Client as API Client
participant Route as Declarative v2 Route
participant Auth as API-key Authentication
participant Policy as Operation Authorization
participant UseCase as Table Application Use Case
participant Store as Table Services / Storage
Client->>Route: v2 table request
Route->>Auth: authenticate request
Auth-->>Route: Principal
Route->>Policy: authorize operation and resolve context
Policy->>Store: load authoritative table/workspace
Store-->>Policy: canonical context
Policy-->>UseCase: authorized Principal and context
UseCase->>Store: execute semantic operation
Store-->>UseCase: authoritative result
UseCase-->>Route: application result
Route-->>Client: validated v2 response
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/imp..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TheodoreSpeaks
commented
Aug 8, 2026
TheodoreSpeaks
commented
Aug 8, 2026
@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 910f133. Configure here.
…odex/v2-application-tables # Conflicts: # apps/sim/lib/api/server/routes/v2-json-route.ts # apps/sim/lib/folders/orchestration.ts # apps/sim/lib/uploads/upload-session/service.ts
TheodoreSpeaks
commented
Aug 8, 2026
TheodoreSpeaks
commented
Aug 8, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
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 1a6ad87. Configure here.
Summary
Type of Change
Testing
Checklist