Persist media rotation for any user, not just admins - #646
Merged
Conversation
The rotation saved to a file is its shared orientation (metadata ["rotation"]) — every viewer sees it — so gating the write on admin context was arbitrary: a non-admin who could open and rotate a file in an embedded browser saw the turn but it never stuck. The browser popup now passes persist_rotation unconditionally (the detail page already did). The Details link stays admin-only; it targets the admin page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
Credo --strict flagged three fully-qualified Phoenix.LiveView.Lifecycle calls (nested-module-alias suggestion) from PR BeamLabEU#643, which turned mix precommit red. Alias it at the top and use the short form. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
ddon
pushed a commit
that referenced
this pull request
Jul 18, 2026
Co-Authored-By: Claude Opus 4.8 <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.
Summary
metadata["rotation"]) — every viewer sees it — so gating the write on admin context was arbitrary. A non-admin who could open and rotate a file in an embedded browser saw the turn but it never stuck. The media browser popup now passespersist_rotationunconditionally (the detail page already did). The Details link stays admin-only; it targets the admin page.persist_rotationattr +fresco:rotatebridge, shipped in fresco 0.9.0). This change is purely phoenix_kit's policy on top of it — who may persist, and to where (the file's DB row). Nothing to push into Fresco.Also
Phoenix.LiveView.Lifecycleinmultilang_form_test.exs—credo --strictflagged three fully-qualified calls (nested-module-alias) that came in with Component polish: search-picker on-focus, nav_tabs pulse, multilang auto switch-handler #643 and had turnedmix precommitred onmain. Unrelated to the rotation change; folded in to get precommit green.Test plan
mix precommitgreen (was red before the credo fix — a pre-existing Component polish: search-picker on-focus, nav_tabs pulse, multilang auto switch-handler #643 issue, confirmed on the base commit)./admin/mediais admin-gated; the change is a one-attribute gate removal.🤖 Generated with Claude Code
https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL