fix(ui): enforce Context ownership before disclosure no-op

This commit is contained in:
Kevin Rajan committed 2026-09-28 18:32:50 -05:00
1 parent 81eb44340d
commit a4ce7381d8
1 file changed
+11 -7
+11 -7
View File
@@ -474,6 +474,17 @@ export class PanelChrome {
syncShare,
});
}
// Parent ownership is an invariant even on a no-op disclosure request.
// A stale compact Radio disclosure is absolutely positioned outside the
// measured Context rail; clear it before returning from an already-open
// Context request so it cannot paint over the active Context body.
if (
!nextCollapsed &&
panelId === 'global-context-panel' &&
this._contextRadioDock?.classList.contains('disclosure-open')
) {
this._setRadioDisclosure?.(false);
}
if (
panelEl.classList.contains('collapsed') === nextCollapsed &&
!wasAutoCollapsed
@@ -502,13 +513,6 @@ export class PanelChrome {
this.cockpitView.setContextCollapsed(true);
}
}
if (
!nextCollapsed &&
panelId === 'global-context-panel' &&
this._contextRadioDock?.classList.contains('disclosure-open')
) {
this._setRadioDisclosure?.(false);
}
if (
!nextCollapsed &&
panelId === 'radio-panel' &&