Skip to content

Boards 0.4.1: Collaboration works again after the 0.4.0 hook change

Boards 0.4.1 fixes 0.4.0, where boards were never collaborative: the board’s browser code was refused with a 403 on every load, even for a signed-in admin.

Phoenix’s CSRF protection refuses a script loaded this way. The route that serves the code now skips that check. That is safe here because the file is the same for every visitor and carries no user, session or board data.

A failed load was also remembered, so the tab stayed without collaboration until a reload. It is now retried when you open another board. When it fails, the browser console says why: the CSRF guard on a 403, or the page’s Content-Security-Policy when the file arrived but was blocked.

Full release notes: Boards 0.4.1

0.4.1 · 11 August 2026

Fixed

  • The hook bundle was refused with a 403 on every load, so boards were never collaborative (#5). 0.4.0 moved hook delivery onto a route this module serves, and Plug.CSRFProtection refuses any GET that returns a JavaScript content-type, is not an XHR, and has not opted out — all three held, because the shim loads the bundle with document.createElement("script"). The guard runs in before_send, so a signed-in admin with a perfectly good session got the same 403 and it never presented as an authorization problem. The route now sets plug_skip_csrf_protection, which is safe here: the bundle is read at compile time and is byte-identical for every visitor, carrying no user, session or board data.

  • A failed bundle load was memoized, so one bad response left the tab non-collaborative until someone reloaded it, and navigating between boards never retried. The failure is now forgotten, and the dead <script> node is removed rather than left in <head>.

Changed

  • A failed load now says why. A script element’s error event carries no status, so the shim refetches and reports it — naming CSRF’s cross-origin-script guard on a 403, and the page’s Content-Security-Policy when the refetch succeeds (the response was fine; something blocked execution). It also no longer contradicts itself: the “loaded but defined no hooks” message is suppressed on a path where nothing loaded at all.

Boards 0.4.1. Install or update: {:phoenix_kit_boards, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.