Skip to content

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

Merged
Aymen (aymenfurter) merged 2 commits into
microsoft:mainfrom
bryantharpe:fix/external-harness-only-discovery
May 27, 2026
Merged

Aymen (aymenfurter) merged 2 commits into
microsoft:mainfrom
bryantharpe:fix/external-harness-only-discovery

Conversation

@bryantharpe

@bryantharpe Bryan Tharpe (bryantharpe) commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

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
Contributor Author

@microsoft-github-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 Resolved
Comment thread src/core/parser-harnesses.ts Resolved
Comment thread src/core/parser-harnesses.test.ts Resolved
- 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
Contributor 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 helper — withHome() 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).

@aymenfurter Aymen (aymenfurter) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! The fix is minimal and well-scoped — the short-circuit check in hasExternalHarnessSources() correctly gates on HOME/USERPROFILE before probing, and the panel logic now properly accounts for hosts that only have non-VS Code harness logs. All 998 tests pass, CI is green, and the extension packages cleanly.

@aymenfurter
Aymen (aymenfurter) merged commit 81ca024 into microsoft:main May 27, 2026
5 checks passed
Flusspferd (JuliusGruber) pushed a commit to JuliusGruber/AI-Engineering-Coach that referenced this pull request Jun 1, 2026
- Refresh AUTO sections: staleness banner (0 behind), counts block
  (52/12/1, gap 10, no DRIFT), gap-methods list (flags calibrateRule +
  runRuleTests as not-yet-bucketed TODOs), no new upstream RPC methods.
- Record the merge outcome: microsoft#53/microsoft#67/microsoft#85/microsoft#86 merged; metric-engine.ts drift
  retired (resolved toward upstream); fork-authored drift now 2 files
  (parser-codex.test.ts, panel-request-service.ts), both upstream-it.
- Preserved the human bucket A-E narrative.
Flusspferd (JuliusGruber) pushed a commit to JuliusGruber/AI-Engineering-Coach that referenced this pull request Jun 4, 2026
…stream)

The fork merged upstream/main to 3a41450 (PR #12, f50fa13), so the two
portable merge-debt items are now in the tree:

- microsoft#53 (blank dashboard for non-VS-Code harnesses) — hasExternalHarnessSources()
  at parser-harnesses.ts:86, gate at panel.ts:207/213. Flipped to RESOLVED.
- microsoft#67 (Codex skillsUsed undercount) — collectSkillsFromArgs (parser-codex.ts:242),
  extractSkillPathsFromText (parser-shared.ts:320). Flipped to RESOLVED.

Verified 0 behind (fetch-upstream.sh, parity-gap.mjs), merge-base == upstream/main.
Updated the derivation header (now 3a41450, 0 behind, gap=10), foundational-correction
paragraph (debt paid; only remaining drift is the 2 fork-ahead deliberate edits),
status line, and priority notes. Left the Fork-authored drift subsection intact —
drift gate still classifies both edits DELIBERATE -> upstream-it.
Flusspferd (JuliusGruber) pushed a commit to JuliusGruber/AI-Engineering-Coach that referenced this pull request Jun 4, 2026
…er merge-debt

The merging-upstream skill used to treat "upstream has unmerged commits" as a
parity gap: report-template.md instructed a "F. Merge debt — fork is behind
upstream" bucket derived from the unmerged-commit log, so bug fixes, dep bumps,
and refactors got listed as standalone gaps.

Reframe STANDALONE-PARITY-GAPS.md to track functional parity only — upstream
functionality not exposed/implemented by the standalone build. Git sync status
(how far behind upstream the fork is) is owned by fetch-upstream.sh (behind
count) + drift-gate.sh and never gets a bucket.

New rule (SKILL.md step 4 + Common mistakes, report-template.md, reference.md):
- Buckets (A, B, C, …) are an append-only ledger: never renumber/merge/delete.
- New upstream functionality the standalone build lacks → append a NEW lettered
  bucket at the next free letter, one per feature.
- Features only — exclude bug fixes, refactors, dep bumps, tests, infra, and
  VS Code-only surfaces.
- An implemented bucket is marked SHIPPED (<date>) in place by the implementing
  agent and kept as history.

Clean the report itself: drop the resolved Bucket F merge-debt section and its
microsoft#53/microsoft#67 history, promote "Fork-authored drift" to its own non-bucket section,
and add Scope + Bucket-convention notes.

Verified with RED/GREEN subagent tests: old text reproduced the merge-debt
bucket; new text appends a single feature bucket and excludes the non-features.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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

3 participants