feat: expanded view toggle and AI-generated session titles#26
Conversation
Add an "Expanded" button that toggles tiles to show the last 5 transcript entries inline. Periodically run `claude -p` every N user messages to generate evolving session titles. Manual renames now auto-lock the title. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unit Test Coverage
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rewrite the claude -p prompt to use structured input (labeled roles, current session state) and request JSON output with title, ticket_id, and pr_url. Fetch last 5 user+assistant messages (skipping tool_result noise) via a single SQL query. Only backfill ticket/PR if not already set. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
48 new tests covering: get_recent_conversation DB helper, structured prompt builder, JSON response parser, summary interval settings, threshold gating, subprocess success/failure/timeout/lock paths, user message counting in watcher, and stop_watcher cleanup. Coverage: 88% → 96% overall, watcher.py 78% → 95%. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix XSS risk: escape role in expanded preview class attribute - Pass prompt via stdin to claude -p instead of CLI arg (avoids OS length limits) - Validate summary_interval >= 1 at API boundary - Only lock title on non-empty manual rename - Toggle button text between Compact/Expanded - Case-insensitive markdown fence stripping in response parser Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codex Adversarial ReviewTarget: branch diff against main No-ship: the new AI summary worker can leak untracked Findings[high] Timed-out or cancelled AI summaries leave
|
- Kill and wait for claude subprocess on timeout/exception to prevent orphaned processes consuming resources - Validate pr_url from AI response: require https scheme and /pull/<id> or /merge_requests/<id> path shape; reject javascript:, http:, and arbitrary URLs - Add 9 regression tests covering subprocess reaping and URL validation Addresses adversarial review findings on PR #26. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
claude -pin the background to generate an evolving 3-8 word session title. Respects title lock, disables gracefully ifclaudeCLI is unavailable.display_name_locked: trueso AI summaries don't overwrite user renames.Closes #16
Test plan
make checkpasses (ruff, mypy, pytest — 256 tests)🤖 Generated with Claude Code