-
Notifications
You must be signed in to change notification settings - Fork 173
Session list shows preview text instead of renamed title #166
Description
Summary
When a session is renamed (e.g., via Claude Code /rename), the session list in the sidebar continues to show the first message's raw preview text rather than the user-assigned title.
Steps to reproduce
- Connect to a host via kittylitter
- Start a session — the first message is a command like
/review, which produces raw XML such as<command-message>review</command-message>in the message body - Rename the session via Claude Code
/renameto something meaningful, e.g.,litter-deepseek - Look at the session list in Litter
Actual behavior
The session list displays the raw first-message preview text:
<command-message>review</command-message>...
Expected behavior
The session list should display the user-assigned title (litter-deepseek).
Where the problem is
The title display logic in both platforms prioritizes preview over title:
iOS (apps/ios/Sources/Litter/Views/SessionsTypes.swift):
var displayTitle: String { if !preview.isEmpty { return preview } // preview first if !title.isEmpty { return title } return "Untitled session" }
Android (apps/android/app/src/main/java/com/litter/android/state/SnapshotExtensions.kt):
get() = preview?.takeIf { it.isNotBlank() } ?: title?.takeIf { it.isNotBlank() } // preview first ?: "Untitled session"
Contrast: session detail header does it correctly
The conversation detail header (AppThreadSnapshot+Runtime.swift) correctly prioritizes title over preview:
var displayTitle: String { if !title.isEmpty { return title } // title first ✅ if !preview.isEmpty { return preview } return "Untitled session" }
And HomeDashboardSupport.sessionTitle(for:) also does title first.
Question
Is this a real bug (should title always win over preview in the session list, like the detail header does), or was the preview > title ordering intentional for the session list view? The latter seems unlikely given the detail header and dashboard disagree with it, but I wanted to confirm before opening a PR.