Skip to content

feat: add CapabilityStatus component (0.9.0)#4

Merged
hendrikebbers merged 1 commit into
mainfrom
feat/capability-status
Jul 11, 2026
Merged

feat: add CapabilityStatus component (0.9.0)#4
hendrikebbers merged 1 commit into
mainfrom
feat/capability-status

Conversation

@herbie-bot

Copy link
Copy Markdown

Summary

Adds a generic, presentational CapabilityStatus component: a status row that reports whether a runtime capability is available. Green check + text when available; red warning + text when not, with an optional hint surfaced as a tooltip (intended for the unavailable case — e.g. a remediation pointer). Mirrors the look of HealthStatus and reuses the existing Card + Tooltip primitives.

This is the ui half of the cross-repo HEIC-support-status feature (open-crm spec 112-heic-support-status). The consumer (@open-elements/nextjs-app-layer) will render one row per configured capability on the /admin/status page.

API

interface CapabilityStatusProps {
  readonly available: boolean;
  readonly label: string;           // e.g. "HEIC image decoding"
  readonly availableText: string;   // e.g. "Available"
  readonly unavailableText: string; // e.g. "Not available"
  readonly hint?: string;           // shown as a tooltip
}

The component is fully app-agnostic — all display strings are passed in by the consumer, keeping it reusable for future capabilities (WebP, PDF rendering, …).

Changes

  • New src/components/capability-status.tsx ("use client", brand colors --color-oe-green / --color-oe-red).
  • Exported CapabilityStatus + CapabilityStatusProps from src/index.ts.
  • Unit tests: available→green, unavailable→red, hint→tooltip (focus-driven), hint optional→no tooltip.
  • Version bump 0.8.00.9.0.

Test coverage

  • 4 new component tests; full suite (91 tests) green, typecheck / lint / format:check / build all pass locally.

Follow-up

Once merged and published to npm as @open-elements/ui@0.9.0, the paired nextjs-app-layer PR (capabilities option on createServerStatusPage) can bump to it and go green.

Part of OpenElementsLabs/nextjs-app-layer#6

🤖 Generated with Claude Code

Add a generic presentational status row for reporting runtime capability
availability on admin status pages. Renders a green check when available and
a red warning when not, mirroring the look of HealthStatus and reusing the
Card + Tooltip primitives. An optional `hint` is surfaced as a tooltip
(intended for the unavailable case, e.g. a remediation pointer).

This is the ui half of the cross-repo HEIC-support-status feature; the
nextjs-app-layer status page will render one row per configured capability.

Part of OpenElementsLabs/nextjs-app-layer#6

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hendrikebbers hendrikebbers merged commit c06ceb1 into main Jul 11, 2026
1 check passed
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