djust 0.9.3rc1

Pre-releaseReleased

Fixed

  • Private state mutations no longer cause false noop (#1281). _snapshot_assigns() previously skipped all _-prefixed attrs via k.startswith("_"), so a handler that mutated only private state (e.g. self._orders) produced identical pre/post snapshots → the render was skipped → the client received a noop frame. The filter now uses view_instance._framework_attrs membership (captured at __init__) to distinguish framework-internal _-prefixed attrs from user-defined private attrs set in mount() or event handlers. 9 regression cases in test_skip_render_private_state.py.

  • _action_state now persists across WebSocket reconnects (#1284). The @action decorator populates _action_state[action_name] with {pending, error, result} so templates can reference {{ action_name.error }}. Previously _action_state was initialized before _framework_attrs capture in __init__, putting it in the framework-internal set that _snapshot_user_private_attrs and _restore_private_state exclude. It now initializes after the capture, so the standard user-private save/restore cycle handles it automatically. 6 regression cases in test_action_state_reconnect.py.

  • Snapshot truncation warning for large lists/dicts (#1285). _snapshot_assigns() now emits a one-shot logger.warning per view class when a list has ≥100 items or a dict has ≥50 keys. These containers have truncated content fingerprints (list: only (id, length); dict: only len(v) instead of a key tuple), so in-place mutations inside them are not detected by auto-diff. The warning tells developers to use set_changed_keys() or assign a new reference. 10 regression cases in test_snapshot_truncation_warning.py.

  • Change-detection unified: identity snapshots now use _framework_attrs (#1286). The push_commands-only auto-skip path (#700) had identity snapshots at lines 3001 and 3102 that still used k.startswith("_") to filter attrs, while _snapshot_assigns() was updated in #1281 to use _framework_attrs membership. This meant the two detection paths could disagree on whether private state changed. Both identity snapshots now use _framework_attrs, closing the dual-path discrepancy (weakness #8 from the lifecycle audit). 8 regression cases in test_change_detection_unified.py.

All releases · Atom feed