PhoenixKit 1.7.126: Catalogue PDF search works, and a folder tree for moving media
PhoenixKit 1.7.126 fixes text search for catalogue PDFs and makes moving media files easier. It also adds migration V125 for project workflow statuses.
The Catalogue module queues a text extraction job for every uploaded PDF, but the host’s Oban config had no catalogue_pdf queue. The jobs never ran, so uploads looked fine while PDF text search found nothing. The installer and mix phoenix_kit.update now add the queue.
In the media browser, the Move dialog shows a folder tree you can expand, opened the same way as the sidebar. Move stays disabled until something is selected. The view switch and count stay visible in empty folders, and an empty list says No results. Developers can give an embedded media browser shareable folder addresses with url_sync: true.
V125 adds per-project statuses, settings and an external ID for the Projects module.
Upgrading
Run mix phoenix_kit.update for V125 and the new queue.
Full release notes: PhoenixKit 1.7.126
1.7.126 · 30 May 2026
Added
-
MediaBrowser.Embedgains an opt-inurl_syncoption so any embedding LiveView gets shareable, deep-linkable folder URLs with one line:use PhoenixKitWeb.Components.MediaBrowser.Embed, url_sync: true
or, for a non-default component id / multiple browsers:
use PhoenixKitWeb.Components.MediaBrowser.Embed, url_sync: [id: "my-browser"]
It provides the full controlled-mode round-trip the host previously had
to hand-write (~50 lines), via LiveView lifecycle hooks attached in
on_mount (not injected handle_params/handle_info clauses) so it
composes with a host that already defines its own — e.g. an
…/orders/:id/edit/files page that loads the order in its own
handle_params. on_mount parses :initial_params from the URL, a
:handle_params hook feeds them to the component, and a :handle_info
hook intercepts the component’s {:navigate, …} and push_patches
folder / search / page / view onto the current path (every existing
segment — locale, parent ids, sub-tab — preserved). Folder is tracked
by uuid (stable across renames; unknown/out-of-scope falls back to
root); base path is taken from the live URL so router prefixes are
respected. Reusable parse_nav_params/1 + build_nav_query/1 helpers
are public. The host template passes on_navigate={:navigate} +
initial_params={@initial_params}. A push_patch issued from a
handle_info hook makes LiveView call view.handle_params/3
unconditionally, so the macro injects a trivial handle_params/3 stub
when (and only when) the host defines none — a host with its own keeps
it. (Note: changing the macro requires recompiling the host;
mix deps.compile phoenix_kit --force in a parent app after updating.)
The :handle_params hook only re-syncs the component when the parsed
folder / search / page / view actually changed, so unrelated host
navigation on a multi-purpose page doesn’t trigger a needless reload.
- Installer: the
catalogue_pdfOban queue (concurrency 2) is now added to the host Oban config onmix phoenix_kit.install/mix phoenix_kit.update(and to the fresh-install default queues).phoenix_kit_catalogueenqueues a:catalogue_pdfjob per uploaded PDF (pdfinfo+pdftotexttext extraction); Oban only runs listed queues, so without this entry the jobs satavailableforever — uploads looked fine but text search silently never worked. Added unconditionally (an idle queue costs nothing) so a host that later adds the catalogue module is already wired.
Changed
/admin/media(Live.Users.Media) now usesurl_syncinstead of its bespokehandle_params/handle_info/initial_paramsplumbing — behavior unchanged, ~45 lines lighter.- MediaBrowser Move modal: the destination picker is now a collapsible
directory tree (chevron expand/collapse + colored folder icons),
matching the left-sidebar experience, instead of a flat fully-expanded
dump of every folder in the project. It opens seeded from the
sidebar’s current expansion (
expanded_folders), so the picker shows the same open directories you already see on the left, then tracks its ownmove_expandedindependently (drilling in the picker doesn’t move the sidebar). The picker is a plain full-width<ul>(not a daisyUImenu, which laid the custom tree rows out horizontally and spilled past the box); names truncate and horizontal overflow is clipped so it fits the modal.
Fixed
- MediaBrowser: the grid/list view toggle and the item count no longer
vanish in an empty folder (or a folder that has subfolders but no
files). They were gated on
@total_count > 0(file count only); now shown whenever there are files, folders, or you’re inside a folder. <.pagination_info>renders “No results” attotal_count == 0instead of the nonsensical “Showing 1 to 0 results”.- MediaBrowser: the bulk Move button is disabled in Select Mode until
at least one item is selected (matching the Download/Delete actions,
which already hide with an empty selection). The
show_move_modalhandler is guarded too, so it can’t open an empty modal.
Migrations
- V125 — project workflow statuses (entities-backed, cement-at-start).
New
phoenix_kit_project_statusestable (the cemented per-project status snapshot:project_uuidFKON DELETE CASCADE,label/slug/position,data+translationsJSONB,source_entity_data_uuidprovenance with no FK; index on(project_uuid), unique on(project_uuid, slug)). New columns onphoenix_kit_projects:status_entity_uuid(FK →phoenix_kit_entitiesON DELETE SET NULL),current_status_slug, a genericsettingsJSONB, and a free-formexternal_id VARCHAR(255)for tying a project to an external system (not unique, not an FK; partial-indexedWHERE NOT NULL, set programmatically). Idempotent;down/0reverses to 124.@current_versionis now 125.
PhoenixKit 1.7.126. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.