PhoenixKit 1.7.108: Deep zoom for large images and Russian and Estonian media pages
PhoenixKit 1.7.108 adds deep zoom to the media viewer: the image gets sharper as you zoom, and very large images can be cut into tiles on demand.
Deep Zoom Tile Generation in the storage settings is off by default and needs ImageMagick. When on, the tiles for an image are made the first time someone zooms that far, stored like other files and then reused. They stay out of the media browser and are deleted with their image. When off, the viewer still switches between the medium and large versions.
The media browser, the Modules page, the sidebar and the sitemap settings are now translated, with Russian and Estonian. Messages with two numbers use the right plural forms. Admin and module settings pages use more of a wide screen, and labels on multilingual forms sit above their fields again.
Upgrading
Run mix phoenix_kit.update for V112 and V113. V112 adds archiving, translations and manual order for the Projects module and drops the unique name rules for projects and tasks. V113 marks system files and adds a table linking comments to files.
Full release notes: PhoenixKit 1.7.108
1.7.108 · 11 May 2026
Added
- V112 migration:
phoenix_kit_projects*schema evolution (PR #533)archived_at TIMESTAMP(0)onphoenix_kit_projectsso the admin dashboard can soft-hide projects without flipping a status enum. Mirrors the workspace convention used byphoenix_kit_publishing’sposts.trashed_atandphoenix_kit_files.trashed_at— null = visible, non-null = soft-hidden, with the timestamp doubling as audit metadata. Existingstatus = 'archived'rows backfilled intoarchived_atso the dashboard filters keep working transparentlyphoenix_kit_projects_visible_idxpartial index on(inserted_at DESC) WHERE archived_at IS NULL— one partial covers both project-list and template-list dashboard reads (neither view shows archived rows)translations JSONB NOT NULL DEFAULT '{}'onphoenix_kit_projects,phoenix_kit_project_tasks,phoenix_kit_project_assignmentsfor per-language overrides on user-input content (name / description / title). Primary stays in dedicated columns; JSONB only carries non-primary overridesposition INTEGER NOT NULL DEFAULT 0onphoenix_kit_projectsandphoenix_kit_project_tasksso the drag-and-drop reorder API can persist manual ordering. Existing rows fold into the0bucket and the schema’s secondary order-by-inserted_atkicks in until a user actually dragsscheduled_start_dateretyped fromDATEtoTIMESTAMP(0)so scheduled-overdue detection honors time-of-day (a project scheduled for today 09:00 flips to:overdueat 09:01, not at midnight). Column name kept — lying name + honest type beats the churn of renaming every call site- Drops the three remaining unique-name indexes —
phoenix_kit_projects_name_template_index,phoenix_kit_projects_name_project_index,phoenix_kit_project_tasks_title_index. Name uniqueness is now policy, not schema — editing or duplicating names no longer trips a stale index, and future renames don’t need migration coordination - Bumps migrator
@current_version111 → 112 — without this V112 was dead code - All steps idempotent (column-existence, index-existence, USING coercion clauses);
down/1reverses each change so a rollback restores the V111 shape.down/1restores the V105/V101 unique indexes first, before dropping any V112 columns, so a duplicate-name conflict at rollback aborts cleanly rather than leaving a half-rolled schema
test/phoenix_kit/migrations/v112_test.exs— pins every V112 addition (archived_at column + type + nullability, visible-index existence AND predicate shape, translations JSONB on the three tables, scheduled_start_date retype, position columns) plus the four dropped indexes and the duplicate-name behavior. The predicate test refutes anyis_templatemention, closing the docs-drift loopdev_docs/pull_requests/2026/533-v112-projects-schema-evolution/CLAUDE_REVIEW.md— post-merge review with finding dispositions- V113 migration: system-managed media flag for Tessera deep-zoom tiles + comments↔files junction (PR #534)
system_managed BOOLEAN NOT NULL DEFAULT falseonphoenix_kit_files— marks internally-generated media (DZI tile pyramids + per-tile chunks) so the MediaBrowser excludes them from user listings and the variant generator skips them (tile chunks don’t need small / medium / large — just an"original"FileInstance)parent_file_uuid UUIDnullable FK tophoenix_kit_files(uuid)ON DELETE CASCADE — system-managed tile rows cascade away when their source image is hard-deleteduser_uuiddrops NOT NULL — system-managed rows belong to a parent File, not a user. The DB-level CHECKphoenix_kit_files_user_or_parent_checkenforces “user_uuid IS NOT NULL OR parent_file_uuid IS NOT NULL” so raw inserts can’t violate the invariantphoenix_kit_files_system_dedup_indexpartial unique index on(parent_file_uuid, file_name) WHERE system_managed = true— concurrent lazy-generation requests for the same uncached tile dedupe at the DB level via the changeset’sunique_constraint;Storage.store_system_file/3recovers the winner’s row on conflict- Two more partial indexes —
phoenix_kit_files_parent_uuid_index(per-source lookup + cascade-cleanup) andphoenix_kit_files_system_managed_index(keeps the MediaBrowser’s “user files only” sort cheap as the tile catalog grows) phoenix_kit_comment_mediajunction table letting the comments module attach core File rows to comments with position + caption. Cascade oncomment_uuid, RESTRICT onfile_uuid(a file can’t hard-delete while attached). Consumer code lands in a later PR- Bumps migrator
@current_version112 → 113; all DDL idempotent viaIF NOT EXISTS/ DO-blocks
- Deep Zoom Image viewer in MediaBrowser via Tessera (OpenSeadragon wrapper, PR #534)
- New
Tessera.Viewer.viewerreplaces the static<img>in the file modal;tessera_sources/1builds the progressive layer list (medium → optional large → DZI manifest) <Tessera.Storage>adapter (PhoenixKit.Modules.Storage.TesseraAdapter) lands tile writes in the storage pipeline (multi-bucket viaManager.store_file/2+ a system-managed File row viaStorage.store_system_file/3)- Two new public endpoints —
/tiles/:token/:dzi_filenameand/tiles/:token/:files_segment/:level/:tile_filename— generate the DZI manifest and individual tiles lazily on first request, then serve from storage. SignedURLSignertoken in the URL path (not query) so OpenSeadragon’s tile-URL derivation preserves it across manifest → tile fetch. The “dzi” variant name is distinct from storage variants so a leaked file-serving token can’t grant tile access. Unauthorized requests return 404 to prevent UUID enumeration - Per-
file_uuid:global.set_lockmutex + double-checked locking around the generators serializes concurrent cold-path requests for the same image; different images stay parallel. Lock timeout surfaces as 503 +Retry-Afterheader - Tempfile lifecycles wrapped in
try/aftersoTessera.generate_tile/4orManager.retrieve_file/2exceptions don’t leak files intoSystem.tmp_dir!() - New storage setting
storage_tile_generation_enabled(default"false") is the kill switch — when off, MediaBrowser emits no manifest URLs and the tile endpoints return 404
- New
Storage.store_system_file/3— context helper for system-managed media (tiles, manifests). Idempotent: check-then-insert with unique-violation recovery via the new dedup index, so two concurrent writers for the same key both end up with the same rowStoragequery helperexclude_system_managed/1— applied to everylist_*/count_*/ orphan / trash query so system-managed rows are invisible in the MediaBrowser regardless of how the query is composedtest/phoenix_kit/migrations/v113_test.exs— pins every V113 addition (system_managed column shape, parent_file_uuid FK with cascade verification, user_uuid nullability change, three indexes including the partial-unique dedup, CHECK constraint with a raw-SQL test that double-null inserts are rejected, comment_media table + its two indexes)dev_docs/pull_requests/2026/534-media-browser-tessera-tiles/CLAUDE_REVIEW.md— review with finding dispositions; CRITICAL + HIGH items fixed in the same release
Changed
<.translatable_field>inPhoenixKitWeb.Components.MultilangForm— wrapper nowflex flex-col gap-1and base input/textarea classes carryw-full(commits52856738,0412beaf). daisyUI 5’s.labelisinline-flexand.input/.textareaareinline-block, so without forcing column direction here label and field sat on the same row. Aligns the multilang form’s layout with the regular<.input>core componenttest/phoenix_kit/migrations/v106_test.exs— dropped the “schema state (verified at boot)”describeblock (its assertions pinned V112’s drops, not V106’s adds — moved toV112Test). File now scoped to V106’sdown/1cross-mode duplicate pre-check, matching its filename
Fixed
- V112
down/1rollback ordering (post-merge review fix, commit0cde04a8). Originaldown/1dropped columns before restoring unique indexes; if post-V112 work introduced any duplicate names (V112’s whole purpose), theCREATE UNIQUE INDEXwould raise mid-rollback after columns were already gone. Reordered so index restoration runs first - V112 visible-index predicate docs/code alignment — migrator moduledoc claimed
WHERE archived_at IS NULL AND is_template = falsebut actual index only filtered onarchived_at IS NULL. Docs updated to match the emitted SQL with rationale (one partial covers both visible projects and visible templates) - MediaBrowser i18n — list-view dropdown duplicates of the folder menu (Color heading, delete data-confirm, Delete button) were missed in the original sweep; wrapped so list view matches grid view. Three flash/confirm messages embedded two independent counts in a single
gettextcall which made correct pluralization impossible in Russian (3 forms) and Estonian (2 forms); each composed from twongettextcalls injected into the surroundinggettexttemplate (PR #532)
i18n
- MediaBrowser UI strings wrapped in gettext + Russian and Estonian translations (PRs #532, plus earlier commits
c717c9d0/d44bf95c) /admin/modulespage strings wrapped in gettext + ru/et translations (PR #530)- Core sidebar tabs wired to
PhoenixKitWeb.Gettextfor ru/et (PR #529, commits43e528ac/c5fd5bae) - Sitemap settings UI strings wrapped in gettext (commit
afcc281a) - General Settings widened +
/admin/modules/languagesstrings wrapped (commit24ceec90) - Core
badge.ex+time_display.exstatus strings wrapped (commit1fe0ad78) - 9 new tab-label msgids + complete Estonian translation in
default.po(commit373478f5) - Bare
Activebadge inusers.html.heex:278wrapped (commit8a341e90)
Layout
- Admin settings pages widened for wide screens (commit
3ea70ec1) - Module settings pages — sitemap, storage, referrals — widened for wide screens (commit
d867cb57)
Hygiene
mix formatreflow of long-linegettext/ngettext/put_flashcalls inmedia_browser.exandmedia_browser.html.heex(commit9841ac31). Surfaced whenmix precommitran during V112 review-followup work; no semantic changes- New Hex dep:
{:tessera, "~> 0.1"}— OpenSeadragon wrapper used by the Deep Zoom viewer
PhoenixKit 1.7.108. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.