Skip to content

feat(blocks): surface deprecated block and model warnings on canvas#5785

Merged
TheodoreSpeaks merged 3 commits into
stagingfrom
feat/deprecation-warning
Jul 21, 2026
Merged

feat(blocks): surface deprecated block and model warnings on canvas#5785
TheodoreSpeaks merged 3 commits into
stagingfrom
feat/deprecation-warning

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • Add a deprecated?: { replacedBy? } field to BlockConfig and annotate 37 legacy block configs with their successors
  • Render an amber "deprecated" badge on canvas blocks when the block type or its selected model is deprecated; clicking opens Chat with a block-scoped prompt to upgrade it (gated on edit permission, hidden in diff mode)
  • Add isModelDeprecated / getModelReplacement model accessors; only badge when a concrete upgrade target exists (drops vision, which has no successor)
  • Fix the workflow-panel mothership-send-message listener to forward contexts + preventDefault (also repairs existing terminal/logs "Fix in Chat")
  • Clear inherited deprecated on 20 successor blocks built by spreading their deprecated predecessor (they were self-referencing)
  • Add a check-block-registry invariant that every replacedBy resolves to a real, GA, non-deprecated block

Type of Change

  • New feature

Testing

Tested manually against local workflows with deprecated blocks/models. bun run lint:check, check:api-validation:strict, check-block-registry, and providers/models.test.ts 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)

@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly UI and declarative block metadata; execution paths are unchanged and the copilot listener fix is a small behavioral improvement with limited blast radius.

Overview
Introduces deprecated.replacedBy on BlockConfig and tags many legacy integration/trigger blocks so existing canvas instances can show an amber deprecated badge (hidden in diff mode).

Workflow canvas: getBlockDeprecation drives the badge for superseded block types or deprecated catalog models; editors can click to open Chat with a block-scoped upgrade prompt (sendMothershipMessage + workflow_block context), with PostHog deprecated_block_fix_clicked. WorkflowBlockView renders the badge and gates fixes on edit permission.

Panel: The mothership-send-message handler now preventDefaults, switches to the copilot tab, and forwards contexts into copilotSendMessage (fixes block-scoped “Fix in Chat” flows).

Models: Adds isModelDeprecated from the static provider catalog and tests.

Tooling: check-block-registry validates every replacedBy points at a real, non-deprecated, non-preview successor; v2 blocks clear inherited deprecated from spread parents.

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

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR surfaces deprecated blocks and models on the workflow canvas. The main changes are:

  • Adds replacement metadata to legacy block configurations.
  • Shows an actionable deprecation badge for editors.
  • Sends block context to Chat for upgrade requests.
  • Adds static model-deprecation lookup helpers and tests.
  • Validates block replacement targets in the registry check.

Confidence Score: 5/5

This looks safe to merge.

  • The actionable badge now supports focus and Enter or Space activation.
  • Read-only badges remain non-interactive.
  • Spread-derived successor blocks clear inherited deprecation metadata.
  • No blocking issues were found in the changed code.

Important Files Changed

Filename Overview
packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx Adds the deprecation badge and keyboard activation for editable workflows.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx Derives block and model deprecation state and opens Chat with block context.
apps/sim/providers/models.ts Adds a case-insensitive lookup for deprecated static model IDs.
apps/sim/scripts/check-block-registry.ts Checks that replacement blocks exist and are released and non-deprecated.

Reviews (2): Last reviewed commit: "fix(blocks): make deprecation badge keyb..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/image_generator.ts
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 21, 2026 12:04am

Request Review

@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 24c425f. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 53c2716 into staging Jul 21, 2026
20 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/deprecation-warning branch July 21, 2026 00:22
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