djust 1.0.7rc1

Pre-releaseReleased

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

Added

  • System check T017 — warn on dj-view / dj-root on a table-section element (#1837). A new template static-analysis check (severity WARNING) flags a dj-view or dj-root attribute placed on an HTML table-section element (<tbody>, <thead>, <tfoot>, <tr>, <td>, <th>, <caption>, <col>, <colgroup>). Such a view renders to silent garbage: html5ever foster-parents the table elements out of the tree at render time, so <tbody dj-view="…">{% for %}<tr>…{% endfor %}</tbody> renders as <html><head></head><body>text</body></html> (all rows dropped) with NO error. The matcher is same-tag-scoped (a <div dj-view> wrapping a <table><tbody> does NOT false-match — the attribute must be on the table-section opening tag itself), word-boundaries the tag name so <trx / <tablefoo don't match, and tolerates attribute order / whitespace / case. The fix hint points the developer to a wrapping element (the <table> or a surrounding <div>). Honors DJUST_CONFIG['suppress_checks'] for both the short (T017) and fully-qualified (djust.T017) id forms. Covered by TestT017TableSectionRegex and TestT017CheckIntegration in python/tests/test_checks_t017_table_section_1837.py (regex word-boundary / attribute-order cases, fires/no-false-positive empirical canary per #1459, and suppression).

Fixed

  • WebSocket: recovery version no longer goes stale across non-arming render-send paths (#1817). After #1816 (#1788) every client-checked outbound frame stamps the consumer-owned _last_sent_version, and _arm_recovery captures _recovery_version = _last_sent_version at arm time; handle_request_html sends the html_recovery frame stamped with that _recovery_version. But several render-send paths advanced the wire version WITHOUT arming recovery — the async-result error arms, the deferred-activity render, the hotreload frame, the time-travel jumps (handle_time_travel_jump / handle_time_travel_component_jump / handle_forward_replay), and the tick / db_notify broadcasts. After such a frame the client's applied version was ahead of _recovery_version, so a later request_html returned an html_recovery stamped with the stale _recovery_version — the client reset clientVdomVersion backwards and the next successful diff's data.version - 1 no longer matched, forcing an extra recovery round-trip (severity low, post-#1785: an extra round-trip, not data loss). Structural cure (#1646 parallel-path discipline): one helper, _next_version_armed(html), advances the wire version AND arms recovery in a single step, and every render-send path is routed through it; non-render baselines (mount) stay on bare _next_version(). The actor event path is left on bare _next_version() pending follow-up (its result['html'] is not the pre-strip render the recovery path expects). New end-to-end regression test test_time_travel_jump_recovery_version_is_current (a real WebsocketCommunicator round-trip) plus helper-level unit tests in python/djust/tests/test_recovery_version_staleness_1817.py; the _next_version_armed render-send call-site count is pinned by test_every_client_checked_send_path_uses_next_version in python/djust/tests/test_ws_send_version_1788.py, and the consolidated single _arm_recovery call site is pinned by test_arm_recovery_call_site_count_matches_known_send_paths in tests/unit/test_arm_recovery_helper_1645.py.

All releases · Atom feed