feat(tables): preview referenced rows inline - #7106
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryAdds inline previews for referenced table rows, backed by bounded table-name queries and on-demand schema and row loading.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/reference-row-preview.tsx | Implements the inline referenced-row preview and includes the completed normal-weight header fix. |
| apps/sim/hooks/queries/tables.ts | Adds bounded table-name and on-demand reference-row queries with refresh and local-mutation invalidation behavior consistent with the documented snapshot semantics. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx | Integrates reference-cell expansion and preview state into the virtualized table grid. |
| apps/sim/lib/table/application/bulk.ts | Batches reference-graph handling for explicit table deletion while preserving archive ordering and cycle rejection. |
| apps/sim/app/api/table/names/route.ts | Exposes the authenticated lightweight table-name projection through the standard internal route framework. |
Reviews (7): Last reviewed commit: "fix(tables): reject incomplete folder co..." | Re-trigger Greptile
There was a problem hiding this comment.
1 issue found and verified against the latest diff
Confidence score: 4/5
- In
cell-render.tsx, double-clicking a reference chip can also trigger the cell’s inline edit mode after opening the preview, creating conflicting interactions; stopdblclickpropagation on the chip to match URL cell behavior.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx:409">
P2: Double-clicking a reference chip still bubbles `dblclick` to the cell, so opening the preview can also enter inline edit mode. Stop double-click propagation on the chip, matching the URL cell behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
bc7186a to
e4ded13
Compare
e4ded13 to
a3d2126
Compare
a3d2126 to
5eef2b1
Compare
5eef2b1 to
2921222
Compare
2921222 to
2deec54
Compare
2deec54 to
1b145fe
Compare
1b145fe to
b4cbd5e
Compare
|
@cubic-dev-ai review this PR |
@j15z I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@j15z I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
3 issues found across 46 files
Confidence score: 2/5
- In
apps/sim/lib/table/application/bulk.ts,bulkDeleteFolderscan receive the request order when selected folders reference one another, causing a target folder to fail while its referrer is still active; resolve dependencies before issuing bulk deletions. - In
apps/sim/lib/folders/orchestration.ts, child-table archive conflicts can be reported as failures after folder rows are already stamped, leaving bulk-delete bookkeeping inconsistent; make the archive operation and failure state atomic or reconcile the recorded result. - In
apps/sim/lib/table/service.ts,listActiveTableNamesstill executes its reference query whenTABLE_REFERENCE_COLUMNSis disabled, so the feature flag does not fully disable that work; gate the query on the flag.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/table/application/bulk.ts">
<violation number="1" location="apps/sim/lib/table/application/bulk.ts:593">
P1: When selected folders reference each other and the target folder appears first, this branch passes request order to `bulkDeleteFolders`. The target folder fails while its referrer is still active, and the later successful referrer deletion never triggers a retry, leaving the bulk delete partially applied. Order folder cascades by the reference graph or retry folder reference failures after each dependency wave.</violation>
</file>
<file name="apps/sim/lib/folders/orchestration.ts">
<violation number="1" location="apps/sim/lib/folders/orchestration.ts:865">
P1: When child table archiving encounters a lock or reference conflict after the folder rows are stamped, this catch reports failure even though the folder is already archived. In bulk deletes, `bulkDeleteFolders` records that failure without retrying, leaving active tables under an archived folder; roll back the folder stamp or retry the cascade before returning the failure.</violation>
</file>
<file name="apps/sim/lib/table/service.ts">
<violation number="1" location="apps/sim/lib/table/service.ts:388">
P2: When `TABLE_REFERENCE_COLUMNS` is disabled, `listActiveTableNames` still queries and returns referenced table names. Gate this operation before executing the query so the flag disables the name query along with the chips and preview UI.</violation>
</file>
|
@cubic-dev-ai review this PR |
@j15z I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 47 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@j15z I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 47 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@j15z I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 47 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Re-trigger cubic
Summary
Reference cells display the target table name and open the referenced row inline. Table load fetches only the unique names needed by its Reference columns, and previews wait for their schema and row before appearing, so users do not see placeholder content flash.
Performance
The count is structural: the previous path performed one bulk preflight scan plus one scan per table. The new explicit-table phase shares one locked scan for the full selection.
Type of Change
Testing
bun run --cwd apps/sim type-checkbunx biome checkon the 7 files changed by the delete batching passbun run lint:check(26 tasks)bun run check:api-validation:strictbun run check:react-querybun run check:audits(45 audits)Checklist
Post-Deploy Monitoring & Validation
TABLE_REFERENCE_COLUMNSis disabled.TABLE_REFERENCE_COLUMNSfirst; roll back feat(tables): preview referenced rows inline #7106 if errors continue.