feat(tables): GA table_v2 and mark the v1 Table block legacy - #7329
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
fe2c6df to
085688b
Compare
Greptile SummaryThe PR makes
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/blocks/table.ts | Marks the v1 Table block legacy while preserving its registered runtime and trigger configuration; the prior documentation-comment issue is fixed. |
| apps/sim/blocks/blocks/table_v2.ts | Removes the preview gate for GA and includes ncontains in the operator description. |
| apps/docs/content/docs/integrations/table.mdx | Moves the reference to v2 predicate, ordering, projection, and cursor-pagination contracts; the prior ncontains omission is fixed. |
| apps/sim/blocks/utils.ts | Classifies only the current Table version as a built-in tool type. |
| apps/sim/blocks/blocks.test.ts | Pins legacy discovery behavior, v2 availability, tool access, and continued v1 trigger execution. |
Reviews (6): Last reviewed commit: "Merge branch 'table-v2-picker-enrichment..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
a6ae3e6 to
51dca21
Compare
|
@greptile review |
|
@cubic review |
@mzxchandra 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 15 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
Follows the gmail_v2 / github_v2 / confluence_v2 / cursor_v2 cutovers: v1 is renamed "(Legacy)", hidden from discovery, and points at its successor; v2 drops the preview gate. Both edits must land together — the registry check fails a sunset block whose replacedBy is still preview, verified by splitting them locally. v1's `triggers.enabled` deliberately stays true. Webhook execution gates on it at runtime rather than on discovery, so flipping it would break every deployed v1 table-trigger workflow. Both versions host the same `table_new_row` trigger and dispatch is provider-keyed, so hiding v1 changes nothing for triggers. No BLOCK_META_REGISTRY entry is needed — meta coverage is required only for `category: 'tools'` blocks and both Table blocks are `category: 'blocks'`. Docs regenerate from v2 now that v1 is skipped as a source, so the generated page moves to the predicate grammar and cursor pagination. The hand-written regions did not, and are updated here: the operator reference and combining examples, the workflow guide's field walkthrough, and the pagination advice — which previously told readers to advance an offset while looping on nextCursor, mixing both versions. Verified in the browser: the toolbar yields a `table_v2` block whose Query Rows shows Cursor/Order; the Agent tool picker stores `type: table_v2, toolId: table_query_rows_v2` and groups it under built-ins; and a pre-existing v1 block still renders its own Offset/Sort fields behind an amber legacy badge.
Review findings, all consequences of v2 becoming the docs source. `BlockPreview` looks the block type up in a hand-maintained map and renders nothing when it misses, so pointing the trigger page at `table_v2` silently deleted its hero. Move the entry to the new type; the trigger config it displays is identical across both versions. The docs generator extracts `longDescription` with a single-literal regex, so v2's `+`-concatenated string published as its first fragment alone — the page lost every mention of the predicate grammar and cursor pagination. Join it into one literal. v1's was a single literal, which is why this only surfaced now. The hand-written operator table called `contains` case-sensitive. It compiles to ILIKE, as do `startsWith` and `endsWith`; the pre-cutover page had this right, so the rewrite regressed it. Restore the qualifiers and document `ncontains` alongside `contains`. Drop `'table'` from BUILT_IN_TOOL_TYPES: it now only ever reaches blocks that already passed `isAgentToolBlock`, which excludes hidden ones, so the entry is dead. Matches the `file`/`file_v5` precedent the sibling test already asserts.
Regenerate the two artifacts the `ncontains` commit left stale: the tool metadata bundle and the generated Table integration page both still published the operator list without it, so `bun run tool-metadata:check` failed at HEAD. Point the remaining docs previews at `table_v2`. `BLOCK_DISPLAY_WORKFLOWS` already moved, but the two hand-written table example workflows and the OutputBundle on the workflows guide still named the v1 type, so every table example in the docs described the block the toolbar no longer yields. They render identically today only because both types share an icon-map entry. The workflows guide told readers the log shows "the filter and sort it sent"; v2 sends `order`. Document the `sunset` step in the three skills that describe the v1 -> v2 cutover. All three stopped at `(Legacy)` + `hideFromToolbar`, but `check-block-registry` fails a legacy block with no `replacedBy`, and the amber badge and its click-to-upgrade action read from that field - following the procedure verbatim produced a build failure. Also record the ordering constraint this cutover hit: the v1 `sunset` edit and the v2 `preview` removal must land together, since the check rejects a `replacedBy` that is still preview. Left alone: the academy video previews still show v1 labels. They mirror recorded footage, so correcting the label without a re-record would only make the still disagree with the video it claims to depict.
The regenerated page reverted to the "there are no array columns" claim that the select-operator fix corrected. Restore the allowed-operator table.
Greptile: convert the v1 lifecycle comment to TSDoc. The repo rule is TSDoc-only, and none of the four reference cutover blocks comment here at all, so the `//` form was not following a local convention either. The note is worth keeping as declaration documentation — it records why `triggers.enabled` must stay true. Cubic: fix a link to `#tips`, an anchor that does not exist on the page. The pagination guidance lives under Variations.
d9c162f to
966d3ac
Compare
Review finding. The add-integration cutover steps said to add `sunset.replacedBy` without stating the precondition, so an author following them while v2 was still preview-gated would get a `check-block-registry` failure — the exact constraint this cutover hit. The sibling add-block and add-block-preview skills already spell this out; this brings the third in line.
|
@greptile review |
|
@cubic review |
@mzxchandra 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 15 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
|
@greptile review |
|
@cubic review |
@mzxchandra 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 15 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
The amber legacy badge and its click-to-upgrade action already mark a sunset block in the UI, so the suffix restated it — a placed v1 block rendered a "Table (Legacy)" type tag next to a "legacy" badge saying the same thing. The four earlier cutovers (gmail, github, confluence, cursor) carry the suffix, but the most recent one does not: the slack_v2 GA left v1 named "Slack" and leaned on the badge. Following that.
|
@greptile review |
|
@cubic review |
@mzxchandra 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 15 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
|
@greptile review |
|
@cubic review |
@mzxchandra 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 15 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Summary
Releases
table_v2and marks the v1tableblock legacy, following thegmail_v2/github_v2/confluence_v2/cursor_v2cutovers exactly — a hard cutover, no feature flag, revert as the rollback.v1 gets the shape those cutovers share, minus the name suffix:
tools.access,outputs,subBlocks, anddocsLinkare untouched — placed instances must keep resolving and executing.v2 drops
preview: true.Both edits are in one commit by necessity:
check-block-registry.tsfails a sunset block whosereplacedBystill points at a preview block. I split them locally to confirm the gate actually fires — it does.The one thing not to "clean up"
v1 keeps
triggers: { enabled: true, available: ['table_new_row'] }. Webhook execution gates onblockConfig.triggers.enabledat runtime, not on discovery, so flipping it would break every deployed v1 table-trigger workflow.hideFromToolbaralone removes it from the toolbar. Both versions host the same trigger and dispatch is provider-keyed, so hiding v1 changes nothing for triggers. There is now a test pinning this.The four earlier cutovers (
gmail,github,confluence,cursor) also rename v1 to"X (Legacy)". Not doing that here: the amber badge and its click-to-upgrade action already mark the block, so the suffix restated it on the same card. The most recent cutover, theslack_v2GA, left v1 named "Slack" for the same reason.No
registry-maps.tschange and no BlockMeta needed — meta coverage is required only forcategory: 'tools'blocks, and both Table blocks arecategory: 'blocks'.Docs
Regenerated now that v1 is skipped as a source, so the generated page moves to the predicate grammar and cursor pagination. Three hand-written things the generator cannot reach were fixed too: the operator reference, the workflow guide's field walkthrough, and the pagination advice — which previously told readers to advance an offset while looping on
nextCursor, mixing both versions in one sentence.Type of Change
Testing
Full suite green: 38,345 passed / 0 failed (
bunx vitest run, 2,772 files), plusturbo run type-check,lint:check,docs:check,check:api-validation, and all fourcheck-block-registry.tsinvariants includingSubblock ID stability.Verified end-to-end in a browser against local dev servers, with a pre-change baseline:
table_v2in the database, with Cursor / Order / Columns to Return.{"type": "table_v2", "toolId": "table_query_rows_v2"}and groups Table under built-ins. 246 options, oneTable, zero matchinglegacy. Every other cut-over block (Gmail, GitHub, Confluence, Cursor, Google Sheets, File, Slack) is also single-entry, so Table now behaves like the rest.legacybadge and still opens with its own Input Mode / Filter / Sort / Offset fields and values intact — hidden, not broken.tool-input.tsxfalls back to the unfiltered registry for exactly this case).Reviewers should focus on the lifecycle flip itself, and on whether anything else resolves the Table block by type in a way
hideFromToolbarwould break. I traced execution, trigger dispatch, and the copilot VFS; execution resolves through the puregetBlock, which is never visibility-projected.Checklist
Before merging — one ops check outside this diff
Confirm the prod
block-visibilityAppConfig document has notable_v2entry. Oncepreviewis gone that document inverts meaning: a rule that stops matching moves the type intodisabled, and with v1 now hidden that would leave affected users with no Table block at all. I cannot read AppConfig from the repo.Known risk, accepted
There is no deterministic v1 → v2 value migration. The amber badge's "click to upgrade" sends a generic prompt asking the Sim agent to change the block type and re-enter inputs. For Table that means inferring three translations unaided:
{"col":{"$eq":v}}→{"field":"col","op":"eq","value":v},sort→order, andoffset→cursor. This is the first cutover where the data grammar changes rather than the credential shape, and it ships untested by explicit decision. A bad translation silently produces a v2 block whose filter matches nothing. Worth a follow-up if upgrade failures surface.