Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Session list shows preview text instead of renamed title #166

Open

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

  1. Connect to a host via kittylitter
  2. 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
  3. Rename the session via Claude Code /rename to something meaningful, e.g., litter-deepseek
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /