feat(app): sync session list ordering and split the session repository #344
No reviewers
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!344
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/app-session-list-ordering-and-repository-split"
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?
What this does
Keeps the chat session list panel ordered by
ChatSessionSummary.updatedAt(most recently active first) and makes it reorder live as sessions receive activity from the running client, then reworks the repository that owns that state.The list already sorted by
updatedAtdescending, but the cached summary list was only refreshed by a full load at startup or retry, so turn activity never moved a row.Commits
feat(app): order the session list by last activity— the ordering mechanism and its tests.refactor(app): split session repository in two— the architectural rework.refactor(session-list): drop post-turn refresh— removes the refresh once its value was shown to be marginal.Session list ordering
UserMessageSaved,AssistantMessageStart,AssistantMessageEnd, and the non-streaming equivalents) raises the cached summary'supdatedAtto the persisted message's server timestamp, with a never-backwards guard, so the panel re-sorts instantly with no client-clock timestamps.DataState.Success.Repository split
SessionRepository(list concerns) and the newConversationRepository(transcript concerns) replace the single 989-lineDefaultSessionRepository, withDefaultSessionListRepositoryandDefaultConversationRepositoryimplementing them.SessionDetailsStore,ToolCallStoreandSessionSummaryStore; transcript event handling and the summary snapshot merge each get a single owner.Behaviour changes to be aware of
updatedAtor overwritename/groupId(the latter a hazard, not a benefit).Testing
./gradlew :app:desktopTestClasses :app:desktopTest— 1103 tests, 0 failures, 2 pre-existing skips../gradlew :app:desktopMainClasses,./gradlew :app:compileKotlinWasmJs— successful.:app:compileAndroidMaincould not be run in this environment (Android SDK unavailable); the change touches noandroidMainfile and noexpect/actual.Out of scope
common/,server/orworker/change, no database migration, no wire-model or API change.SendMessageUseCaseare unrelated to this branch and left for a separate change.