Skip to content

Keep paths outside ccdeck out of error reports - #1935

Merged
BarganConstantin merged 1 commit into
developmentfrom
fix/error-paths
Oct 4, 2026
Merged

BarganConstantin merged 1 commit into
developmentfrom
fix/error-paths

Conversation

@BarganConstantin

Copy link
Copy Markdown
Owner

What changes

  • Error reports no longer carry paths outside ccdeck's own package. The scrub used to swap only the home folder for ~, so the rest of a path left with the error: a project's folder under ~/.claude/projects/, a path under /mnt or on another drive or share, a file:// frame. Now every such path is sent as <path> (with ~ and ~/.claude or ~/.codex kept in front when it had them), and a project folder in Claude Code's encoding (-home-alice-acme, C--Users-Bob-acme) as <project>.
  • A frame inside ccdeck's own package keeps its place in it — ccdeck/src/server/tail.mjs:42:7 — whether the deck runs from npx, a global install, a source checkout or the desktop app, so a stack still says where the bug is and reads the same on every machine. A dependency npx put beside the package keeps node_modules/<pkg>/….
  • The page's scrub of the crash text it seeds the feedback dialog with uses the same patterns (a test holds the two copies together).
  • Emails and key-shaped strings are scrubbed as before. README and PRODUCT.md say what the scrub now takes out.

Verification

  • npm run typecheck clean.
  • Full suite (--maxWorkers=3 --minWorkers=1): 889 files, 11646 tests passed, exit 0.
  • New src/web/__tests__/error-report-paths.test.ts: an ENOENT on ~/.claude/projects/-home-alice-Desktop-acme-secret/…, /mnt/work/acme, D:\clients\acme, a UNC share, file:// frames, quoted and framed paths with spaces, bare encoded project folders; the deck's own frames on npx, checkout, macOS app and Windows app roots; addresses, node:internal frames and plain words left alone; and one end-to-end reportError with a stubbed fetch. Before the fix, 38 of its cases failed with the path or project left in the text.
  • reports-1853.test.ts and visible-feedback-1853.test.ts repointed from "the tail after ~ stays" to the new shape.
  • Scrub timing checked on a 1 MB input (linear, ~65 ms).

The error scrub only swapped the home folder for ~, so everything after it left: a project's folder under ~/.claude/projects, a path under /mnt or another drive, a file:// frame. Every path outside ccdeck's own package now leaves as <path> (with ~ and ~/.claude or ~/.codex kept in front), a project folder in Claude Code's encoding as <project>, and a frame of ccdeck's own keeps its place in the package (ccdeck/src/server/tail.mjs:42:7) however it was installed. The page's scrub of the crash text it seeds feedback with follows the same patterns.
@BarganConstantin
BarganConstantin merged commit 62cf42d into development Oct 4, 2026
10 checks passed
@BarganConstantin BarganConstantin mentioned this pull request Oct 5, 2026
@BarganConstantin
BarganConstantin deleted the fix/error-paths branch October 20, 2026 14:08
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.

1 participant