Skip to content

fix: handle inert lifecycle state in ui - #2112

Open
gaspergrom wants to merge 4 commits into
mainfrom
fix/IN-1240-inert-lifecycle-state
Open

fix: handle inert lifecycle state in ui#2112
gaspergrom wants to merge 4 commits into
mainfrom
fix/IN-1240-inert-lifecycle-state

Conversation

@gaspergrom

Copy link
Copy Markdown
Collaborator

Summary

  • The backend's Health Score v2 already returns the inert lifecycle state, but the frontend lacked handlers for it, causing it to render as "Unknown". This PR adds the missing cases to trust-score.ts, health-breakdown-templates.ts, and collection-lifecycle-badge.vue.
  • Sets inert to use the warning color band (amber), matching the declining state visually.
  • Frontend-only fix; no backend, database, or deployment changes.

Changes

File What changed
frontend/config/trust-score.ts Added inert to lifecycleLabelConfig: label "Inert", color bg-warning-600
frontend/config/health-breakdown-templates.ts Added inert case to getLifecycleDescription
frontend/app/components/modules/collection/components/details/collection-lifecycle-badge.vue Added inert: 'warning' to variations
frontend/config/trust-score.test.ts Tests getLifecycleLabelConfig with inert state and edge cases
frontend/config/health-breakdown-templates.test.ts Tests getLifecycleDescription with all lifecycle states

JIRA

IN-1240 — Inert lifecycle state not handled in UI — renders as Unknown

Deploy order

No cross-repo dependencies. Insights frontend only.

DB migrations

None.

Test plan

  • Verify health_score_v2 Tinybird pipe returns inert as a valid lifecycle state value
  • Load a collection with inert state in staging; confirm badge displays "Inert" with amber color
  • Hover badge and confirm description text appears
  • pnpm test passes
  • pnpm lint:fix and pnpm tsc-check pass

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI balanced review requested due to automatic review settings August 25, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds frontend support for the backend’s inert lifecycle state.

Changes:

  • Adds inert labels, descriptions, and warning styling.
  • Adds lifecycle configuration tests.
  • Updates collection lifecycle badges.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/config/trust-score.ts Adds inert label and color.
frontend/config/trust-score.test.ts Tests inert and fallback labels.
frontend/config/health-breakdown-templates.ts Adds inert description.
frontend/config/health-breakdown-templates.test.ts Tests lifecycle descriptions.
frontend/app/components/modules/collection/components/details/collection-lifecycle-badge.vue Maps inert to warning styling.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

stable: { label: 'Stable', color: 'bg-accent-500' },
declining: { label: 'Declining', color: 'bg-warning-500' },
abandoned: { label: 'Abandoned', color: 'bg-negative-500' },
inert: { label: 'Inert', color: 'bg-warning-600' },
The inert lifecycle color was added to trust-score.ts but never added to
tailwind.ts's safelist, so Tailwind's scanner never generated the class
and the lifecycle dot rendered invisible in the actual build.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI review requested due to automatic review settings August 26, 2026 09:38
@gaspergrom
gaspergrom requested a review from joanagmaia August 26, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

frontend/app/components/modules/collection/components/details/collection-lifecycle-badge.vue:40

  • The PR test plan says hovering the lifecycle badge should show the description, but this component only maps the color variation: its template has no tooltip, and both parent usages render it directly. The proposed manual check therefore cannot pass. Please either add the described tooltip behavior or correct the test plan if the description is only intended for the project overview.
    inert: 'warning',

Comment on lines +15 to +17
test('should return Unknown for null or undefined lifecycle state', () => {
const result1 = getLifecycleLabelConfig(null);
const result2 = getLifecycleLabelConfig(undefined);
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.

3 participants