Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d112bf0
feat(alt-text): add cached health data utilities
srjaykikani Mar 16, 2026
0a49d63
feat(alt-text): add dashboard health widget
srjaykikani Mar 16, 2026
6621d94
docs(alt-text): document the health widget
srjaykikani Mar 16, 2026
407fc14
fix(alt-text): remove req from unstable_cache closure and use overrid…
jhb-dev Mar 28, 2026
5623b7a
refactor(alt-text): simplify health widget with status badges and inc…
jhb-dev Mar 28, 2026
3165252
refactor(alt-text): improve health widget with collection labels, lin…
jhb-dev Mar 28, 2026
8d121a7
feat(alt-text): make health badge a clickable link filtering by inval…
jhb-dev Mar 28, 2026
b921066
feat(alt-text): add healthWidget option to disable dashboard widget
jhb-dev Mar 28, 2026
9b00675
docs(alt-text): update README and changelog for health widget features
jhb-dev Mar 28, 2026
7c6e765
feat(alt-text): add health REST endpoint and healthCheck option to di…
jhb-dev Mar 28, 2026
214028a
fix(alt-text): remove redundant global tag revalidation and paginate …
jhb-dev Mar 28, 2026
99a0536
fix(alt-text): cap invalidDocIds to prevent unbounded growth and URL …
jhb-dev Mar 28, 2026
298df3e
fix(alt-text): pass payload as argument to unstable_cache instead of …
jhb-dev Mar 28, 2026
6cc9ddc
feat(alt-text): formalize health contract
srjaykikani Mar 29, 2026
0491a83
refactor(alt-text): simplify health widget flow
srjaykikani Mar 29, 2026
eb61b65
refactor(alt-text): extract getCollectionLabel into utility file
jhb-dev Apr 2, 2026
5097b39
add check icon
jhb-dev Apr 2, 2026
fc4a710
refactor(alt-text): remove contract layer from health check
jhb-dev Apr 2, 2026
e3e436e
fix(alt-text): sync resolved config and docs with healthCheck option
jhb-dev Apr 2, 2026
9097443
Merge branch 'main' into codex/issue-57-alt-text-health-widget
jhb-dev Apr 2, 2026
5d524b0
refactor(alt-text): rename test file to match module
jhb-dev Apr 2, 2026
8df53f1
refactor(alt-text): extract summarizeCollection into own module
jhb-dev Apr 2, 2026
c125050
test(alt-text): rewrite health tests for summarizeCollection
jhb-dev Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions alt-text/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- feat: add alt text health check with dashboard widget and REST endpoint (opt-out via `healthCheck: false`)

## 0.3.1

- fix: update validate function to correctly detect initial upload in Payload >=3.70
Expand Down
12 changes: 12 additions & 0 deletions alt-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ A [Payload CMS](https://payloadcms.com/) plugin that adds AI-powered alt text ge
- Automatic keyword extraction for improved admin search
- Bulk generation for processing multiple images at once
- Full localization support
- Dashboard health widget with cached coverage insights across all configured upload collections


When the plugin is enabled for an upload collection, it will:
Expand All @@ -22,6 +23,10 @@ When the plugin is enabled for an upload collection, it will:
- It will be used for improving the search of images in the admin panel
2. Add a bulk generate button to the collection list view
- This button will allow you to generate alt text for multiple images at once
3. Register an `Alt text health` dashboard widget
- The widget is available in Payload's dashboard editor
- It is added to the default dashboard layout for first-time and reset layouts
- Results are cached and revalidated when documents in the configured upload collections change

## Installation

Expand Down Expand Up @@ -68,6 +73,13 @@ Note: When localization is disabled in your Payload config (default), you need t
| `locale` | `string` | No | Locale for alt text generation (required when localization is disabled) |
| `maxBulkGenerateConcurrency` | `number` | No | Maximum concurrent API requests for bulk operations (default: 16) |
| `fieldsOverride` | `Function` | No | Override the default fields inserted by the plugin |
| `healthCheck` | `boolean` | No | Enable alt text health tracking: REST endpoint, cache revalidation hooks, and dashboard widget (default: `true`) |

## Dashboard Widget

The plugin registers an `Alt text health` dashboard widget that shows alt text coverage across all configured upload collections, with cached queries that revalidate on document changes. Collections with missing alt text show a clickable badge linking to the affected images.

Set `healthCheck: false` in the plugin config to disable the REST endpoint, cache revalidation hooks, and dashboard widget. If your project replaces the default dashboard via `admin.components.views.dashboard`, you need to integrate the widget into your custom dashboard yourself.

### Resolvers

Expand Down
1 change: 0 additions & 1 deletion alt-text/dev/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading