Skip to content

test: declare the bound value reactive in two projected-data test widgets - #6963

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

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#6936 changed LeafElement so that a class redraws on a bound input only when it declares that input as a Lit reactive property (static properties = { value: { attribute: false } }, module-authoring.md, "Drawing what a widget reads"). It updated the shipped widgets, but not the two inline test modules in test_projected_data.py. Both read this.value in render() without the declaration, so a leaf data set after the first draw reached the element but never redrew it. As a result, test_a_comment_on_an_identified_datum_follows_the_subject_across_replacements never saw row a-2, and test_data_consumers_clear_and_recover_across_contract_only_rebindings kept ["same bytes"] after the rebind. The second test's teardown also reported the stale draw's contract error.

Both modules now declare the property. The product code isn't changed: the tests drift from a contract #6936 changed on purpose.

Both tests fail on main at 77da815d6 and pass on this branch, rebased on 7da7a6a71. Bisecting 8bbb4ee1c..4660b588e put the break at 9aa6fdcd2 (#6936): they pass at its parent e9c4cc6bb.

The same ci run had two more errors that bisect to #6936. Both are unchanged-write findings: selected on lf-option in test_one_shared_added_option_has_one_action_payload_across_tabs, and tabindex on the file editor's CodeMirror content in test_a_reload_that_loses_a_saves_answer_keeps_the_typing_after_it. They are product-side redundant writes, so this PR leaves them to their own issue.

Refs #6960 — automated triage

…gets

#6936 made a LeafElement class declare each bound input as a Lit reactive
property before a set of it redraws the widget. The inline lf-feed and
data-reader modules in test_projected_data.py read this.value in render()
without declaring it, so a later data set never redrew them. They now
declare `static properties = { value: { attribute: false } }`, as the
shipped widgets #6936 updated do.

Refs #6960
@leaf-agent
leaf-agent merged commit 05430fa into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6960 branch November 24, 2026 06:59
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.

1 participant