Uh oh!
There was an error while loading. Please reload this page.
Media: small header default, cover/logo visibility, trash scoping, et fixes - #648
Merged
Merged
Conversation
ddon
commented
Jul 18, 2026
Contributor
Please resolve the conflict |
ddon
commented
Jul 19, 2026
Contributor
And here we also still have conflicts @timujinne |
New folders open with a small hero header instead of medium (less vertical space up front). Changed the schema default on Folder, plus migration V152 that flips the phoenix_kit_media_folders.header_size column default 'medium' -> 'small' and backfills existing 'medium' rows to 'small'. 'medium' was the old default, so a stored 'medium' reads as "never touched" and resets. 'large' was never a default, so it's a deliberate choice and is left alone; existing 'small' is untouched. A folder someone deliberately set to medium also resets (medium and default-medium are indistinguishable in the data) — documented in the migration; medium stays re-pickable from the header control. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
Setting a file as a folder's hero background or icon dropped it from that folder's grid — list_files_in_scope ran through exclude_folder_header_assets, which filtered out cover_file_uuid / logo_file_uuid. A cover/logo is still a normal file in the folder and should show like any other. Removed the exclusion (and its now-dead helper); count_folder_contents never excluded them, so the grid now matches the header's file count instead of disagreeing with it. Regression test asserts a cover + logo + plain file all list (verified to fail with the exclusion in place). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
18 media-page strings were mistranslated — mostly fuzzy/copy-paste artifacts from gettext.merge matching to similar strings. Wrong-meaning ones: "Create folder" was "Loo roll" (Create role), "Folder name" was "Kaust teisaldatud" (Folder moved), "Documents" was "Kommentaarid" (Comments), "Filter" was "Fail" (File), "Large" was "Sihtmärk" (Target), "Medium" was "Meedia" (Media), "Header size" was "Pealkiri" (Title), "Add description" was "Kirjeldus" (Description), "Show description" was "Kirjeldus puudub" (No description), "Choose" was "Sulge" (Close), "Close search" was "Tühjenda" (Clear), and the audio-tag fallback said "video-elementi". Also completed "Name A–Z"/"Z–A" (were just "Nimi"), filled the empty "Play / Pause", fixed "Archives" (Arhiveeritud -> Arhiivid), dropped a spurious "(lauaarvuti)" from "Background image", and restored the "add one" prompt on "No description — add one". Every affected string is media-only (verified), so the global catalog fix is correct everywhere it's used. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
Opening Trash inside a folder showed every root folder's trashed items, not just the folder you were in. Two causes: - The browser passed the embedded scope (nil on /admin/media) to the trash loaders, so at the top level trash was global. A new trash_scope/1 uses the current folder's subtree (falling back to the embed scope, or nil at the true root where "all trash" is correct). Routed every trash path through it — the view, the sidebar badge, and empty_trash, so emptying a folder's trash can't purge sibling roots' files. - list_trashed_folders / count_trashed_folders never subtree-scoped — they only excluded the scope folder itself, leaving trashed folders effectively global. Now restricted to the scope's descendants via folder_subtree_uuids (which walks trashed folders too, so a trashed subfolder's trashed children stay reachable). The file-trash CTE was already correct; it just never got the folder. Tests: storage-level file + folder subtree scoping (folder test verified to fail against the old exclude-self stub), and a browser test that opens trash inside one root and asserts the other root's trashed file is absent (verified to fail against the old nil scope). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
In multiple-select mode you could only leave by clicking Cancel. Now Escape exits from anywhere, clearing the selection. A window-keydown is attached to the browser root only while select mode is on (so no global listener otherwise), and both Cancel and Esc route through a shared exit_select_mode/1 helper so they behave identically. Integration test enters select mode and asserts Esc removes the select toolbar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
alexdontforce-pushed
the
media-batch-header-cover-trash
branch
from
July 19, 2026 13:22
cd3b7a9 to
343db64Comparealexdont
marked this pull request as draft
July 19, 2026 13:22
Bumps fresco 0.9 -> 0.10 (with etcher 0.8.1 / tessera 0.3.4, which widen their fresco constraint to allow it). Fresco 0.10 adds a counter-clockwise rotate button to the canvas nav; the media viewer uses default nav_buttons, so it appears next to the existing one and persists through the already-wired fresco:rotate bridge — no viewer code change. Adds "Rotate left" / "Rotate right" to every per-file kebab (grid, list, and stacks-view card), images only. The new rotate_file event steps the file's metadata["rotation"] by ±90, saves it, and broadcasts the thumbnail refresh — the same persistence as the viewer's rotate button, so the grid thumbnail reorients live via the rotation_class CSS transform with no re-encode and no open viewer needed. Test drives the kebab: right -> 90, left -> 0, left again -> 270. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL
alexdont
marked this pull request as ready for review
July 19, 2026 14:45
ddon pushed a commit
that referenced
this pull request
Jul 19, 2026
Post-merge review of PR #648: the rollback doc said "Rolls V152 back" (copy-paste leftover) instead of V153 — misleading since V152 is a real, different in-progress migration. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ddon pushed a commit
that referenced
this pull request
Jul 19, 2026
Small-header folder default (V153), folder cover/logo no longer hidden from its own listing, media Trash scoped to the current folder's subtree, Esc exits select mode, kebab rotate-left/right, and Estonian mistranslation fixes — from PR #648. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ddon pushed a commit
that referenced
this pull request
Jul 19, 2026
Reviewed alongside PR #648 as part of the same release: no issues found, both the CHECK constraint and the incomplete-credentials flash are correctly implemented and tested. Co-Authored-By: Claude Sonnet 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 freeto 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.
Media batch, rebased onto latest
main(integrates #645's media changes). Four commits:Default folder header size to small
New folders open with a small hero header instead of medium. Schema default on
Folder+ migration V152 that flips thephoenix_kit_media_folders.header_sizecolumn default'medium'→'small'and backfills existing'medium'rows to'small'('medium'was the old default, so it reads as untouched;'large'is a deliberate choice and is left alone).Fix folder cover/logo files hidden from the folder listing
Setting a file as a folder's hero background or icon dropped it from that folder's grid —
list_files_in_scopefiltered outcover_file_uuid/logo_file_uuid. A cover/logo is still a normal file and should show. Removed the exclusion;count_folder_contentsnever excluded them, so the grid now matches the header's file count.Scope the media Trash to the current folder's subtree
Opening Trash inside a folder showed every root folder's trashed items. Two causes: the browser passed the embedded scope (nil on
/admin/media) to the trash loaders, andlist_trashed_folders/count_trashed_foldersnever subtree-scoped (only excluded the scope folder). Newtrash_scope/1uses the current folder's subtree everywhere — the view, the badge, andempty_trash(so emptying a folder's trash can't purge sibling roots).Fix Estonian mistranslations on the media page
18 media strings were mistranslated (fuzzy/copy-paste artifacts): "Create folder" was "Loo roll" (Create role), "Documents" was "Kommentaarid" (Comments), "Large" was "Sihtmärk" (Target), "Medium" was "Meedia" (Media), etc. Plus filled the empty "Play / Pause" and completed "Name A–Z"/"Z–A".
Test plan
mix precommit+mix quality.cigreen on the rebased tree.media_browser.exagainst Fix media picker circle, selector route shadowing, and a media-surface bug sweep #645's trash-toggle improvements (folder reload on leave, selection clearing, page clamp) — all preserved alongside the new scoping.🤖 Generated with Claude Code
https://claude.ai/code/session_01MsjUy1HnuJnCSrqdbnANYL