Skip to content

improvement(blocks): two-tier sunset schema (legacy amber / deprecated red)#5793

Merged
TheodoreSpeaks merged 3 commits into
stagingfrom
improvement/sunset-tiers
Jul 21, 2026
Merged

improvement(blocks): two-tier sunset schema (legacy amber / deprecated red)#5793
TheodoreSpeaks merged 3 commits into
stagingfrom
improvement/sunset-tiers

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #5785. Splits block deprecation into two tiers.

  • Renames the deprecated block field to sunset: { status: 'legacy' | 'deprecated', replacedBy? }
  • legacy (amber "legacy" badge) — superseded but still supported; needs a resolvable successor; click-to-upgrade. All 37 existing annotations migrate here.
  • deprecated (red "deprecated" badge) — no longer supported; badges with or without a successor. New tier, no members yet.
  • Badge switches variant + label by tier; renames the wrapper helper, view props, and registry invariant to sunset
  • Drops the vision/vision_v2 annotations (no successor → unbadged)

Models still map to the legacy tier for now; a red model tier (API unavailable) is a separate follow-up.

Type of Change

  • Improvement

Testing

Tested manually. bun run lint:check, check:api-validation:strict, the sunset registry invariant, and renderer + app tsc all pass.

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)

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 21, 2026 2:00am

Request Review

@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Wide mechanical rename across block configs and workflow canvas UX; behavior changes for badge color, labels, and upgrade prompts, but execution paths are unchanged and registry checks guard successor chains.

Overview
Replaces block-level deprecated: { replacedBy } with sunset: { status: 'legacy' | 'deprecated', replacedBy? }, splitting post-GA lifecycle into two canvas tiers.

Legacy (amber legacy badge) means superseded but still supported: requires a resolvable replacedBy, shows “click to upgrade,” and uses shared migrationPrompt text for Mothership. Deprecated (red deprecated badge) means no longer supported: can badge with or without a successor, with different tooltips and agent prompts when there is no direct replacement.

All existing superseded block configs move to status: 'legacy'; GA successors clear sunset. vision / vision_v2 lose empty deprecation annotations so blocks without a successor stay unbadged. Canvas code renames getBlockDeprecationgetBlockSunset and passes sunsetStatus / onFixSunset into the renderer; deprecated model picks still map to the legacy tier. check-block-registry enforces that legacy sunset blocks must have a valid non-sunset successor, while deprecated may omit replacedBy.

Reviewed by Cursor Bugbot for commit 0240e68. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR splits block sunset handling into legacy and deprecated tiers. The main changes are:

  • Replaces the old deprecated field with a typed sunset configuration.
  • Migrates existing annotations to the amber legacy tier.
  • Adds tier-specific badges and replacement prompts.
  • Requires every legacy block to name a valid, current successor.
  • Removes sunset annotations from Vision blocks without successors.

Confidence Score: 5/5

This looks safe to merge.

  • The registry check now rejects legacy entries without a successor.
  • Named successors must exist and cannot themselves be sunset or preview.
  • Deprecated entries without successors remain supported by the rendering path.
  • No blocking issue remains in the updated code.

Important Files Changed

Filename Overview
apps/sim/scripts/check-block-registry.ts Updates registry validation and correctly requires a valid successor for every legacy block.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx Adds tier-aware sunset state, badge text, tooltips, and migration prompts.
packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx Renders amber legacy badges and red deprecated badges with edit-aware actions.
apps/sim/blocks/types.ts Defines the new legacy and deprecated sunset schema.

Reviews (2): Last reviewed commit: "fix(blocks): require replacedBy on legac..." | Re-trigger Greptile

Comment thread apps/sim/scripts/check-block-registry.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

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

✅ 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 bbe942c. Configure here.

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0240e68. Configure here.

tooltip: 'This block is no longer supported. Click to replace',
prompt: target
? `The "${name}" block is no longer supported. ${migrationPrompt(name, target)}`
: `The "${name}" block is no longer supported and has no direct successor. Replace it with current blocks that achieve the same result and rewire the connections.`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing model tip on deprecated path

Low Severity

The deprecated sunset branch with a resolvable successor drops the model migration tip that the legacy branch still appends when the block has a model subblock. Click-to-fix prompts for red-tier blocks that both name a successor and expose a model field will omit guidance to switch to a current model.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0240e68. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 2f31981 into staging Jul 21, 2026
19 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the improvement/sunset-tiers branch July 21, 2026 03:19
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