mirror of
https://github.com/coder/coder.git
synced 2026-11-06 08:12:45 +08:00
Removes the auto-open/close behavior that would force the right-side panel open whenever diff status or git repository data appeared. Instead, the panel's visibility is now persisted via the `agents.right-panel-open` localStorage key (matching the existing `agents.right-panel-width` pattern for the panel width). This gives users a consistent UX when switching between chats — the panel stays in whatever state they last set it to. ## Changes - **Removed** two auto-open blocks in `AgentDetailView` that tracked `prevHasDiffStatus` / `prevHasGitRepos` and forced `showSidebarPanel = true` - **Added** `localStorage` persistence for the panel open/closed state under key `agents.right-panel-open` - Initial state is read from localStorage on mount (defaults to closed) - Every toggle/close writes through to localStorage via `handleSetShowSidebarPanel` - Panel width was already persisted via `agents.right-panel-width` in `RightPanel.tsx` — no changes needed there