mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-07-24 00:14:32 +00:00
|
Some checks are pending
CI / semgrep (push) Waiting to run
* feat(claude): group Cowork sessions by space name instead of sanitized path Claude Desktop local-agent-mode (Cowork) sessions were appearing as separate projects with cryptic sanitized-path names like `-Users-carlo-Library-Application-Support-Claude-...`. This meant sessions from the same Cowork space (e.g. PhD_Thesis) showed up as dozens of unrelated entries. Changes: - `discoverSessions()` detects paths inside the desktop sessions dir (`~/Library/Application Support/Claude/local-agent-mode-sessions`) and resolves the human-readable space name by reading the sibling `local_<id>.json` (for spaceId) and `spaces.json` (id → name map) - `CODEBURN_DESKTOP_SESSIONS_DIR` env var overrides the desktop path for testability - Sessions without a spaceId fall back to `userSelectedFolders[0]` basename, then the session title (instead of the unintelligible slug) - `isCoworkOutputPath()` in parser.ts prevents the ephemeral `outputs/` cwd from being used as the canonical project key, which would have given every session a unique grouping key - Parse-version bump (`cowork-space-grouping-v1`) invalidates stale cache so all files re-scan with the new logic on first run - 5 new integration tests covering spaceId grouping, cross-space separation, folder fallback, title fallback, and no-metadata fallback * test: use generic Project1/Project2/SubFolder names in cowork tests * fix(parser): detect container-mode Cowork sessions by file path, not just cwd Cowork sessions run in two modes: - Local-mode: cwd is an ephemeral per-session outputs/ dir inside the desktop sessions directory — already handled. - Container-mode: session runs inside Docker, so cwd is a container-local path like /sessions/<adjective-name> that does not exist on the host. The JSONL file still lives inside the desktop sessions directory, so we detect these by also checking the file path. Rename isCoworkOutputPath → isCoworkSession and check both cwd and filePath. Without this, container-mode sessions leaked their Docker cwd as the canonical project path and showed as e.g. "sessions/trusting-inspiring-ri" instead of grouping under the Cowork space name. Also add a test covering the container-mode case and use generic names (Project1, Project2, SubFolder) throughout the Cowork test suite. * feat(parser): merge same-project sessions across AI providers by path When a repository has sessions from multiple tools (e.g. both Claude Code and Codex), parseAllSessions now groups them into a single ProjectSummary instead of showing duplicate entries. The previous outer merge keyed on p.project (a string name), so Claude's "LibricicloAgain" and Codex's "Users-carlo-Desktop-LibricicloAgain" were treated as different projects despite referring to the same directory. The root cause is that Codex's sanitizeProject() strips the leading '/' from cwds, producing "Users/carlo/Desktop/foo" instead of "/Users/carlo/Desktop/foo". The new crossProviderKey normalises both by stripping leading slashes and lowercasing before comparison. Non-path identifiers (like Cowork space names: "PhD_Thesis") have no '/' and fall back to comparing the project name, so they are unaffected. * feat(parser): resolve other-provider worktrees before cross-provider merge Codex (and similar tools) store worktrees under paths like ~/.codex/worktrees/<hash>/Repo. These were not being resolved to their main-repo path because canonicalizeProviderCallProject only operates on call.projectPath, which Codex doesn't set — the project is inferred from the session source slug instead. Fix: before the cross-provider merge in parseAllSessions, run worktree resolution on each non-Claude ProjectSummary's projectPath. Restore the missing leading '/' (Codex strips it via sanitizeProject) before calling resolveCanonicalProjectPath so the stat() can find the .git file. If the path is a worktree, replace project name and path with the canonical main-repo values so the downstream crossProviderKey matches. * feat(dashboard): show more projects in By Project panel to fill panel height The panel was hardcoded to 8 projects regardless of the Daily Activity panel height alongside it. Pass the same `days` value used by Daily Activity so the two panels stay in sync: 14 for week/6-months views, 31 for month/30-days, 20 for all-time, and a minimum of 8 for the today view. * feat(parser): resolve subdirectory sessions to their git repo root When a cwd like ~/Repo/src/subdir is recorded, it should group with the rest of the ~/Repo project. Previously resolveCanonicalProjectPath only checked for a .git entry at the exact cwd, so subdirectory sessions created separate ProjectSummary entries. Walk up the directory tree until a .git entry is found. Guard against foreign paths (a Windows path like C:\… on macOS cannot be walked on the local filesystem) by only walking paths that look like absolute paths on the current platform. This also folds non-Claude provider subdirectory sessions into the parent repo via resolveOtherProjectWorktrees, which now triggers whenever canonical.path differs from the input path (not only for git worktrees). * Address reviewer feedback: deduplicate getDesktopSessionsDir and fix test Export getDesktopSessionsDir from claude.ts and import it in parser.ts instead of maintaining an identical copy in both files. Update the 'merges by sanitized slug' test to reflect the new path-aware merge behavior: sessions with the same slug but different cwds now stay separate (crossProviderKey keys by path, not slug), which is correct since they represent different repos. |
||
|---|---|---|
| .. | ||
| fixtures/security | ||
| providers | ||
| security | ||
| antigravity-statusline.test.ts | ||
| bash-commands.test.ts | ||
| blob-to-text.test.ts | ||
| classifier.test.ts | ||
| cli-date.test.ts | ||
| cli-deepseek-v4-pricing.test.ts | ||
| cli-export-date-range.test.ts | ||
| cli-json-daily.test.ts | ||
| cli-plan.test.ts | ||
| cli-status-menubar.test.ts | ||
| compare-stats.test.ts | ||
| currency-rounding.test.ts | ||
| daily-cache.test.ts | ||
| dashboard.test.ts | ||
| date-range-filter.test.ts | ||
| day-aggregator.test.ts | ||
| export.test.ts | ||
| fs-utils.test.ts | ||
| mcp-coverage.test.ts | ||
| menubar-installer.test.ts | ||
| menubar-json.test.ts | ||
| minimax.test.ts | ||
| model-efficiency.test.ts | ||
| models-hoist.test.ts | ||
| models-report.test.ts | ||
| models.test.ts | ||
| optimize-fs.test.ts | ||
| optimize.test.ts | ||
| parser-claude-cwd.test.ts | ||
| parser-compact-entry.test.ts | ||
| parser-filter.test.ts | ||
| parser-gemini-cache.test.ts | ||
| parser-large-json-scanner.test.ts | ||
| parser-large-session.test.ts | ||
| parser-mcp-inventory.test.ts | ||
| parser-skip-line.test.ts | ||
| plan-usage.test.ts | ||
| plans.test.ts | ||
| provider-registry.test.ts | ||
| provider-turn-grouping.test.ts | ||
| session-cache.test.ts | ||