Skip to content

Hank076/Unified-AI-Session-Explorer

Repository files navigation

Unified AI Session Explorer

Languages: English | 繁體中文

Unified AI Session Explorer is a local-first desktop app built with Tauri 2, Rust, and vanilla JavaScript for browsing AI session history. It currently supports Claude (~/.claude/projects) and Codex CLI (~/.codex).

It is designed for people who want a faster and safer way to inspect local AI workspaces without uploading session data to a third-party service.

✨ Highlights

  • Local-first by default. Session data stays on your machine.
  • Supports multiple AI sources: Claude and Codex CLI, with a source toggle to filter by provider.
  • Rust backend for directory traversal, JSONL parsing, and path validation.
  • Timeline viewer for conversations, tool activity, thinking blocks, and system events.
  • Tree view for parent sessions and subagent sessions.
  • Built-in project and message search.
  • Safe deletion flow with project impact preview and session undo window.
  • Bilingual UI: en-US and zh-Hant-TW.
  • Theme modes: auto, light, and dark.

🧩 Current Features

  • Browse Claude projects detected from ~/.claude/projects.
  • Browse Codex CLI projects detected from ~/.codex/sessions.
  • Source toggle to show all sessions, Claude only, or Codex only.
  • Source badges on project and session list entries to identify the AI provider at a glance.
  • Infer a readable project name from the original working directory when available.
  • Open sessions and memory files from the same project workspace.
  • Display session metadata including model, token usage, web tool usage, and estimated duration.
  • Render Codex session timelines including chat messages, thinking blocks, function calls, and system events.
  • Keep tool_use and tool_result content grouped in a readable timeline.
  • Toggle visibility for system events, tool calls, and thinking content independently.
  • Search across the project list and within the selected timeline.
  • Show subagent sessions under their parent session with expand/collapse controls.
  • Open the project folder from the context menu.
  • Copy session IDs from the session context menu.
  • Preview delete impact before removing a project.
  • Queue session deletion with a short undo grace period.

📸 Screenshots

Main Window Placeholder

🛠 Tech Stack

  • Desktop shell: Tauri 2
  • Backend: Rust 2021
  • Frontend: vanilla HTML, CSS, and ESM JavaScript
  • Test stack: node --test, JSDOM, Rust unit tests

📁 Project Layout

src/         Frontend app (HTML, CSS, JS, i18n, theme logic)
src-tauri/   Rust backend, Tauri commands, packaging config
tests/       Frontend unit tests and JSDOM UI tests
docs/        Product and UI notes

🚀 Getting Started

Prerequisites

Install Dependencies

npm install

Run In Desktop Mode

npm run tauri dev

Run In Browser Preview

npm run dev:web

The browser preview is useful for frontend iteration, but features that depend on Tauri APIs such as local filesystem commands and folder opening require the desktop runtime.

✅ Testing

Run frontend tests:

node --test tests/*.mjs

Run focused UI flow checks:

npm run test:ui

test:ui currently runs a JSDOM-based UI regression suite (not a full real-browser E2E suite), mainly covering delete/undo flows, context menu actions, and timeline visibility toggles.

Run Rust backend tests:

cargo test --manifest-path src-tauri/Cargo.toml

🔒 Security Model

  • The backend validates requested paths and rejects access outside the configured Claude projects root.
  • The default data root is %USERPROFILE%\\.claude\\projects on Windows and ~/.claude/projects on Unix-like systems.
  • Project deletion removes the full project directory tree.
  • Session deletion removes the selected .jsonl file and its related subagent directory when present.

🤝 Contributing

Issues and pull requests are welcome. Prefer small, focused changes with clear reproduction steps and expected behavior.

📄 License

MIT