Skip to content

frontend: hide and flag deprecated Connect components (UX-1566) - #2706

Open
SpicyPete wants to merge 1 commit into
masterfrom
ux-1566/hide-deprecated-components
Open

SpicyPete wants to merge 1 commit into
masterfrom
ux-1566/hide-deprecated-components

Conversation

@SpicyPete

@SpicyPete SpicyPete commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Fixes UX-1566.

Deprecated Redpanda Connect components showed up in every picker and in YAML autocomplete, so new work could start on something that's going away. Pipelines that already used one got no signal to move off it. The live 4.116 schema deprecates eight: the kafka, kafka_franz and redpanda_common inputs and outputs, pg_stream and the jira processor. kafka_franz was one of the picker's own default suggestions.

Hidden from selection

  • Component picker (add-node dialog, all its tabs and search): deprecated components are dropped from the catalog. The "it exists as an input" hint ignores them too.
  • Exact-name search: typing a hidden component's name (kafka_franz) explains the miss ("kafka_franz is deprecated. Use the redpanda input instead.") and puts the replacement first, already selected.
  • YAML autocomplete (pipeline editor and the legacy OSS editor): deprecated component keys get doNotSuggest.

Flagged where in use

  • Canvas: the card gets a warning-toned "Deprecated" badge. Its tooltip names the replacement.
  • Inspector: a "Deprecated component" warning banner above the form, with the replacement and a docs link. The form, edits and save work as before.
  • Issues chip: deprecations get their own warning section ("2 deprecated components" when they're the only issue). Clicking a row selects the node.
  • YAML lane: a "Deprecated components" list under Lint issues, plus a warning marker on each deprecated key. Hovering it shows the message above the component's usual schema docs. The read-only view and the legacy editor get the markers too.

Deprecations never count as lint problems. They don't add a red ring or change the problem count, and they never block a save.

Design notes

  • Where the replacement comes from: the schema's deprecation paragraph, either a component xref (Use the xref:components:inputs/redpanda.adoc[…] instead) or a rename (renamed to \postgres_cdc``). It must exist in the served catalog and not be deprecated itself. With no replacement, the message says the component may be removed, and the link goes to its own docs page.
  • Fallback map: schemas before 4.114 mark these components deprecated without naming a replacement. I checked every cloudv2 schema bump back to 4.90. So KNOWN_REPLACEMENTS in utils/deprecation.ts holds the replacements upstream names from 4.114 on. The schema text wins when present. Without the map, most of today's fleet, including localdev, would only get "may be removed". It can go once dataplanes are all on 4.114 or later. A replaced_by field on the ComponentSpec proto would be the proper long-term source.
  • doNotSuggest, not deprecationMessage: every component is an anyOf branch. The YAML validator drops a branch that has any problem in favour of problem-free ones, so a deprecation warning would disappear, and so would that component's hover and field completion. Warnings come from our own Monaco markers instead (use-deprecation-markers.ts), recomputed from the editor's text so the uncontrolled legacy editor works too.
  • YamlEditor's onEditorMount now also passes monaco, as an optional second argument.

Examples

Checked by hand in local Cloud UI, with this tree hot-reloaded against local BYOC (served schema is older than 4.114, so the fallback map was in play). Nothing was saved:

  • Picker: the All tab lists 57 inputs and none are deprecated. Searching kafka_franz shows the hint with redpanda pinned and selected.
  • YAML: kafka_franz input and redpanda_common output get amber squiggles and ruler marks. Server lint still says "No issues found", and the Deprecated components list sits below it. Autocomplete under input: offers redpanda and redpanda_migrator but not redpanda_common, and nothing for kaf.
  • Visual: both cards are badged, the chip reads "2 deprecated components", and a row opens the inspector with the banner and the full form.

Testing

  • utils/deprecation.test.ts (new): replacement via xref, non-component xrefs skipped, rename, other-type replacement, fallback for older schemas, unserved or deprecated replacements dropped, message wording, and key ranges for top-level, labelled, nested and mid-edit YAML.
  • connect-command-palette.test.tsx: hidden from browse and search, exact-name hint with the replacement pinned.
  • pipeline-problems-panel.test.tsx: deprecation-only chip (warning tone, no heading) and mixed issues (heading, total count).
  • pipeline-flow-canvas.render.test.tsx: badge and tooltip on a real canvas.
  • visual-editor-panel.test.tsx: badge data, problems-list selection opening the banner and docs link, an edit to a deprecated component still committing, and nothing raised without one.
  • pipeline/index.test.tsx: the YAML lane lists the deprecation and sets a warning marker. The editor mock now matches the real mount contract (monaco, getValue, onDidChangeModel).
  • yaml-editor-schema.test.ts: doNotSuggest set and the field schema kept.
  • bun run lint, bun run type:check and bun run test (unit, integration, federation) pass. There are no new lint warnings on the touched files compared with master.

🤖 Generated with Claude Code

Deprecated Redpanda Connect components were offered in every picker and
in YAML autocomplete like any other, so a new pipeline could start on a
component that is on its way out, and a pipeline already using one gave
no hint that it should move off it.

Pickers, search and YAML autocomplete now leave deprecated components
out. Searching a hidden component's exact name explains the miss and
leads with its replacement. Where one is in use, the canvas card, the
inspector, the issues panel, the YAML lint panel and an editor marker
say it is deprecated, name the replacement and link its docs. Existing
configs load, validate and save as before; the warnings are their own
channel, so they never count as lint problems.

The replacement comes from the schema's own deprecation paragraph (a
component xref, or "renamed to"), checked against the served catalog.
Schemas before 4.114 flag these components without naming one, so a
small map of the replacements upstream names covers older dataplanes.

Autocomplete uses doNotSuggest rather than deprecationMessage: every
component is an anyOf branch, and a branch with a warning loses the
match to the problem-free ones, which drops the warning along with the
component's hover and field completion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Registry drift detected

App: frontend · Scope: diff vs origin/master · Files: 23

Count
⚠️ Outdated registry components 19
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0
Components needing attention
Status Component Uses Detail
⚠️ outdated alert 3× installed 4.2.3 → latest 6.0.0
⚠️ outdated alert-dialog 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated badge 2× installed 4.2.3 → latest 6.0.0
⚠️ outdated badge-group 1× installed 5.1.0 → latest 6.0.0
⚠️ outdated button 6× installed 4.2.3 → latest 6.0.0
⚠️ outdated command 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated count-dot 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated dialog 2× installed 4.2.3 → latest 6.0.0
⚠️ outdated dropdown-menu 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated input 1× installed 4.2.1 → latest 6.0.0
⚠️ outdated kbd 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated label 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated resizable 1× installed 4.2.3 → latest 6.0.0
⚠️ outdated separator 2× installed 5.1.0 → latest 6.0.0
⚠️ outdated skeleton 1× installed 5.1.0 → latest 6.0.0
⚠️ outdated spinner 1× installed 5.1.0 → latest 6.0.0
⚠️ outdated tabs 2× installed 4.2.3 → latest 6.0.0
⚠️ outdated tooltip 2× installed 4.2.3 → latest 6.0.0
⚠️ outdated typography 2× installed 4.2.3 → latest 6.0.0

Refresh command:

bunx shadcn@latest add @redpanda/alert @redpanda/alert-dialog @redpanda/badge @redpanda/badge-group @redpanda/button @redpanda/command @redpanda/count-dot @redpanda/dialog @redpanda/dropdown-menu @redpanda/input @redpanda/kbd @redpanda/label @redpanda/resizable @redpanda/separator @redpanda/skeleton @redpanda/spinner @redpanda/tabs @redpanda/tooltip @redpanda/typography --overwrite

Generated by lookout audit-changes.

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