fix(ui): allow status panel sections to collapse (#458)

## Summary
- Stop the right panel from immediately re-opening collapsed Status
sections.
- Keep the existing default expanded sections, including session
changes.

## Why
Users could click Status sub-panels to collapse them, but the UI
immediately expanded them again, making the accordion controls feel
broken.

## Validation
- npm run typecheck --workspace @codenomad/ui
- git diff --check
- npm run build --workspace @codenomad/ui
This commit is contained in:
Pascal André 2026-05-16 14:59:35 +02:00 committed by GitHub
parent 3ccdd36ad8
commit 283d3d79dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -101,14 +101,8 @@ interface RightPanelProps {
const RightPanel: Component<RightPanelProps> = (props) => {
const [rightPanelTab, setRightPanelTab] = createSignal<RightPanelTab>(readStoredRightPanelTab("changes"))
const [rightPanelExpandedItems, setRightPanelExpandedItems] = createSignal<string[]>([
"yolo-mode",
"plan",
"background-processes",
"mcp",
"lsp",
"plugins",
])
const defaultStatusSectionIds = ["yolo-mode", "session-changes", "plan", "background-processes", "mcp", "lsp", "plugins"]
const [rightPanelExpandedItems, setRightPanelExpandedItems] = createSignal<string[]>(defaultStatusSectionIds)
const [selectedFile, setSelectedFile] = createSignal<string | null>(null)
const [browserPath, setBrowserPath] = createSignal(".")
@ -738,14 +732,6 @@ const RightPanel: Component<RightPanelProps> = (props) => {
setRightPanelTab("changes")
}
const statusSectionIds = ["yolo-mode", "session-changes", "plan", "background-processes", "mcp", "lsp", "plugins"]
createEffect(() => {
const currentExpanded = new Set(rightPanelExpandedItems())
if (statusSectionIds.every((id) => currentExpanded.has(id))) return
setRightPanelExpandedItems(statusSectionIds)
})
const handleAccordionChange = (values: string[]) => {
setRightPanelExpandedItems(values)
}