feat(media): move reindex to Settings, and unblock uploads at Nginx - #121
Merged
Conversation
Reindex is a maintenance action, not a browsing action, so it belongs with the other maintenance controls in Settings rather than in the Media page header. The Settings card also picks up an index already running -- started before the page was opened, or by another admin -- instead of showing an idle button while work is in flight, and a ref guard keeps the mount-resume and a click from both polling. Also raise client_max_body_size to 26m on /v1/. Nginx's stock limit is 1m, so any ordinary phone photo was rejected with a 413 before the request reached the CMS, and the backend's own 25 MiB MEDIA_MAX_UPLOAD_BYTES never got a say. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reindex moves to Settings
It is a maintenance action, not a browsing action, so it now sits alongside Taxonomy in Settings instead of in the Media page header.
Two behaviours the old button did not have:
GET /v1/media/indexon load joins an index already running — started before the page was opened, or by another admin — rather than showing an idle button while work is in flight.mediaPollActiveref stops the mount-resume and a click from both polling and fighting over the status message.409 is still treated as "join the running one", not an error. The empty-state hint on the Media page now points at Settings.
Uploads were failing with 413
Nginx's stock
client_max_body_sizeis 1m. The backend allows 25 MiB (MEDIA_MAX_UPLOAD_BYTES), but Nginx rejected anything larger than 1 MB before the request ever reached it — so any ordinary phone photo failed, with the app looking correctly configured./v1/now setsclient_max_body_size 26m, just above the backend limit, so the backend stays the component that decides.deploy/README.mdrecords that the two must be raised together.This one needs a deploy action: the site file has to be re-copied to Delta and Nginx reloaded. Merging alone does not fix the 413.
Checks
tsc --noEmit,eslint, andnpm run buildclean.🤖 Generated with Claude Code