djust 1.0.0rc17

Pre-releaseReleased
Install
pip install djust==1.0.0rc17

This is a pre-release. djust 1.0.0 has shipped since: read the djust 1.0.0 release notes.

Before you upgrade, read the upgrade guide.

Fixed

  • Rapid events on a self-broadcasting view no longer storm full-HTML recovery + reconnect (#1677). When a view's event handler calls push_to_view() for its own view (the djust new scaffold's react/vote/post_message demos), the triggering session received both its direct event response (VDOM version N) and its own self-broadcast (N+1, N+2…). The client tracks a single VDOM version with a strict sequential check, so under rapid bursts the interleaved non-sequential versions read as corruption → a request_html full-HTML recovery on every gap (a re-fetch + morph storm), with an occasional location.reload()/WS reconnect when the socket hiccupped mid-storm. The originating session already has the state from its direct response, so the self-broadcast is redundant: push_to_view now tags broadcasts with the originating channel (a ContextVar set during event handling) and server_push skips a broadcast whose sender_channel matches the receiving session — leaving the delicate client version-check untouched. Broadcasts to other sessions and external pushes (Celery, cross-view; sender_channel is None) are unaffected. Semantic note: a handler's push_to_view to its own view no longer echoes back to the triggering session — set state directly on self for local updates (the normal pattern). Pinned by tests/unit/test_push_self_broadcast_1677.py (gate-off verified).

  • {% kanban_board %} no longer fails VDOM patching on every card move (#1678). The tag rendered cards and columns as positional HTML with no dj-id/dj-key anchors. Since it wires drag-and-drop to a move_event, the natural usage is a stateful LiveView that re-renders after a card changes columns — but that shifts per-column child counts, so the VDOM differ patched against stale positional node paths: ~half the patches failed and every drag paid a full html_recovery morph + extra round-trip. Cards now carry dj-key="<card id>" and columns dj-key="<col id>" (the keyed-reconciliation anchor → VNode.key), so the differ reconciles by identity across the move instead of by position. Pinned by python/djust/components/tests/test_kanban_djkey_1678.py.

  • client.min.js no longer crashes with ReferenceError: ie is not defined in production (#1676). P0: after the #1635 single-IIFE wrap, terser --mangle renamed a cross-module function declaration (applyPatchesie) and relocated it so a caller's await ie(...) no longer resolved — crashing the minified client (served when DEBUG=False) and triggering a WebSocket reconnect loop. The unminified client.js resolves the reference via the shared outer-IIFE scope, so the bug was production-only and invisible to the (unminified-only) unit suite. Fix: scripts/build-client.sh now passes terser --keep-fnames, preserving function names through mangling so no cross-module reference can be renamed out of scope. This is terser-version-independent and covers the whole class of cross-module functions (not just applyPatches). Costs ~2 KB gzipped (correctness over size for a prod-breaking class). Guarded by a structural check (tests/js/min_bundle_applypatches_1676.test.js) asserting the minified bundle preserves the names; gate-off verified (drop --keep-fnamesapplyPatches mangles to ie → the guard fails). Reproduction note: the crash is browser-runtime/terser-version specific and does not reproduce under jsdom/Node V8, so the fix rests on the reporter's bit-exact prod console evidence + structural verification.

All releases · Atom feed