Skip to content

Commit c3a8dde

Browse files
committed
fix: restore experimental sidebar state after reopen
1 parent d0299b0 commit c3a8dde

2 files changed

Lines changed: 27 additions & 11 deletions

File tree

client/app.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,21 @@ class ClaudeOrchestrator {
673673
return true;
674674
}
675675

676+
restoreCurrentWorkspaceSidebarStateFromPersistence() {
677+
const workspaceId = String(this.currentWorkspace?.id || '').trim();
678+
if (!workspaceId || this.sessions.size === 0) return false;
679+
680+
const applied = this.applyPersistedWorkspaceSidebarState({ workspaceId });
681+
if (!applied) return false;
682+
683+
this.updateViewModeButtons();
684+
this.updateTierFilterButtons();
685+
this.ensureFilterToggleExists();
686+
this.updateTerminalGrid();
687+
this.buildSidebar();
688+
return true;
689+
}
690+
676691
isSessionVisibleByWorktreeSelection(sessionId, session = null) {
677692
const sid = String(sessionId || '').trim();
678693
if (!sid) return false;
@@ -17862,6 +17877,7 @@ class ClaudeOrchestrator {
1786217877
this.applyUiVisibility();
1786317878
this.refreshBranchLabels();
1786417879
this.updateTierFilterButtons();
17880+
this.restoreCurrentWorkspaceSidebarStateFromPersistence();
1786517881
} else {
1786617882
console.error('Failed to load user settings:', response.statusText);
1786717883
}

client/index.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,6 @@ <h4>General Settings</h4>
255255
</div>
256256
</div>
257257

258-
<div class="setting-section" data-section-id="experimental" data-section-title="Experimental">
259-
<h4>Experimental</h4>
260-
<div class="setting-group">
261-
<label>
262-
<input type="checkbox" id="experimental-persist-sidebar-state" />
263-
Persist workspace sidebar selections and filters
264-
</label>
265-
<p class="setting-description">Off by default. Saves per-workspace worktree visibility plus the left-sidebar Tier and View filters across tabs, reloads, and app/server restarts.</p>
266-
</div>
267-
</div>
268-
269258
<div class="setting-section" data-section-id="branch-labels" data-section-title="Branch Labels">
270259
<h4>Branch Labels</h4>
271260
<div class="setting-group">
@@ -482,6 +471,17 @@ <h5>Per-Terminal Overrides</h5>
482471
</div>
483472

484473
</div>
474+
475+
<div class="setting-section" data-section-id="experimental" data-section-title="Experimental">
476+
<h4>Experimental</h4>
477+
<div class="setting-group">
478+
<label>
479+
<input type="checkbox" id="experimental-persist-sidebar-state" />
480+
Persist workspace sidebar selections and filters
481+
</label>
482+
<p class="setting-description">Off by default. Saves per-workspace worktree visibility plus the left-sidebar Tier and View filters across tabs, reloads, and app/server restarts.</p>
483+
</div>
484+
</div>
485485
</div>
486486
</div>
487487
</div>

0 commit comments

Comments
 (0)