Skip to content

fix: avoid unchanged dynamic-widget builder writes - #5003

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-4937
Nov 1, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-4937

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The dynamic-widget builder reset hidden flags and source/error text on every generation attempt, even when those values already stood in the DOM. Repeated attempts therefore triggered the unchanged-write watch in the navigation journey. The builder now uses the public keepsHidden and keepsText helpers for its imperative presentation writes, avoiding redundant mutations while retaining the same displayed states.

This preserves the live comparison introduced by #4299, including fresh generation attempts and both output formats. No runtime, layout, labels or test assertions change.

Verification: tests/journeys/test_render_navigation.py::test_presses_and_fills_leave_no_element_naming_stale_keys[dynamic-widgets] reproduced all six reported findings before the fix and passes after it (13.45 s). node --check passes. The existing journey supplies regression coverage; live model generation and macOS were not exercised locally.

Closes #4937 — automated triage

Use the shared conditional writers for builder text and hidden state. Repeated generation attempts retain their displayed state without replacing identical text nodes or rewriting hidden attributes. The existing navigation journey fails on the old writes and passes with these changes; no assertions change.

Closes #4937
@leaf-agent
leaf-agent merged commit 9de1d8f into main Nov 1, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-4937 branch November 1, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic-widget navigation repeats unchanged builder output writes

1 participant