Hello World 0.1.5: LiveView tests and sturdier demo pages
Hello World 0.1.5 gives the PhoenixKit module template a full LiveView test setup and makes its demo pages harder to crash, so modules cloned from it start with both.
The template now has its own test endpoint, router and layouts, a case for LiveView tests with a fake signed-in user, a helper to check activity-log rows, and 25 tests across its three pages.
On the pages themselves, each one ignores unexpected messages instead of crashing. The Log demo event button is disabled while it submits, so a double click logs one event. The visible strings are wrapped for translation. The landing page reads whether the module is enabled once per navigation instead of four times per render.
Full release notes: Hello World 0.1.5
0.1.5 · 29 April 2026
Added
- LiveView test infrastructure: in-repo
Test.Endpoint/Test.Router/Test.Layouts,LiveCasewith fake%Scope{}plumbing via session,ActivityLogAssertionshelper,Hooks.on_mount/4, and a dedicated test migration creatingphoenix_kit_settings,phoenix_kit_activities, anduuid_generate_v7() - 25 new tests across the three LiveViews (mount, gettext-wrap regressions,
handle_info/2catch-all smokes, demo-event end-to-end with activity row assertion) mix test.setup/mix test.resetaliases andlazy_htmltest-only dep- Defensive
handle_info/2catch-all in all three LiveViews so a stray PubSub broadcast or OTP message can’t crash the page withFunctionClauseError phx-disable-withon the “Log demo event” button to prevent double-logging on double-click- AGENTS.md sections: “What This Module Does NOT Have”, “Code Organization: Section-Decomposition Pattern”, and full Testing infrastructure walk-through
Changed
- Decompose
ComponentsLive742-linerender/1into 22 per-sectiondefp x_section/1function components for easier navigation; pinned by a section-count test - Move
enabled?/0resolution inHelloLivefrom render-time DB call tohandle_params/3assign — was hittingSettings.get_boolean_setting/2four times per page (mount × render × 2 calls), now once per navigation - Wrap user-facing strings in all three LiveViews with
Gettext.gettext(PhoenixKitWeb.Gettext, …)(status badges, page headings, filter labels, dt labels in the Module Info / Current User cards, next-steps copy, detail-linktitle, “View details”, “All events loaded”,phx-disable-withtext) - Add
@specannotations to all public functions inPhoenixKitHelloWorld.Paths
Fixed
enabled?/0now alsocatch :exit, _— when a sandbox-using test exits and the next test callsenabled?/0, the connection-pool checkoutEXITs with"owner #PID<...> exited", whichrescuedoesn’t catch (was a 1-in-10 flake)test_helper.exsno longer crashes withErlangError :enoentwhenpsqlisn’t on$PATH— falls through to the connect probe so integration tests are gracefully excluded- Replace tautological “detail-link title is gettext-wrapped” test with a source-grep that actually fails on revert
Hello World 0.1.5. Install or update: {:phoenix_kit_hello_world, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.