fix(ui): open one session accordion panel at a time

This commit is contained in:
Codex
2026-09-14 01:09:45 +02:00
parent cf90c1bd51
commit bdcd8fcd28
8 changed files with 48 additions and 28 deletions
+2 -3
View File
@@ -1160,7 +1160,7 @@ export function AppShell({ canLogout }: AppShellProps) {
</p>
)}
<Accordion.Root multiple
<Accordion.Root multiple={false}
value={[...(activeOpen ? ["active"] : []), ...(archiveOpen ? ["archive"] : [])]}
onValueChange={value => { setActiveOpen(value.includes("active")); setArchiveOpen(value.includes("archive")); }}
className="thot-session-accordion min-h-0 flex-1 overflow-y-auto px-2 pb-4">
@@ -1210,8 +1210,7 @@ export function AppShell({ canLogout }: AppShellProps) {
</div>
))}
{/* Ungrouped sessions list directly after the groups — no "No group" label.
When there are no groups at all, still render it so its empty state can
teach first-time users. */}
When there are no groups at all, still render its empty state. */}
{(ungroupedActive.length > 0 || groups.length === 0) && (
<NavSessions
sessions={ungroupedActive}