Added Claude-powered image alt text generation#29317
Conversation
no ref - keeps Claude credentials server-side while making the setting available to both Admin clients - aligns feature image alt text validation with the existing 2000-character storage limit
no ref - keeps image fetching and Claude credentials on the server behind an authenticated editor endpoint - validates Ghost image URLs and image data before sending a bounded request to Claude
no ref - gives administrators a built-in integration card for configuring server-side alt text generation - masks saved credentials and provides an explicit clear action so enablement follows key presence
no ref - lets configured editors replace feature image alt text without exposing the Claude key - blocks duplicate requests and preserves existing descriptions when generation fails
Expose the shared image alt text service to Koenig only when Claude is configured so inline cards can use the same protected backend flow as feature images.
no ref Fresh test databases need to reflect migrated installs, and API cleanup keeps the shared settings cache isolated for the rest of the suite.
no ref The upgrade path needs a direct assertion that the versioned migration inserts the nullable setting with the expected type and group.
no ref Koenig now lives in the monorepo, so the feature branch needs the current workspace layout before integrating editor source changes. # Conflicts: # ghost/admin/app/styles/layouts/editor.css
no ref - exposes an optional card callback without coupling the editor package to a provider - replaces image alt text on success while preserving it and showing feedback on failure
no ref Keep the legacy alt toggle structure unless generated alt text controls are visible, avoiding markup regressions for existing image card states.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 9m 58s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 9s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-f... |
✅ Succeeded | 6m 19s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 48s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 59s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 57s | View ↗ |
nx run @tryghost/koenig-lexical:test:acceptance |
✅ Succeeded | 2m 23s | View ↗ |
Additional runs (8) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-14 20:17:55 UTC
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #29317 +/- ##
==========================================
+ Coverage 73.99% 74.00% +0.01%
==========================================
Files 1572 1580 +8
Lines 136697 137062 +365
Branches 16520 16585 +65
==========================================
+ Hits 101143 101438 +295
- Misses 34560 34615 +55
- Partials 994 1009 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

What changed
Why
Writing useful alt text is easy to miss during publishing. This adds an optional editor workflow that generates a concise description while keeping the provider credential server-side. Existing alt text is only replaced after a successful response and is preserved when generation fails.
Koenig now lives in this monorepo, so the inline-image callback and UI are implemented directly in
koenig/koenig-lexicalwithout an external package release or dependency version bump.Validation