Skip to content

fix: load dashboard when only non-VS Code harness logs exist (Claude/Codex/OpenCode)#53

Open
bryantharpe wants to merge 2 commits into
microsoft:mainfrom
bryantharpe:fix/external-harness-only-discovery
Open

fix: load dashboard when only non-VS Code harness logs exist (Claude/Codex/OpenCode)#53
bryantharpe wants to merge 2 commits into
microsoft:mainfrom
bryantharpe:fix/external-harness-only-discovery

Conversation

@bryantharpe
Copy link
Copy Markdown

@bryantharpe bryantharpe commented May 25, 2026

The dashboard's load gate aborts with "No Copilot chat log directories found" when findLogsDirs() is empty, but that only scans VS Code workspace storage and Copilot paths. The Claude Code / Codex / OpenCode collectors run in the parse worker independently of that list, so a host with only ~/.claude/projects (e.g. a headless Remote-SSH machine, Claude Code used from the terminal, no VS Code workspace storage) never loads despite valid sessions.

Adds hasExternalHarnessSources(), gates on it so the panel aborts only when no source of any kind is present, and updates the Copilot-specific empty-state message to reflect all supported sources. Validated against 133 real Claude Code sessions discovered with zero VS Code directories present.

Fixes #52

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (new parser-harnesses.test.ts)
  • Documentation updated (n/a)

findLogsDirs() scans only VS Code workspace storage and Copilot
directories, so the dashboard's load gate aborts with "No Copilot chat
log directories found" whenever those are absent. But the Claude Code /
Codex / OpenCode collectors run in the parse worker independently of that
list, so a host with only ~/.claude/projects (e.g. a headless Remote-SSH
machine with no VS Code workspace storage) never loads despite having
valid sessions.

Add hasExternalHarnessSources() and gate on it so the panel only aborts
when no source of any kind is present. Update the Copilot-specific
empty-state message to reflect all supported sources.
@bryantharpe
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the dashboard load gate so the webview can still load and parse sessions when only non–VS Code harness logs (Claude Code / Codex / OpenCode) exist on disk (e.g., headless Remote-SSH hosts), instead of aborting early with a Copilot-only “no dirs found” message.

Changes:

  • Add hasExternalHarnessSources() to detect external-harness log sources on disk.
  • Update the dashboard’s load gate to abort only when no supported source exists (VS Code/Xcode/Copilot paths and external harnesses).
  • Add a new Vitest file to cover the external-harness source discovery used by the gate.
Show a summary per file
File Description
src/webview/panel.ts Uses hasExternalHarnessSources() to avoid aborting when findLogsDirs() is empty but external harness logs exist; updates empty-state message.
src/core/parser-harnesses.ts Adds hasExternalHarnessSources() helper to detect Claude/Codex/OpenCode sources on disk.
src/core/parser-harnesses.test.ts Adds tests validating the external-harness source discovery used by the dashboard gate.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment thread src/webview/panel.ts Outdated
Comment thread src/core/parser-harnesses.ts
Comment thread src/core/parser-harnesses.test.ts Outdated
- panel.ts: include Xcode Copilot in the empty-state message (findLogsDirs
  also scans findXcodeDirs), so it isn't misleading on Xcode-only hosts.
- parser-harnesses.ts: guard hasExternalHarnessSources() to return false
  when neither HOME nor USERPROFILE is set, avoiding cwd-relative probing
  of paths like .claude/projects.
- parser-harnesses.test.ts: restore HOME/USERPROFILE in withHome()'s own
  finally block (drop afterEach) and add a test for the no-home guard.
@bryantharpe
Copy link
Copy Markdown
Author

Thanks for the review! Addressed all three points in 8651ff5:

  1. panel.ts empty-state message — now reads "VS Code, GitHub Copilot (CLI and Xcode), Claude Code, Codex, and OpenCode" so Xcode-only hosts aren't misled (findLogsDirs() includes findXcodeDirs()).
  2. hasExternalHarnessSources() — guards on a defined home dir; returns false when neither HOME nor USERPROFILE is set, so the find*Dirs() helpers never probe cwd-relative paths like .claude/projects.
  3. Test helperwithHome() now saves/restores HOME/USERPROFILE in its own finally (dropped the afterEach), and I added a test asserting the no-home guard returns false.

npm run check passes (998 tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard fails with "No Copilot chat log directories found" when only Claude Code / Codex / OpenCode logs exist

2 participants