Repository navigation
Conversation
fixes TryGhost#29623 - the feature image alt text field had no maxlength, so a user could type past the 191-character server limit - autosave runs saveTask with silent: true and the catch that surfaces validation errors is gated on !options.silent, so the client validator failure was swallowed and no request was ever sent - the over-length alt text was then silently discarded on navigation, with no error shown anywhere in the UI - imposing the 191 limit on the field (per maintainer guidance to enforce rather than extend the limit) makes the unsaveable state unreachable, matching the client validator and server validation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe feature image alt-text input now includes a Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ 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 |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 7m 9s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin |
✅ Succeeded | 3m 50s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 45s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 1m 34s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 17s | View ↗ |
nx run-many -t lint -p ghost-admin,@tryghost/ad... |
✅ Succeeded | 51s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-30 12:51:50 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29681 +/- ##
=======================================
Coverage 75.42% 75.42%
=======================================
Files 1608 1608
Lines 141408 141408
Branches 17471 17471
=======================================
Hits 106654 106654
Misses 33683 33683
Partials 1071 1071
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:
|

Fixes #29623.
The feature image alt text field had no
maxlength, so a user could type past the 191-character limit enforced by the server. Autosave runs withsilent: trueand the validation-error handler is gated on!options.silent, so the client validator failure was swallowed and no request was ever sent — the over-length text was then silently discarded on navigation.Per @9larsons' guidance in the issue (impose the 191 limit rather than extend it, which would be a separate proposal), this adds
maxlength="191"to the alt input so the unsaveable state can no longer be reached. The value matches the client validator (isLength {max: 191}) and server validation.Notes for reviewers
maxlengthcounts UTF-16 units while the validator counts code points, so the field is very slightly stricter for emoji/astral characters — always the safe direction (anything the field allows still passes the server), so the bug cannot recur.silent: trueswallow is untouched — consistent with the maintainer note that this "may need patching as well."Test
Reproduced the issue on this branch (typing 192 chars → autosave silently drops it), then confirmed the fix: the field now hard-stops at 191, autosave succeeds, and nothing is lost on navigation.