# Changelog

## v0.16.0 - 2026-06-12

### New Features
- `ccs show` — drill down into a search hit: print the surrounding messages as compact JSONL, anchored by `--line` (or `--uuid` for Opencode), with `--context` and `--max-chars` knobs. Works for Claude, Codex, and Opencode sessions.
- Agent-readable `ccs search` output — `content` is now a snippet around the match (`--full-content` for full text), every row carries `"type":"match"` plus `line_number`/`message_uuid` locators for `ccs show`, and a trailing summary record (`shown`, `total_matches`, `sessions`, `truncated`) is always emitted, even with zero matches.
- AI-ranking helper sessions (Ctrl+G) are tagged as automation and hide behind the Ctrl+H filter instead of cluttering recent sessions and search results.

### Fixed
- Resume no longer fails when the session's original project directory is gone — falls back to resuming by JSONL path.
- Opencode hardening: SQLite errors are reported instead of silently swallowed, dropped rows are counted.

### Changed
- Slimmer dependency tree — rusqlite default features disabled.

## v0.15.0 - 2026-05-27

### New Features
- Opencode sessions support — discover and search Opencode SQLite databases (`opencode.db` and channel-suffixed variants like `opencode-dev.db`) alongside Claude Code CLI, Claude Desktop, and Codex rollouts.

### Changed
- Consolidate `fmt` / `clippy` / `test` behind a single `make check` target — single entry point that CI runs; individual targets (`make fmt` / `clippy` / `test`) remain callable.
- Add `CONTRIBUTING.md` and a minimal PR template (Testing + Notes).

## v0.14.0 - 2026-05-11

### New Features
- Ctrl+A project filter now includes Codex sessions — match by Codex `session_meta.payload.cwd` (canonicalized) in addition to Claude file-path prefixes; status bar shows `· Codex: ≤100 by recency` to surface the scan-scope asymmetry. Asymmetric direction (`session.cwd` ⊆ `current_cwd`) prevents `$HOME`-launched Codex from matching every project under `$HOME`.

### Fixed
- Branch `⎇` marker no longer clips on selected rows in kitty with Iosevka/JetBrains Mono Nerd — drop `Modifier::BOLD` from the marker span (branch name keeps its bold).

## v0.13.0 - 2026-05-04

### New Features
- Full Codex session support across all UI surfaces:
  - Discover `~/.codex/sessions` and `~/.codex/archived_sessions` rollouts as a third source alongside Claude Code CLI and Claude Desktop
  - Parse Codex JSONL records — `session_meta` (cwd, timestamp, branch, parent thread for spawned subagents) and `response_item` (user/assistant messages, reasoning text, tool calls and their outputs)
  - List/search/recent/TUI render Codex sessions with the same `▶ [src] date | project | branch | sid (count)` grammar; `cli list` and `cli search` work for Codex too (message counts via `count_session_messages`, session ID falls back to filename when the JSONL doesn't repeat it)
  - Resume Codex sessions with `codex resume -C <cwd> <session_id>`; working dir comes from `session_meta.payload.cwd` and falls back to the rollout's parent dir → `$HOME` → `/tmp` when the recorded cwd no longer exists
  - Codex spawned-subagent rollouts resolve back to their parent thread (so they don't appear as orphan sessions); standalone subagent rollouts are skipped during the file walk, matching how Claude `subagents/` and `agent-*.jsonl` are handled
- Recognize a custom Codex home via `CODEX_HOME` — both path discovery (`get_search_paths`) and provider classification (`SessionProvider::from_path`) now honor the env var, so Codex installs outside `~/.codex` are surfaced and not misclassified as Claude
- Detect the `recog` automation marker (`<!-- ccs-automation:recog -->`) so recog-driven sessions hide behind the Ctrl+H automation filter like `scheduled` and `claude-mem` markers

## v0.12.0 - 2026-05-01

### New Features
- Session provider badges — Claude vs Codex marker on each search result and recent-session row
- Search slash commands by rendered form — `/foo` matches sessions where JSONL stores `<command-message>foo</command-message>` markup; previews render `/foo args` with arguments inlined
- Styled session-header metadata — source, project, branch, and counts each get their own visual weight
- AI ranking UX — hint reads `[Enter] AI Rank` and a dim `── Unranked below ──` separator marks the boundary after partial AI rankings
- Cancellable in-flight search — typing kills the previous ripgrep child via cooperative flag + `Child::kill()`, removing head-of-line stalls and 594 MB RSS spikes on large corpora

### Fixed
- Fork the session at the selected message when resuming, instead of landing on the latest tip
- Tree branches render as compact git-like lanes — no more collapsed star rows on splits
- Slash commands render as `/name` (or `/name args`) across search, recent, expanded rows, and tree previews
- Timestamps render in local timezone (was UTC) in tree rows and search/recent headers
- Brighten preview summaries on selected rows (role prefix stays dim, preview content gets its own color)
- Ctrl+C in AI ranking mode returns to regular search instead of killing the TUI
- Treat AI's empty `[]` as a valid "no matches" answer (green "0 sessions ranked"); attach a 100-char stdout sample to real parse failures
- Keep Enter bound to re-rank after an AI no-match instead of resuming

### Changed
- Replace long-lived search worker thread with per-request `SearchHandle { seq, cancel }`; `is_searching` is derived, no more stuck flag after a panicked thread
- Pure-rendering split — `AppView<'a>` read-only projection feeds search and tree views, no mutation during draw

## v0.11.0 - 2026-04-22

### New Features
- TUI redesign — unified recent-sessions and search-result grammar (`▶ [src] date | project | branch | sid (count)` + role-prefixed preview line)
- Inline query highlighting in collapsed previews and expanded sub-matches

### Fixed
- Resume selected session on Enter after AI re-rank instead of re-submitting the query
- Strip `\n`/`\t`/`\r` from single-line list previews so wrapped text no longer overwrites the next header
- Centre collapsed preview around the first query match instead of always front-aligning
- Invalidate AI rank when toggling regex / project / automation filters (Ctrl+R, Ctrl+A, Ctrl+H) so Enter resumes the visible list, not the stale ranking
- Caret glyph clipping on selected rows (drop `Modifier::BOLD` so Iosevka renders `▶` at full width)

### Changed
- Scale list rendering with visible rows on scroll — drops 30-event scroll burst from ~970 ms to ~88 ms in debug builds
- Skip filter rebuild on background `message_count` updates (no `SessionGroup` cloning per tick)
- Align selection colours with design handoff (purple selection extends to preview row, dim text uses `#6b7180` instead of `Color::DarkGray`)

## v0.10.0 - 2026-04-19

### New Features
- Detect claude-mem observer sessions as automation (path-based `~/.claude-mem/observer-sessions/` + content marker `<observed_from_primary_session>`)
- Hide automation sessions by default — new `AutomationFilter::Manual` default (toggle Ctrl+H: Manual → Auto → All)
- Per-class cap in `collect_recent_sessions` — Manual filter is no longer crowded out when auto sessions dominate mtime
- AI-powered session re-ranking via Ctrl+G (invokes `claude -p` in background to sort visible sessions by relevance to a query)
- Adaptive help bar — hints drop based on terminal width
- Preview line for search results with correct scroll behavior on ListState
- Show total session message count in each search result group
- Expanded preview content parsing — tool_use, tool_result, thinking, image, document, redacted_thinking, server_tool_use, connector_text
- Sort recent sessions by content timestamp (max `timestamp`/`_audit_timestamp` from JSONL) instead of file mtime

### Fixed
- Anchor claude-mem content marker to message start — sessions discussing the marker no longer mis-classify as automation
- Clamp `InputState` cursor to UTF-8 char boundary (prevents panic on multi-byte input editing)
- Ripgrep search: validate regex before spawn, capture stderr, align `--ignore-case` with post-filter
- Clarify search result count label — "matches" instead of "messages"
- Fix flaky ripgrep tests by moving PATH-mutating test to integration tests

### Changed
- Grey `[Ctrl+H] Manual` hint (was green+bold) to match the new default state; Auto stays magenta+bold
- Extract shared `collect_session_jsonl_files` walker — single skip policy for `subagents/` and `agent-*.jsonl`
- Try cheap decode strategies before filesystem walk in `path_codec` (perf)

## v0.8.0 - 2026-04-05

### New Features
- Add `ccs pick` subcommand for machine-readable session selection (key-value output with exit code 0/1)
- Add `--overlay` flag for TUI loop mode: resume sessions as child processes, return to TUI after exit
- Add `[PICK]` status bar indicator when running in picker mode
- Add `resume_cli_child()` for spawning Claude as a child process instead of exec()
- Add shell launcher script (`launch-ccs.sh`) with tmux/kitty/wezterm overlay support
- Add Claude Code plugin structure (`.claude-plugin/`) with overlay picker skill

### Changed
- Refactor TUI lifecycle into `run_tui()` returning `TuiOutcome` enum (Quit/Resume/Pick)
- Extract `PickedSession` struct with `to_key_value()` serialization

## v0.7.0 - 2026-04-02

### New Features
- Support `CLAUDE_CONFIG_DIR` env var for custom Claude config directory
- Add Linux Desktop session path (`~/.config/Claude/local-agent-mode-sessions/`)
- Extract session titles from JSONL metadata (custom-title, ai-title, agent-name) with Claude Code priority: agentName > customTitle > aiTitle > summary > lastPrompt > firstUserMessage
- Include thinking blocks in search content extraction
- Filter agent/subagent files from search results and recent sessions
- Deduplicate sessions across git worktrees by session_id

### Fixed
- Fix leaf finding: use terminal messages instead of last uuid in file
- Add `isSidechain` filtering — subagent messages no longer hijack latest chain
- Add `compact_boundary` handling — tree and fork no longer break at compaction points
- Add `logicalParentUuid` fallback — tree stays connected across compaction boundaries
- Skip metadata-only lines (summary, tag, custom-title) in fork output
- Detect ralphex automation markers in assistant messages, not just first user message
- Detect `<<<RALPHEX:` markers anywhere in message text (remove instruction-cue requirement)

### Changed
- Remove dead synthetic linearization code (-1062 lines)
- Cross-project resume via decoded project path + session index registration
- Deduplicate `logicalParentUuid` fallback into `session::extract_parent_uuid_or_logical()`
- Eliminate triple JSON parsing in `create_fork` (single-pass with stored parsed values)

## v0.6.1 - 2026-03-30

### Fixed
- Stop marking manual sessions as automated when they only discuss or quote `ralphex`/`<scheduled-task>` markers
- Resume branched sessions directly from the original session file instead of forcing a synthetic linear copy from recent-session view

## v0.6.0 - 2026-03-30

### New Features
- Show recent sessions on TUI startup so session browsing works before typing a query
- Detect and filter automated sessions in both recent-session and search views, including scheduled-task runs
- Add `ccs update` for self-updating installed builds

### Changed
- Add Left/Right cursor movement in the search input
- Simplify resume analysis and session metadata extraction to better handle compacted transcripts

### Fixed
- Resume and branch handling for subagent, auxiliary, compacted, and non-latest sessions
- Recent-session summaries and automation metadata for malformed tails, older sessions, and abandoned branches
- Project/path display and filtering edge cases, including sibling-project prefix collisions and non-message UUID records

## v0.5.0 - 2026-03-20

### Fixed
- Fix stale search results remaining visible when query is deleted to empty

## v0.4.0 - 2026-03-09

### New Features
- Homebrew tap: `brew install materkey/ccs/ccs`
- Shell installer for macOS/Linux
- Published to crates.io as `ccfullsearch`
- cargo-binstall support

### Changed
- Rename package to `ccfullsearch` (binary stays `ccs`)
- Replace release workflow with cargo-dist v0.31.0
- Add Linux arm64 and musl targets (6 platforms total)
- Add MIT license

## v0.3.0 - 2026-03-06

### New Features
- CLI argument parsing with clap (`search`, `list` subcommands, `--tree` flag)
- Render snapshot tests
- Split TUI into separate modules (state, search_mode, tree_mode, render)

### Fixed
- Project filter search scope

## v0.2.0 - 2026-03-05

### New Features
- CLI mode with `search` and `list` subcommands (JSONL output)
- Claude Code skill for automatic session search
- Branch Tree Explorer mode for navigating transcript branches
- Branch-aware resume with automatic fork for non-latest chains
- Claude Desktop sessions support
- Regex search mode toggle
- Word-level cursor movement and deletion
- Ctrl-C support (clear input or quit)
- GitHub release workflow (macOS arm64/x86_64, Linux x86_64, Windows)

### Fixed
- Session resume for paths with spaces, parens, underscores
- Content overflow artifacts in tree view
- Search not finding messages with plain string content
- Desktop session format parsing
- UTF-8 boundary panics in preview and context extraction
- Terminal rendering glitches
- Windows build (conditional compilation for unix exec)

## v0.1.0 - 2026-03-02

### New Features
- Initial implementation of Claude Code session search TUI
- Full-text search across session JSONL files using ripgrep
- Session grouping with timestamps and project context
- Interactive preview with match navigation
- Session resume from search results
