PhoenixKit 1.7.228: The installer stops editing app.js, guest carts survive login
PhoenixKit 1.7.228 stops mix phoenix_kit.install and mix phoenix_kit.update from editing your assets/js/app.js, and keeps a guest’s shop cart when they sign in.
The installer added a viewport_width value to the LiveSocket params in app.js. Nothing in PhoenixKit or its modules reads it, so the step is gone. A line written by an earlier run stays and does no harm; delete it by hand if you like.
Also in this release:
- A guest who filled a shop cart and then signed in lost the cart. The cart is now found from the session and merged.
- The HTML sanitizer used for rich text and rendered Markdown is now a parsed allowlist instead of patterns. It also drops
idattributes,<input>(so Markdown checkboxes) and<tfoot>, and addsrel="noopener noreferrer"to links. - The app’s router is now rebuilt when a module’s routes change, not only when modules are added or removed.
- The shop admin routes are no longer declared twice.
Full release notes: PhoenixKit 1.7.228
1.7.228 · 4 August 2026
Removed
-
The installer no longer rewrites the host’s
assets/js/app.jsto add aviewport_widthconnect param.mix phoenix_kit.install/mix phoenix_kit.updateedited the host’s LiveSocket options intoparams: () => ({_csrf_token: csrfToken, viewport_width: window.innerWidth}), justified by responsive PhoenixKit LiveViews reading the width server-side on first render. No such reader was ever written — nothing in core or in any module package readsviewport_width, andphoenix_kit_dashboards, the named beneficiary, has no viewport logic at all. The producer shipped, the consumer never did. Editing a host’s application source to send a value nothing reads is not something a library should do quietly, so the step and its transform (JsIntegration.inject_viewport_param/1and helpers) are gone.Existing hosts keep the line — this removes the step, not what earlier runs already wrote. It is inert and safe to leave; delete it by hand if you want the diff clean. Reported by a host that found the edit in an unexplained
git diff.Note for the report that prompted this: the edit came from
phoenix_kit.install/update, not from the:phoenix_kit_js_sourcescompiler, which only ever writespriv/static/assets/vendor/.
PhoenixKit 1.7.228. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.