Skip to content

Deregister a signal plot's navigator selector on window close - #38

Merged
CSSFrancis merged 1 commit into
mainfrom
fix/selector-close-cleanup
Jul 26, 2026
Merged

Deregister a signal plot's navigator selector on window close#38
CSSFrancis merged 1 commit into
mainfrom
fix/selector-close-cleanup

Conversation

@CSSFrancis

Copy link
Copy Markdown
Owner

Cherry-picked from the feat/laundry-list-2026-07-22 kitchen-sink branch, which has a batch of unrelated work stacked on it. This is one of the pieces that applies cleanly to main on 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.

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.)
@CSSFrancis
CSSFrancis merged commit af8e312 into main Jul 26, 2026
20 of 21 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.

1 participant