Last updated: 2026-03-05
This document describes the Codebase Explorer implementation, APIs, data rules, and performance behavior.
Implemented in:
/Users/miethe/dev/homelab/development/CCDash/backend/services/codebase_explorer.py/Users/miethe/dev/homelab/development/CCDash/backend/routers/codebase.py/Users/miethe/dev/homelab/development/CCDash/components/CodebaseExplorer.tsx/Users/miethe/dev/homelab/development/CCDash/components/SessionInspector.tsx
Route wiring:
/Users/miethe/dev/homelab/development/CCDash/App.tsx(/codebase)/Users/miethe/dev/homelab/development/CCDash/components/Layout.tsx(sidebar nav)
Session detail is split into separate tabs:
Activity: chronological merged line items from logs, file actions, and artifacts.Files: one row per file with multi-action chips (Read/Create/Update/Delete) and aggregate counts.
Transcript deep-links that previously targeted files now target Activity with sourceLogId highlighting.
Additional transcript/artifact behavior now relevant to explorer/session cross-navigation:
- Transcript mapping system supports typed mapped event cards (
command,artifact,action) with platform-aware mapping rules. - Session artifacts include richer runtime types (
agent,task,hook,test_run,skill,command) and keepsourceLogId+sourceToolNamefor traceability. - Sub-thread naming prefers captured
subagent_typemetadata when available, improving consistency between:- transcript
Open Threadactions - Session
Artifacts > Agents - top-level Session
Agentstab
- transcript
Query:
prefixdepthinclude_untouchedsearch
Returns folder/file tree nodes with touch metadata and aggregates.
Query:
prefixsearchinclude_untouchedactionfeature_idsort_bysort_orderoffsetlimit
Returns paginated file summaries.
Query:
activity_limit
Returns file detail including:
- action rollups
- related sessions
- feature involvement
- linked documents
- recent file activity entries
Codebase universe:
- all files under active project root (
activeProject.path) - excludes from root
.gitignore - built-in excludes:
.git/,node_modules/,dist/,coverage/,.venv/
Feature involvement scoring:
- action weights:
create=1.00update=0.80delete=0.70read=0.40
- base score per session-file:
entity_link_confidence * max_action_weight - direct path signals in
entity_links.metadata_json.signalscan raise score - involvement levels:
primary >= 0.75supporting 0.50-0.74peripheral < 0.50
- All requested file paths are normalized and checked against project root.
- Traversal/out-of-root paths are rejected with
400.
In-memory cache is 30s TTL per project and mode:
touchedsnapshot (default for most requests): no full filesystem scan.fullsnapshot (used wheninclude_untouched=true): includes untouched files via filesystem walk.
This reduces latency for common explorer interactions and avoids unnecessary full scans.
Scanner hardening:
- Missing/inaccessible entries (including dangling symlinks) are skipped instead of crashing.
/Users/miethe/dev/homelab/development/CCDash/backend/tests/test_codebase_router.py
Covers:
- tree listing
- untouched toggle
.gitignore+ built-in excludes- traversal rejection
- detail aggregation correctness
- involvement thresholds
- dangling symlink scan stability