Skip to content

feat(tables): GA table_v2 and mark the v1 Table block legacy - #7329

Merged
mzxchandra merged 10 commits into
table-v2-picker-enrichmentfrom
table-v2-cutover
Sep 1, 2026
Merged

feat(tables): GA table_v2 and mark the v1 Table block legacy#7329
mzxchandra merged 10 commits into
table-v2-picker-enrichmentfrom
table-v2-cutover

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #7328. Base is table-v2-picker-enrichment; review that one first. GitHub will retarget this to staging automatically when #7328 merges.

Releases table_v2 and marks the v1 table block legacy, following the gmail_v2 / github_v2 / confluence_v2 / cursor_v2 cutovers exactly — a hard cutover, no feature flag, revert as the rollback.

v1 gets the shape those cutovers share, minus the name suffix:

hideFromToolbar: true,
sunset: { status: 'legacy', replacedBy: 'table_v2' },

tools.access, outputs, subBlocks, and docsLink are untouched — placed instances must keep resolving and executing.

v2 drops preview: true.

Both edits are in one commit by necessity: check-block-registry.ts fails a sunset block whose replacedBy still 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 on blockConfig.triggers.enabled at runtime, not on discovery, so flipping it would break every deployed v1 table-trigger workflow. hideFromToolbar alone 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, the slack_v2 GA, left v1 named "Slack" for the same reason.

No registry-maps.ts change and no BlockMeta needed — meta coverage is required only for category: 'tools' blocks, and both Table blocks are category: '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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Full suite green: 38,345 passed / 0 failed (bunx vitest run, 2,772 files), plus turbo run type-check, lint:check, docs:check, check:api-validation, and all four check-block-registry.ts invariants including Subblock ID stability.

Verified end-to-end in a browser against local dev servers, with a pre-change baseline:

  • Toolbar yields exactly one "Table", and the block it places is table_v2 in the database, with Cursor / Order / Columns to Return.
  • Agent tool picker stores {"type": "table_v2", "toolId": "table_query_rows_v2"} and groups Table under built-ins. 246 options, one Table, zero matching legacy. Every other cut-over block (Gmail, GitHub, Confluence, Cursor, Google Sheets, File, Slack) is also single-entry, so Table now behaves like the rest.
  • A pre-existing v1 block renders with the amber legacy badge and still opens with its own Input Mode / Filter / Sort / Offset fields and values intact — hidden, not broken.
  • An Agent block that already had the v1 Table tool selected still renders its chip with full chrome (tool-input.tsx falls 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 hideFromToolbar would break. I traced execution, trigger dispatch, and the copilot VFS; execution resolves through the pure getBlock, which is never visibility-projected.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Before merging — one ops check outside this diff

Confirm the prod block-visibility AppConfig document has no table_v2 entry. Once preview is gone that document inverts meaning: a rule that stops matching moves the type into disabled, 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}, sortorder, and offsetcursor. 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.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 1, 2026 2:24am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR makes table_v2 generally available while retaining the legacy Table block for existing workflows and trigger execution.

  • Hides v1 from discovery and links it to the v2 replacement.
  • Updates built-in classification, icons, documentation previews, and examples to use v2.
  • Rewrites Table documentation for predicate filters and cursor pagination.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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

Comment thread apps/sim/blocks/blocks/table.ts Outdated
Comment thread apps/docs/content/docs/integrations/table.mdx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread apps/sim/blocks/blocks/table.ts Outdated
Comment thread apps/docs/content/docs/integrations/table.mdx
Comment thread apps/docs/content/docs/tables/using-in-workflows.mdx Outdated
Comment thread apps/docs/content/docs/integrations/table.mdx
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .agents/skills/add-integration/SKILL.md Outdated
Comment thread apps/docs/content/docs/integrations/table.mdx
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.
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.
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile review

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cubic review

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mzxchandra
mzxchandra merged commit 77c1475 into table-v2-picker-enrichment Sep 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant