Skip to content

Fix collapsed entries reopening after edits - #49

Merged
timrid merged 1 commit into
mainfrom
fix-collapsed-entries-reopening-after-edits
Oct 14, 2026
Merged

timrid merged 1 commit into
mainfrom
fix-collapsed-entries-reopening-after-edits

Conversation

@timrid

@timrid timrid commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Preserve tree expansion states when editing values. Previously, restoring an expanded child hidden inside a collapsed entry caused that entry to reopen unexpectedly.

Adds a wx integration regression test covering both expanded and collapsed child states, including reopening the parent manually. Both cases pass with the fix.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The child-first restoration correctly addresses the regression and the integration test covers both relevant states.

0 open findings

What changed in this PR

Preserves tree expansion state after edits by restoring child states before parent states.

Changes:

  • Restores expansion states in child-first order.
  • Adds a wx regression test and supporting gallery fixture.
  • Documents the bug fix and registers the fixture in the gallery.
File Description
construct_editor/​core/​construct_editor.py Applies child expansion states before parent states.
tests/​wx_integration/​test_wx_construct_hex_editor.py Tests expanded and collapsed hidden-child states.
construct_editor/​gallery/​test_array_with_bit_struct.py Adds the regression-test construct fixture.
construct_editor/​main.py Registers the fixture in the gallery.
CHANGELOG.md Documents the fix.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@timrid
timrid merged commit 27c9eec into main Oct 14, 2026
7 checks passed
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.

2 participants