Skip to content

Billing 0.5.3: Billing admin pages get their full styling back

Billing 0.5.3 fixes billing admin pages that rendered without part of their styling, because the app’s Tailwind build never scanned the billing templates.

Billing was the only PhoenixKit module that did not tell core where its templates live. Core’s Tailwind source list therefore had no line for it, and any class used only in billing’s templates was left out of the app’s CSS. Nothing failed; the pages just lost their responsive and variant styles. The module now declares its sources.

The same callback was also missing on the older PhoenixKit.Modules.Billing name, which an app can register in config :phoenix_kit, modules: [...]. Apps that do so also lost billing’s notification types (billing, invoices, your_billing). Both are now passed through.

Upgrading

Update the dependency and rebuild your assets, so the billing classes reach the app’s CSS.

Full release notes: Billing 0.5.3

0.5.3 · 6 August 2026

PR #17 plus its post-merge review. The PR fixed a callback whose absence is completely silent; the review found the same callback still missing on the module’s other public face, and a drift test structurally unable to catch either. Full findings in dev_docs/pull_requests/2026/17-css-sources-callback/CLAUDE_REVIEW.md.

Fixed

  • Tailwind purged every class used only in billing’s templates from host builds. This module never implemented css_sources/0, so core’s :phoenix_kit_css_sources compiler — which guards on function_exported?/3 and emits nothing for a module that doesn’t export it — wrote no @source line for the package. Nothing errored; the admin billing pages simply rendered without their responsive and variant utilities. Billing was the only PhoenixKit module missing the callback (PR #17).
  • The PhoenixKit.Modules.Billing compat shim still had the bug. The shim re-exports the module surface under the pre-migration namespace, and a host can register it: ModuleDiscovery merges beam-scanned modules with config :phoenix_kit, modules: [...] — the very fallback core’s zero-sources error message recommends. css_sources/0 was not delegated, so hosts on that path kept the purged bundle. notification_types/0 was missing for the same reason, which silently dropped billing’s whole notification tree (billing, invoices, your_billing) from the registry.

Changed

  • The compat drift test now guards both directions. It previously asserted only that nothing the shim delegates has vanished from the target, so a callback added to PhoenixKitBilling and not re-exported — exactly the two above — could never be flagged. Closes the “no compat-module drift tests” item deferred in AGENTS.md.
  • css_sources/0‘s regression test now also asserts against Application.get_application/1 rather than only a repeated literal, so a package rename fails the test instead of quietly emitting an @source for a directory that isn’t there.
  • notification_types/0 carries @impl PhoenixKit.Module; it is a declared optional callback, not the duck-typed hook its doc described.
  • AGENTS.md’s “Tailwind CSS Scanning” section asserted this module implemented css_sources/0 from the initial scaffolding commit onward, while the code never did — the doc confirmed the callback to anyone who checked it instead of exposing the gap. Rewritten with the real mechanism (a Mix compiler regenerating assets/css/_phoenix_kit_sources.css, not the installer writing app.css), an explicit note that the callback fails open, and a warning not to copy core’s @source_root path-dep example here — this module’s callback lives one directory shallower, so Path.join(__DIR__, "../..") would resolve to deps/ and emit an @source over the entire dependency tree.

Billing 0.5.3. Install or update: {:phoenix_kit_billing, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.