Skip to content

Commit 283d3d7

Browse files
authored
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
1 parent 3ccdd36 commit 283d3d7

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

packages/ui/src/components/instance/shell/right-panel/RightPanel.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,8 @@ interface RightPanelProps {
101101

102102
const RightPanel: Component<RightPanelProps> = (props) => {
103103
const [rightPanelTab, setRightPanelTab] = createSignal<RightPanelTab>(readStoredRightPanelTab("changes"))
104-
const [rightPanelExpandedItems, setRightPanelExpandedItems] = createSignal<string[]>([
105-
"yolo-mode",
106-
"plan",
107-
"background-processes",
108-
"mcp",
109-
"lsp",
110-
"plugins",
111-
])
104+
const defaultStatusSectionIds = ["yolo-mode", "session-changes", "plan", "background-processes", "mcp", "lsp", "plugins"]
105+
const [rightPanelExpandedItems, setRightPanelExpandedItems] = createSignal<string[]>(defaultStatusSectionIds)
112106
const [selectedFile, setSelectedFile] = createSignal<string | null>(null)
113107

114108
const [browserPath, setBrowserPath] = createSignal(".")
@@ -738,14 +732,6 @@ const RightPanel: Component<RightPanelProps> = (props) => {
738732
setRightPanelTab("changes")
739733
}
740734

741-
const statusSectionIds = ["yolo-mode", "session-changes", "plan", "background-processes", "mcp", "lsp", "plugins"]
742-
743-
createEffect(() => {
744-
const currentExpanded = new Set(rightPanelExpandedItems())
745-
if (statusSectionIds.every((id) => currentExpanded.has(id))) return
746-
setRightPanelExpandedItems(statusSectionIds)
747-
})
748-
749735
const handleAccordionChange = (values: string[]) => {
750736
setRightPanelExpandedItems(values)
751737
}

0 commit comments

Comments
 (0)