Skip to content

fix: resolve lcm-tui topic session lookups#300

Merged
jalehman merged 2 commits into
mainfrom
fix/tui-topic-session-lookups
Apr 6, 2026
Merged

fix: resolve lcm-tui topic session lookups#300
jalehman merged 2 commits into
mainfrom
fix/tui-topic-session-lookups

Conversation

@jalehman

@jalehman jalehman commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

What

This PR isolates the lcm-tui fix for Telegram topic-backed session keys so topic session files resolve to the correct conversation row and show the right session metadata, summary counts, and file counts.

Why

The original branch also contains unrelated planning work, but this bug fix stands on its own and is needed so browsing topic sessions in the TUI does not collapse multiple topic conversations onto the same bare runtime session.

Changes

  • Resolve topic filenames via exact session_key
  • Fall back to normalized bare session_id
  • Count summaries/files by conversation_id
  • Reuse lookup path for single-session views
  • Add regression tests for topic sessions
  • Add patch changeset for release notes

Testing

  • cd tui && go test ./... -run 'TestLoadSessionBatchIncludesConversationMetadata|TestLoadSessionBatchResolvesTopicSessionFiles|TestLookupConversationIDResolvesTopicSessionFiles|TestRenderSessionsShowsSessionKeyAndEstimatedTokens|TestRenderSessionsAlignsColumns'
  • cd tui && go test ./... -run 'TestLoadDoctorTargetsUsesPositionAwareDetection|TestScanDoctorConversationsAggregatesAllConversations' currently fails on origin/main as well, so the full go test ./... suite is not a clean gate for this change yet.

jalehman added 2 commits April 6, 2026 13:17
Resolve TUI session metadata and count lookups against the selected conversation row instead of grouping by bare session_id. Topic-suffixed session filenames now prefer an exact session_key match and only then fall back to the normalized bare session_id, which restores conv_id, session key, summary count, and file count for Telegram topic sessions while preserving non-topic behavior. Reuse the same resolution path for single-session conversation lookups so summaries/files/context drill-downs follow the same normalization.

Regeneration-Prompt: |
  Fix the lossless-claw TUI bug where Telegram topic session files on disk are named like <session-id>-topic-<n> but LCM stores the bare runtime session_id and the topic identity separately in session_key. Keep the patch tight in tui/data.go and related tests. Preserve existing behavior for non-topic sessions. Resolve each visible session entry to a concrete conversation row first, preferring an exact session_key match for topic-suffixed filenames and otherwise falling back to the normalized bare session_id, then load summary/file counts by conversation_id so multiple topic rows sharing one bare session_id do not collapse together. Add regression coverage showing a topic session file now gets the right session key, conv_id, summary count, file count, and single-session lookup behavior.
@jalehman jalehman merged commit a42f422 into main Apr 6, 2026
2 checks passed
@jalehman jalehman deleted the fix/tui-topic-session-lookups branch April 6, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant