Deregister a signal plot's navigator selector on window close - #38
Merged
Conversation
Closing a signal window called parent_sel.close() (hiding the widget) but
never removed the selector from MultiplotManager.navigation_selectors or
session._nav_selectors/_nav_selectors_by_id, and the renderer's
WINDOW_CLOSED pruning is keyed by the NAVIGATOR's window_id - so the Plot
Control dock row for a closed signal window lingered forever. New
_deregister_nav_selector prunes every backend registry and emits
{type:'selector_removed', selector_id} for the dock row (renderer wiring
lands in the wave-2 shared-kernel commit). Composite selectors deregister
as the composite (matching the dock row key). 5 new tests incl. driving
_run_update on a just-closed selector.
(Laundry item #1; Opus-reviewed: SHIP - id-reuse race proven impossible
via FIFO pipe + GC ordering; noted follow-up: multi-selector survive test
is currently vacuous with the single-selector fixture.)
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.
Cherry-picked from the
feat/laundry-list-2026-07-22kitchen-sink branch, which has a batch of unrelated work stacked on it. This is one of the pieces that applies cleanly tomainon its own.The bug
Closing a signal plot's window left its navigator selector registered. The stale selector kept driving updates against a window that no longer exists.
Testing
test_selector_close_cleanup.py(144 lines, new) plus the existing 5-D composite-close coverage. 9 passed.Review note
Cherry-pick is clean against current
main— no conflicts, and independent of the array-cache work in #37.