Context: The current app is built on Next.js 14 (App Router) with Vitest for tests, Tailwind, Radix primitives, and shadcn-style components. The original spec mentions Vite; we will keep Next.js for the integrated API/filesystem access and document SSR considerations. A Vite migration remains optional.
- Document decision to keep Next.js for now and why. (2025-10-20: Added to README and this plan.)
- Evaluate Vite migration feasibility (benefits vs. effort); record decision in
docs/architecture.md. - Document SSR/ISR considerations and static export trade-offs.
Goal: Drive Claude & Codex parsing from JSON Schemas so tool calls/results land in a consistent UI with minimal provider-specific logic.
- Refresh anonymised fixtures under
fixtures/{claude,codex}covering current event types (tooluse/tool_result, item.* events, response_item variants). (2025-10-15: Added schema-aligned Claude/Codex logs with commandexecution, reasoning, and error cases.) - Document key field mappings and schema coverage notes in
docs/data-sources.md. (2025-10-14: Recorded Codex and Claude schema variants indocs/data-sources.md.)
- Author JSON Schemas for Claude tool events (
tool_use,tool_result,text) and Codex events (item.started/updated/completed,response_item,function_call,function_call_output). (2025-10-14: Addedclaude/message.*mappings alongside Codex coverage.) - Build an Ajv-based validator/normaliser that consumes schema + mapping definitions to emit
ChatMessageobjects. (2025-10-14:normalise()now drives Codex & Claude providers behind the schema flag.) - Implement reusable transforms (ISO timestamps, exitCode/duration extraction, diff parsing, toolType inference, stdout/stderr capture). (2025-10-14: Added join-text-array, append-suffix, and nested property extraction for Codex schemas.)
- Document schema versioning, contribution workflow, and testing expectations. (2025-10-15: Added
docs/schema-contribution.mdand cross-linked fromdocs/data-sources.md.)
- Wire Codex adapter to the schema normaliser for tool events with a controlled fallback path. (2025-10-14: Provider switches to schema mappings when
NEXT_PUBLIC_SCHEMA_NORMALISER=1.) - Update (2025-10-14): Codex session topic now prefers the user prompt preceding the first assistant message (including reasoning/tool preambles) to match UX expectations. (2025-10-14: Covered by schema-mode tests.)
- Wire Claude adapter to the same pipeline (
tool_use/tool_result/text) while preserving raw payloads for audit. (2025-10-14: Adapter emits schema-derived messages whenNEXT_PUBLIC_SCHEMA_NORMALISER=1, with legacy fallback.) - Add unit/snapshot tests that validate + normalise fixtures through the schema layer and guard regressions. (2025-10-14: Added
src/schema/providers/codex/mappings.test.tsto exercise new mappings.) - Benchmark parsing performance on large logs and record baseline metrics. (Deferred: lightweight benchmarking approach TBD after settling on toolchain.)
- Fix Cursor workspace matching to handle case differences across resource paths. (2025-10-31: Normalised provider paths and added regression tests covering mixed-case URIs.)
- Fix Cursor session detail loading by deriving the accurate provider root from snapshot files. (2025-10-31: Detail API resolves snapshot IDs via
normalizeProviderRoot, reloads sessions, and surfaces debug telemetry for ingestion.) - Repair build regression from Cursor debug helpers by aligning provider error typing and chat-store persistence migration. (2025-10-31:
ProviderImportErrornow imports from@/types/providersandchat-storemigration returns a typed object to satisfypnpm run build.)
- Support pagination for long conversation lists (client-side pager in ChatList). (2025-10-20: Added page controls in
src/components/chats/chat-list.tsx.) - Add virtualisation for extra-large lists (e.g.,
@tanstack/react-virtual). - Add page-size selector (10/20/50/100) to ChatList pager. (2025-10-20.)
- Implement fast navigation affordances (keyboard shortcuts, breadcrumbs, recent sessions).
- Enhance ToolCallCard diff navigation (previous/next hunk indicators, keyboard bindings).
Goal: Deliver the core SPA shell, responsive layouts, and conversation ergonomics.
- App shell with sidebar (filters), main list, and toolbar. (2025-10-13:
AppShell,ChatSidebar,ChatListlanded.) - Route
/chats/[id]for full-page detail view. (2025-10-13:src/app/chats/[id]/page.tsx.) - Theming (light/dark) and locale switch. (2025-10-13:
ThemeProvider,ThemeToggle, i18n providers.) - Search, source filters, starred toggle, date range, project filter. (2025-10-13:
useFilteredSessionSummaries+ChatSidebarcontrols.) - Collapsible long outputs and tool-call/result pairing with diff jump. (2025-10-13:
ToolCallCard, collapse toggles, next-diff action.) - Add
/statspage: basic counts by project/provider usingPOST /api/projects. (2025-10-20: Implementedsrc/app/stats/page.tsxwith search, totals, and project filter handoff.) - Add header navigation entry to
/stats. (2025-10-20: AppShell button linking to/stats.) - Add header navigation entry to
/settings. (2025-10-20: AppShell button linking to/settings.) - Add
/settingspage: surface provider path config + theme/locale. (2025-10-20: Implementedsrc/app/settings/page.tsxwith provider paths form, validation, Theme/Locale toggles.) - Hydrate settings form with resolved provider roots after session load so defaults surface automatically. (2025-10-21:
loadSessionsOnServernow returnsresolvedPaths; client hydrates store viahydrateProviderPaths.) - Remove provider setup dialog; move configuration to Settings. (2025-10-20: Deleted
src/components/preferences/provider-setup-dialog.tsx; header uses Settings.) - Virtualise long lists (e.g.
@tanstack/react-virtual) inChatList. - Keyword highlighting within conversation view (respect current filters).
- Keyboard navigation: list up/down, open detail, next/prev diff bindings; document shortcuts.
- Accessibility pass: labels, contrast, focus rings, and tab order review; track fixes.
Goal: Robust local import via server routes and in‑browser import with clear errors.
- Filesystem ingestion with provider roots from env/UI. (2025-10-13:
src/app/api/sessions, server loader normalises paths.) - Browser import via file selector + Web Worker. (2025-10-13:
parseFile,parser.worker.ts.) - Error surfacing: banner for import errors and retry on detail. (2025-10-13:
App.tsx+ChatDetail.) - Timestamp normalisation to ISO 8601 in adapters. (2025-10-13: provider utilities.)
- Docker defaults map to
/app/data/{claude,codex}; UI respectsNEXT_PUBLIC_*env. (2025-10-10: Dockerfile, provider paths.) - Server-side auto-detect defaults for provider roots across OS (HOME-based + Docker path). (2025-10-20:
loadSessionsOnServerprobes common paths for Claude/Codex; Gemini placeholder.) - Add Gemini adapter parity once sample logs are ready. (2025-10-22: Implemented
src/lib/providers/gemini.ts, API wiring, tests, and default path detection.) - Surface Cursor provider directory alongside others in config/state so settings/localisation include it. (2025-10-30: Added
cursorentries across provider paths, store, and settings UI.) - Research Cursor log format and collect anonymised fixtures; capture schema differences. (2025-10-30: Added
fixtures/cursor, documented state.vscdb + history layout.) - Extend schema normaliser + adapters to support Cursor provider (
CURSOR_ROOT) with tests covering tool/run events. (2025-10-30: Loader now surfaces prompts + history artifacts; schema-backed normaliser still pending.) (2025-10-30: Added Cursor schema mapping, normaliser integration, and Vitest coverage for chat/tool flows.) - Auto-detect default Cursor workspace path (macOS
~/Library/Application Support/Cursor, Windows roaming profile) and expose override in settings. (2025-10-30: Server candidates & normaliser now cover Cursor for macOS/Linux/Windows.) - Update docs (
docs/data-sources.md, README) and UI copy to reference Cursor ingestion and configuration. (2025-10-30: README variants + data-sources notes updated with storage paths.) - Parse Cursor
aiService.generations/workbench.panel.aichatchat data to hydrate prompt + assistant transcripts, falling back to history snapshots when responses are absent. (2025-10-30: Loader resolves prompt/assistant text from chatdata with history fallback.) - Document the Cursor transcript extraction pipeline and add verification steps ensuring Cursor sessions appear in list/detail views. (2025-10-30: Revised
docs/cursor-storage.mdwith chatdata/generation mapping + sqlite checklist.) - Capture multi-turn Cursor fixtures with tool metadata to exercise schema normaliser. (2025-10-30: Expanded sample workspace/history with chatdata threads and tool invocation artifacts.)
- Source anonymised Cursor exports covering images and multiple tool invocations to harden schema mappings (pending access to real transcripts).
Goal: Enforce reproducibility and ≥80% coverage with fast local feedback.
- Husky
pre-commit: requireagents_chatrecord, validate sections, block unstaged changes, runpnpm lint+pnpm test. (2025-10-02:.husky/pre-commit.) - CI mirrors lint, tests, and build on pushes/PRs. (2025-10-03:
.github/workflows/ci.yml.) - Add
commitlint+husky commit-msgto enforce Conventional Commits. - Add
pre-pushhook to re-run integration/E2E (when defined). - Introduce Storybook for core components (
button,ToolCallCard,ChatList); add smoke stories. - Add Stylelint config and wire into hooks/CI.
- Enforce coverage ≥80% (configure thresholds in Vitest) and backfill tests for parsing edge cases.
Goal: Multi-stage Docker targeting <200MB; clear runbooks for macOS/Windows/Docker.
- Multi-stage Docker build on
node:18-alpineusing Next standalone output. (2025-10-10:Dockerfile.) -
.dockerignoretuned to reduce context size. (2025-10-02.) - README documents Docker and host runtime flows (envs, volumes, Windows/WSL notes). (2025-10-13.)
- Release workflow: auto-draft version PR + Docker publish on release. (2025-10-22: revamped
prepare-release.yml,build-on-release.yml, added docs.) - Measure image size in CI; document size and optimise if >200MB (alpine libc, prune locales, strip dev deps from standalone if needed).
- Optional NGINX/alpine scratch serving of static assets, document trade-offs.
Goal: Ship a one-command npx talk-replay experience with automated packaging, CI, and documentation.
- Prepare npm publishing config (un-set
private, addbinentry,files,publishConfig,prepackbuild/test guard). (2025-11-01:package.jsonnow exposes the CLI bin, packaging files, and prepack verification.) - Implement CLI runner that exposes
--port/--hostnameflags and starts the prebuilt Next server. (2025-11-01: Addedbin/talk-replay.mjsusing Next standalone output with env/flag parsing.) - Add automated tests covering CLI option parsing and failure messaging when build assets are missing. (2025-11-01:
src/cli/cli.test.tsexercises flag parsing and artifact validation.) - Extend GitHub Actions to pack the npm artifact and ensure CLI smoke tests run on pushes/PRs. (2025-11-01: CI packs tarball + help smoke test; new
npm-publishworkflow publishes on release.) - Document npx usage, release workflow, and troubleshooting in
README.md+docs/. (2025-11-01: README (EN/中文) coversnpx talk-replay; release doc updated with npm steps.) - Provide release checklist in
agents_chattemplate to capture publish context (new subsection or linked doc). (2025-11-01: Added guidance indocs/release-process.mdfor agents_chat release sections.)
Goal: Guide users through provider directory selection with OS-aware auto-detection.
- Restore a first-run provider setup dialog backed by persisted preferences, auto-opening until completion. (2025-11-01: Added
ProviderSetupDialogwith skip/continue flows and store gating.) - Surface OS-aware default paths through
/api/providers/defaultswith client fallbacks for offline contexts. (2025-11-01: New API route leveragingresolveDefaultProviderRoot, dialog fetch with graceful fallback.) - Update UI copy and docs to mention automated detection on first launch (EN/中文). (2025-11-01: README variants and locale strings refreshed for the onboarding wizard.)
Goal: Introduce a backend service that aggregates shared directories from team members, enabling collaborative browsing while preserving the frontend UX.
- Select backend stack (e.g., Node + Fastify/Express) and persistence layer (PostgreSQL/SQLite).
- Define API contract for provider sync (manifests, diff updates, attachments).
- Implement authentication/authorisation with RBAC for directories.
- Set up background jobs for periodic sync and conflict resolution.
- Provide database migration + seeding workflow.
- Build CLI/agent for teammates to register local directories and push metadata.
- Reuse schema normalisation on the server to avoid duplicating frontend logic.
- Handle binary attachments (images, files) with pluggable storage (S3-compatible + local fallback).
- Introduce privacy controls (masking, redaction) for shared sessions.
- Create account management flows (login, directory management, sharing settings).
- Add workspace/team selector with real-time updates (websocket/SSE).
- Surface sync status indicators, conflict prompts, and activity logs.
- Support mixed mode (local-only + shared sessions) via toggle or merged view.
- Expand i18n strings to cover collaboration terminology.
- Extend Docker setup for multi-service development (frontend, backend, database, proxy).
- Add CI pipelines (lint, test, build, integration) for both frontend and backend.
- Instrument logging/metrics (pino + OpenTelemetry) and hook basic alerting.
- Publish deployment guides (self-hosted, cloud) including TLS, backups, scaling.
- Define security checklist (input validation, rate limiting, dependency audits).
- Expand automated tests: backend unit/integration, contract tests, end-to-end flows.
- Update
README.mdand adddocs/architecture.mddescribing system components and onboarding. - Provide runbooks for administrators (user management, directory onboarding, recovery drills).
- Review
agents_chatprocess to capture cross-team collaboration sessions. - Define Milestone 2 acceptance criteria and release plan.
- Maintain detailed
agents_chatlogs per collaboration session and keep hooks up to date. - Track dependency updates and security advisories (dependabot/renovate).
- Periodically profile parsing/rendering performance on large transcripts.
- Capture user feedback/feature requests and update backlog regularly.
- Keep commits small and focused; reflect significant progress in
tasks.md.
Notes
- Frontend currently uses Next.js 14 (App Router). We will revisit Vite if SSR/API needs change; document decisions in
docs/architecture.md. - Environment toggles: schema mode via
NEXT_PUBLIC_SCHEMA_NORMALISER=1; provider roots viaNEXT_PUBLIC_{CLAUDE,CODEX,GEMINI}_ROOTwith server fallbacks (CLAUDE_ROOT, etc.).