fix(ui): let revealed panels own their side and keep Cockpit's left strip

A panel a feature opens (Street Level's viewer, a selected radio station)
now becomes its side's open panel instead of being collapsed again by the
next layout pass. Cockpit keeps showing its collapsed Data Layers strip,
which Cyber's Cockpit layout aligns to, and Cyber's focus layout no longer
re-shows collapsed left panels. Both sidebars share one accordion helper.
This commit is contained in:
Sameh Khamis committed 2026-10-30 16:41:29 -07:00
1 parent 2035c767ce
commit eed7657516
9 files changed
+124 -58

No files matched your search

+6 -6
View File
@@ -421,14 +421,14 @@ export class PanelChrome {
const wasAutoCollapsed =
panelEl.classList.contains('layout-auto-collapsed') ||
panelEl.classList.contains('accordion-collapsed');
// One panel is open per desktop side: a user opening a side panel owns
// the whole accordion, including peers that were only
// presentation-collapsed during a saved-state restore.
// One panel is open per desktop side: opening a side panel, whether the
// user asked or a feature revealed it (Street Level's viewer, a selected
// radio station), owns the whole accordion, including peers that were
// only presentation-collapsed during a saved-state restore.
const sideStack = [this._leftPanelStack, this._rightPanelStack].find(
(stack) => stack && panelEl.parentElement === stack,
);
if (
explicit &&
!restore &&
!nextCollapsed &&
sideStack &&
@@ -460,7 +460,7 @@ export class PanelChrome {
: null;
const priorLeftOwner = this._panelLayout._leftStackPreferredPanelId;
const priorRightOwner = this._panelLayout._rightStackPreferredPanelId;
if (explicit && !restore && !nextCollapsed && leftOwnerPanel) {
if (!restore && !nextCollapsed && leftOwnerPanel) {
this._panelLayout._leftStackPreferredPanelId = leftOwnerPanel.id;
} else if (
explicit &&
@@ -470,7 +470,7 @@ export class PanelChrome {
) {
this._panelLayout._leftStackPreferredPanelId = null;
}
if (explicit && !restore && !nextCollapsed && rightOwnerPanel) {
if (!restore && !nextCollapsed && rightOwnerPanel) {
this._panelLayout._rightStackPreferredPanelId = rightOwnerPanel.id;
} else if (
explicit &&