Bonsai: clear stale linked element queries on unload - #9323
Draft
john-rogers wants to merge 1 commit into
Draft
Conversation
Clear queried-element UI state only when unloading its source link, while preserving valid queries from other links. Add focused regression coverage for both behaviours. Generated with the assistance of an AI coding tool (OpenAI Codex), under jr's direction and manual validation.
john-rogers
force-pushed
the
fix/clear-linked-query-on-unload
branch
from
August 28, 2026 03:31
430b437 to
b7cadfa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #9322.
Root cause
UnloadLinkremoved the linked geometry but did not clear the associated queried-object properties or cachedLinksData.linked_data. The Links panel could therefore continue displaying the identity of an element from an unloaded link. Reloading a link inherited the same problem because it uses the unload lifecycle internally.User impact
After Unload Link or Reload Link, the Links panel no longer presents stale element identification. Query data belonging to another loaded link remains intact.
Validation
0.8.6-alpha260808(0a51ebd), Blender 5.1.2 and Debian Linux.bonsai-0.8.6-alpha2608132105(1af5cc9).git diff --check: passed.ci/compile-and-test: passed.pytest-blenderdevelopment environment was unavailable.CI baseline note
The GitHub Actions
ci-lint/lint-formattingjob currently fails becausepsf/black@stableinstalled Black 26.5.1 and flagged these three pre-existing files from the unchangedv0.8.0base:src/ifcopenshell-python/test/api/alignment/test_create.pysrc/ifcopenshell-python/ifcopenshell/util/unit.pysrc/ifcopenshell-python/test/api/alignment/test_referent_names.pyNone of these files is modified by this PR. Syntax checking, Ruff and both
tychecks within the lint job passed. No unrelated formatting changes have been added to this patch.AI assistance disclosure
The diagnosis, patch, regression tests and pull-request text were developed with OpenAI Codex/ChatGPT under the contributor's direction. The contributor reviewed the changes and performed the reported manual validation.