codeburn/tests/providers
Resham Joshi b72e51e538
Support CLAUDE_CONFIG_DIRS for scanning multiple Claude data dirs (#208) (#288)
Adds an OS-delimited list env var so a user with more than one
Claude account or profile can scan all of them in a single run.
Sessions across every configured dir merge into one ProjectSummary
per project, matching the option-1 design agreed on the issue
thread (no per-account splitting in the data model or the UI).

Format: `CLAUDE_CONFIG_DIRS=~/.claude-work:~/.claude-personal`
on POSIX, `;`-separated on Windows. Precedence is
CLAUDE_CONFIG_DIRS > CLAUDE_CONFIG_DIR > ~/.claude. Empty entries
in the list are skipped, duplicates are deduped on resolved path,
and a missing or unreadable dir does not abort the scan of the
others. If the user explicitly set CLAUDE_CONFIG_DIRS but every
listed entry is unreadable, a one-line stderr hint identifies the
attempted paths and the platform's expected delimiter, so a
Windows user typing the POSIX `:` does not get a silent zero-row
result. `~` is now also expanded in CLAUDE_CONFIG_DIR for
consistency.

Implementation is intentionally narrow: only `claude.ts` changes,
plus a small parser-cache key update so a stale cache from one
config does not bleed into a run with a different config (matters
for the macOS menubar and GNOME extension which run as long-lived
processes). The merge happens for free in
`src/parser.ts:scanProjectDirs`, which keys ProjectSummary entries
by canonical cwd (or the sanitized slug as a fallback). Two
SessionSource entries with the same `project` field land under the
same key and combine their sessions, regardless of which dir they
came from. No new fields on SessionSource / SessionSummary /
ProjectSummary, and no UI changes.

Tests: 12 fixture-based cases covering the unset path (default
~/.claude), single-dir override via CLAUDE_CONFIG_DIR, multi-dir
override via CLAUDE_CONFIG_DIRS, ~ expansion, dedup of repeated
entries, leading/trailing/doubled delimiters, missing dir
tolerated, file-not-directory entry tolerated, empty
CLAUDE_CONFIG_DIRS falls back to single-dir env, and two
parser-level integration tests asserting (a) two sessions from
two dirs sharing one cwd produce one ProjectSummary with combined
totals and no `account`/`accountPath` fields anywhere, and (b)
two sessions sharing a slug but with different canonical cwds
still merge by slug at the project-rollup layer (option 1
behavior pinned so a future refactor cannot quietly swap to
cwd-aware merging without an explicit opt-in).

Supersedes the alternative implementation in #227, which builds
per-account attribution (option 2) instead.
2026-05-09 22:04:45 -07:00
..
claude-config-dirs.test.ts Support CLAUDE_CONFIG_DIRS for scanning multiple Claude data dirs (#208) (#288) 2026-05-09 22:04:45 -07:00
codex.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
copilot.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
crush.test.ts Add Crush provider plus per-provider icon column in README (#286) 2026-05-09 20:47:56 -07:00
cursor-agent.test.ts Add new providers, fix menubar tabs, accent color picker (#167) 2026-04-27 19:46:30 -07:00
cursor-bubble-dedup.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
cursor.test.ts Add new providers, fix menubar tabs, accent color picker (#167) 2026-04-27 19:46:30 -07:00
droid.test.ts Add Droid CLI provider 2026-04-28 20:16:45 +02:00
kilo-code.test.ts Add OpenClaw, Roo Code, and KiloCode providers (#175) 2026-04-28 09:24:14 -07:00
kiro.test.ts Add new providers, fix menubar tabs, accent color picker (#167) 2026-04-27 19:46:30 -07:00
omp.test.ts Merge main into feat/omp-support-model-aliases 2026-04-21 03:16:28 -07:00
openclaw.test.ts Add OpenClaw, Roo Code, and KiloCode providers (#175) 2026-04-28 09:24:14 -07:00
opencode.test.ts fix: drop better-sqlite3 to remove deprecated prebuild-install (#75) 2026-04-18 01:26:23 -07:00
pi.test.ts perf: cache provider discovery metadata 2026-04-21 00:03:49 +02:00
roo-code.test.ts Add OpenClaw, Roo Code, and KiloCode providers (#175) 2026-04-28 09:24:14 -07:00