Skip to content

Add component lifecycle badges#2448

Open
Mbeaulne wants to merge 1 commit into
06-23-add_component_search_url_statefrom
06-23-add_component_lifecycle_badges
Open

Add component lifecycle badges#2448
Mbeaulne wants to merge 1 commit into
06-23-add_component_search_url_statefrom
06-23-add_component_lifecycle_badges

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds visual indicators for deprecated and superseded components throughout the component browser. A new ComponentLifecycleBadges component renders "Deprecated" or "Superseded" badges next to component names, and a warning message is shown in the component detail pane advising users to prefer active replacements. When a replacement digest is available, it is shown inline within the badge.

Lifecycle state is resolved via a new getComponentLifecycleInfo service that reads from multiple sources: top-level deprecated and superseded_by fields on the component reference, as well as lifecycle.state, superseded_by, supersededBy, and their tangleml.com/-prefixed annotation equivalents. Superseded state takes priority over deprecated state when a replacement digest is present.

Badges appear both on component cards in the list view and in the component detail header.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the component browser and select a component that has deprecated: true set on its reference — confirm a "Deprecated" badge appears next to the component name in both the card and the detail pane, along with a warning message.
  2. Set superseded_by to a digest on a component reference — confirm a "Superseded" badge and a "Replaced by <digest>" badge appear, and the detail pane shows the superseded warning.
  3. Confirm components with no lifecycle metadata show no badges or warnings.
  4. Run the unit tests in src/services/componentLifecycle.test.ts to verify all annotation and field resolution paths.

Additional Comments

The annotation keys checked are lifecycle.state, tangleml.com/lifecycle-state, superseded_by, supersededBy, and tangleml.com/superseded-by, providing flexibility across different annotation conventions.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-23-add_component_lifecycle_badges/30633b0

Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_lifecycle_badges branch from 8e9b863 to 53dd0b9 Compare June 24, 2026 18:11
@Mbeaulne Mbeaulne marked this pull request as ready for review June 24, 2026 18:55
@Mbeaulne Mbeaulne requested a review from a team as a code owner June 24, 2026 18:55
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_url_state branch from 6d83fca to 97297cc Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_lifecycle_badges branch from 53dd0b9 to 1f7cb6d Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_url_state branch from 97297cc to f57ed8d Compare June 25, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_lifecycle_badges branch from 1f7cb6d to a25389c Compare June 25, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_url_state branch from f57ed8d to c24dece Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_lifecycle_badges branch from a25389c to 8d8e6f4 Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_lifecycle_badges branch from 8d8e6f4 to 30633b0 Compare June 25, 2026 19:43
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_url_state branch from c24dece to 1e0f470 Compare June 25, 2026 19:43
Comment thread src/components/shared/ComponentLifecycleBadges.tsx
Comment thread src/components/shared/ComponentLifecycleBadges.tsx
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.

2 participants