mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-10 00:14:27 +00:00
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:
parent
3ccdd36ad8
commit
283d3d79dd
1 changed files with 2 additions and 16 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue