Catalogue 0.12.4: Searches and filters are kept in the address
Catalogue 0.12.4 keeps the search and filters in the page address on the catalogue list, a catalogue’s page and the PDF library.
A filtered list is now a real link: it can be shared or bookmarked and survives a reload. The search goes into ?q= on all three pages, a catalogue’s page keeps the open category in ?category=, and the PDF library keeps its active or trashed filter in ?filter=. The browser’s back button leaves the page instead of undoing the search one letter at a time.
The search box now also shows whenever search results are on screen, so they can always be cleared, including on a Deleted view.
Upgrading
The new address handling uses PhoenixKitWeb.Live.UrlState, which first shipped in PhoenixKit 1.7.231. Make sure your PhoenixKit is at least that version.
Full release notes: Catalogue 0.12.4
0.12.4 · 5 August 2026
Added
- The catalogue list search and filters now live in the URL (#49) —
CatalogueDetailLive,CataloguesLiveandPdfLibraryLiveadopt core’sPhoenixKitWeb.Live.UrlState(:patchmode), so a filtered list is a real link:?q=on all three,?category=on the detail drill-down (already there, now joined by the search), and?filter=active|trashedon the PDF library. Filtered lists are shareable, bookmarkable, survive a reload, and the Back button leaves the query instead of the page. Debounced search boxes push withreplace: true, so Back doesn’t walk the query backwards a few characters at a time.
Fixed
mix testaborted outright on any machine withoutpsql—test/test_helper.exsprobed for the test database withSystem.cmd("psql", …), which raisesErlangError :enoentwhen the binary isn’t onPATHrather than returning a tuple itscasecould fall through on. A missing libpq client therefore killed the whole run before a single test loaded, instead of taking the documented path of excluding:integrationand running the rest — which is why the last three releases all shipped with “mix testcould not be run in this environment” in these notes. Now probed withSystem.find_executable/1first; the suite completes (525 tests, 787 integration excluded) with no database present.- An empty
?category=on the catalogue detail page left""in the assign (#49 follow-up) —handle_url_state/2normalized the value into a local but not back into@current_category_uuid, so the root-level item-list DOM ids came outitems-body-instead ofitems-body-root, and becausepush_url_state/3reads its merge base back from the assigns, the empty?category=was re-written into the URL on every subsequent search patch. - Search results could be stranded on screen with no way to clear them (#49 follow-up) — now that
?q=survives the level load, a deep link into a category whose Active tab is empty settles the level on the Deleted view, where<.search_input>was hidden — leaving the rendered results (usually the empty state, since the context search excludes deleted rows) with no visible clear control. The input now also renders whenever a search is on screen.
Notes
- Review:
dev_docs/pull_requests/2026/49-url-state-search/CLAUDE_REVIEW.md. - Dependency lockfile advances (no
mix.exsconstraint changes): eight orphanedmix.lockentries left behind by the dependency bump in242bad9(ex_ast,glob_ex,igniter,owl,rewrite,sourceror,spitfire,text_diff) were pruned — they were failingmix precommit’sdeps.unlock --check-unusedstep. Constraints stay loose. - Verification:
mix precommitis clean (compile--warnings-as-errors,deps.unlock --check-unused,hex.audit,format --check-formatted,credo --strict,dialyzer).mix testruns but excludes the:integrationsuite — no Postgres in this environment — so the new?q=round-trip tests on all three LiveViews have not been executed; get a Postgres-backed CI run before treating the URL round-trip as verified.
Catalogue 0.12.4. Install or update: {:phoenix_kit_catalogue, "~> 0.12"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.