Skip to content

feat(alt-text): add dashboard health widget#64

Open
srjaykikani wants to merge 15 commits intojhb-software:mainfrom
srjaykikani:codex/issue-57-alt-text-health-widget
Open

feat(alt-text): add dashboard health widget#64
srjaykikani wants to merge 15 commits intojhb-software:mainfrom
srjaykikani:codex/issue-57-alt-text-health-widget

Conversation

@srjaykikani
Copy link
Copy Markdown
Contributor

Summary

  • add a cached Alt text health dashboard widget for the alt-text plugin
  • aggregate complete, missing, and partially localized alt-text coverage across all configured upload collections
  • invalidate cached health results after create, update, and delete operations in configured upload collections
  • expose the widget and health helper from the plugin server export and wire the example app import map/types

Testing

  • pnpm lint in alt-text
  • pnpm build in alt-text
  • manually tested the dashboard in alt-text/dev with seeded media across media and images
  • manually verified the dashboard counts updated after saving a media document with a single-locale alt text change

This comment was marked as outdated.

@jhb-dev
Copy link
Copy Markdown
Contributor

jhb-dev commented Mar 28, 2026

Thanks for the work on this, Jay! I made a few adjustments on top — simplified the widget (fewer status tiers, cleaner layout), and made the unhealthy badge a clickable link that filters to the affected images by ID.

I also refactored the health check into a broader feature: in addition to the dashboard widget, the health data is now exposed via a REST endpoint (GET /api/alt-text-plugin/health) so that agents (MCP, CI, custom tooling) can consume it too. The whole feature can be opted out of via a single healthCheck: false config option, which disables the endpoint, cache revalidation hooks, and the widget.

This is part of a larger direction I want to take across all plugins — making them more agent-friendly by ensuring key data is accessible programmatically, not just through the admin UI.

@srjaykikani
Copy link
Copy Markdown
Contributor Author

srjaykikani commented Mar 29, 2026

Followed up on your health-feature direction and pushed two commits to codex/issue-57-alt-text-health-widget:

  • 6cc9ddc feat(alt-text): formalize health contract
  • 0491a83 refactor(alt-text): simplify health widget flow

What changed relative to your comment:

  • kept healthCheck as the single umbrella switch for endpoint + revalidation + widget
  • kept the widget simple again, with the unhealthy badge still linking to the affected docs
  • kept the REST surface as the programmatic source for agents / CI / tooling
  • added a local machine-readable health contract in alt-text so the endpoint and widget can share one health computation without turning the widget back into the spec
  • added structured error logging around the health route and cache revalidation
  • fixed a regression in the cache wrapper that was causing the dashboard and /api/alt-text-plugin/health to throw Converting circular structure to JSON

Verification:

  • pnpm test:health
  • pnpm build
  • live browser verification against alt-text/dev
  • live endpoint check for /api/alt-text-plugin/health
  • verified the unhealthy badge drilldown lands on the filtered collection view

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