Make session list panel collapsible — top app bar toggle (Compose-local state, animated) #138
Labels
No labels
Epic 5
MCP
P1
PR-0
PR-1
api
api-layer
architecture
area:backend
area:frontend
arrow
authentication
backend
bug
chat
client
clipboard
common-module
compose
cross-cutting
cross-cutting-requirement
data-layer
data-models
database
desktop-client
documentation
duplicate
enhancement
epic
epic-1
epic-2
epic-3
epic-4
epic-5
epic-6
epic-7
epic-llm-config
error-handling
feature
frontend
good first issue
help wanted
implementation
infrastructure
installer
invalid
kotlin
ktor
llm
medium-priority
message
multiplatform
needs-review
needs-triage
packaging
performance
phase-1
phase-2
phase-3
phase-4
phase-5
phase3
phase:3
priority: high
question
refactor
refactoring
resource-sharing
security
server
server-module
services
session
session-management
settings
setup
shutdown
state
storage
streaming
sub-issue
tests
tooling
type:task
ui
ui/ux
user-accounts
user-management
ux
viewmodel
websocket
windows
windows-integration
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Torvian.eu/chatbot#138
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We want to add a toggle button in the top app bar (left side) to collapse/expand the session list panel. The collapse state should be stored locally in Compose (not in the ViewModel). The session list panel should animate on show/hide using explicit enter/exit animations. No persistence is required.
Implementation details (updated per design decisions):
Keep collapse state in Compose, not in the ViewModel.
var isSessionListCollapsed by remember { mutableStateOf(false) }inChatScreen.onToggleSessionList: () -> Unitto toggle it.Icon choice: use
Icons.AutoMirrored.Filled.ViewSidebarfor the toggle.Modifier.rotate()), but this is optional.Animation: use
AnimatedVisibilitywith explicitenterandexitparams:enter = slideInHorizontally()exit = slideOutHorizontally()Files to update:
app/src/commonMain/kotlin/eu/torvian/chatbot/app/compose/ChatScreen.ktisSessionListCollapsedstate andonToggleSessionListlambda.isSessionListCollapsedand the toggle lambda intoTopBarcontent (via the existingTopBarContentProviderusage ofChatTopBarContent) and intoChatScreenContent.app/src/commonMain/kotlin/eu/torvian/chatbot/app/compose/chatarea/ChatTopBarContent.ktisSessionListCollapsed: BooleanandonToggleSessionList: () -> Unit.Row, add anIconButtonwithIcons.AutoMirrored.Filled.ViewSidebarthat callsonToggleSessionList. Add acontentDescriptionlike "Toggle session list panel".app/src/commonMain/kotlin/eu/torvian/chatbot/app/compose/ChatScreenContent.ktisSessionListCollapsed: Boolean.BoxwithAnimatedVisibility(visible = !isSessionListCollapsed, enter = slideInHorizontally(), exit = slideOutHorizontally()).0.75fto1fso it expands when the session list is hidden.Accessibility: set a clear
contentDescriptionfor the toggle button, e.g., "Toggle session list panel".Tests / QA criteria:
Acceptance criteria:
AnimatedVisibilitywithslideInHorizontally/slideOutHorizontally.Icons.AutoMirrored.Filled.ViewSidebarand has a content description.Notes / follow-ups (out-of-scope for this issue):