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
- Wizard
{% if/elif %}step-leak (#1552) — root cause fixed at the WS-mount LOAD path. Bisect on the reporter's consumer (NYC Claims wizard) narrowed the regression window to 0.9.7rc1 (GOOD) → 0.9.7rc2 (BAD), with PR #1466 / commita5e2c50c(feat(websocket): persist LiveView state on WS event for reconnect continuity) as the single feature commit in that window. PR #1466 changedhandle_mount's LOAD gate fromif has_prerendered:toif has_prerendered or saved_state:AND made therequest.session.aget(view_key, {})read itself unconditional — every view got its previously-saved session state restored on every WS mount, including views that never opted in viaenable_state_snapshot. For non-opt-in views, that restoration ran AFTERmount()had initialized the view; the nextrender_with_diff()then diffed against a baseline clobbered by the session-restored state, producing patches that reference dj-ids that don't correspond to the client's actual DOM. The applier'squerySelector(':scope > [dj-id=X]')failed, fell back to index resolution, and removed the wrong node afterInsertSubtreehad shifted positions — the old wizard-step subtree survived in the DOM. Visible symptom: the #1552 wizard step-leak. PR #1478 (commit066d7f05, closing issue #1475) later added a SAVE-side gate onenable_state_snapshot, fixing snapshot-on-idle write amplification but leaving the LOAD path unconditional — so the client-DOM-mismatch bug introduced by PR #1466 survived through 0.9.7rc3, 0.9.7 final, and all 1.0.0 rcs through rc8. The fix gates thesaved_stateread inhandle_mountsymmetrically with PR #1478's SAVE-block gate:saved_state = await request.session.aget(view_key, {}) if request.session and getattr(self.view_instance, "enable_state_snapshot", False) else {}. Behavior preserved for opt-in views (enable_state_snapshot = True) — PR #1466's reconnect-resume capability still fires for them. Behavior restored to 0.9.7rc1 for default views. Verified end-to-end on the consumer (#1552 reporter's NYC Claims wizard,djust==1.0.0rc8+ this patch): step 1 → 2 → 3 → back transitions all produce exactly oneh2.card-titlein the DOM, no leak. PR #1466's 10 reconnect tests (python/djust/tests/test_ws_reconnect_state_1465.py) preserved unchanged for opt-in coverage; thetest_load_gate_loosened_fires_on_saved_state_without_has_prerenderedassertion was strengthened to require BOTHrequest.sessionANDenable_state_snapshotin the gate (passes Action #1200/#1468 gate-off self-test). First PR in the #1552 saga to satisfy the multi-reopen rule (Action #1389 / PR #1086 precedent) via bit-exact end-to-end verification on the reporter's exact environment; PRs #1553 (test-pinning), #1555 (dj-id counter fix — adjacent issue), and #1564 (framework-pin investigation) worked at framework-synthetic shapes and could not reproduce the user-visible symptom because the bug lived in the LOAD path that those reproducers exercised correctly.