Skip to content

feat: add session topic to Recent Sessions table#148

Open
arojunior wants to merge 1 commit into
phuryn:mainfrom
arojunior:add-session-topic
Open

feat: add session topic to Recent Sessions table#148
arojunior wants to merge 1 commit into
phuryn:mainfrom
arojunior:add-session-topic

Conversation

@arojunior

Copy link
Copy Markdown

Summary

  • Extracts session titles from Claude Code's custom-title and ai-title JSONL records, with a fallback to the first user message (truncated to 100 chars, skipping IDE context blocks)
  • Adds a Topic column to the Recent Sessions table in the dashboard and includes it in CSV exports
  • Adds topic TEXT column to the sessions DB table with _ensure_column() migration for existing databases

Title priority: custom-title > ai-title > first user message

Closes #147

Test plan

  • Run a full rescan (python cli.py scan) and verify the sessions table has a topic column populated
  • Open the dashboard and confirm the Topic column appears in the Recent Sessions table
  • Verify custom titles (user-set labels) take priority over AI-generated ones
  • Verify sessions without title records fall back to the first user message
  • Export sessions to CSV and confirm the Topic column is included
  • Test schema migration: start with an existing usage.db (no topic column), run a scan, and verify the column is added

🤖 Generated with Claude Code

Extract session titles from Claude Code's custom-title and ai-title
JSONL records, falling back to the first user message when no title
exists. Display the topic in the dashboard's Recent Sessions table
and include it in CSV exports.

Priority: custom-title > ai-title > first user message.

Closes phuryn#147

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Add session topic to Recent Sessions table

1 participant