fix(analytics): use lstat to skip broken symlinks in JSONL scan#515
Open
usubhash wants to merge 1 commit intodavila7:mainfrom
Open
fix(analytics): use lstat to skip broken symlinks in JSONL scan#515usubhash wants to merge 1 commit intodavila7:mainfrom
usubhash wants to merge 1 commit intodavila7:mainfrom
Conversation
fs.stat() follows symlinks, so a broken symlink (e.g. ~/.claude/debug/latest pointing to a deleted file) throws ENOENT and aborts the entire conversation scan, causing the dashboard to show 0 conversations. Switch to fs.lstat() + skip symlinks so the recursive JSONL finder is robust against broken links and any other unreadable entries in ~/.claude. Fixes: dashboard shows "Found 0 conversations" on macOS when ~/.claude/debug/latest is a dangling symlink
|
@usubhash is attempting to deploy a commit to the Daniel Avila's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fs.stat() follows symlinks, so a broken symlink (e.g. ~/.claude/debug/latest pointing to a deleted file) throws ENOENT and aborts the entire conversation scan, causing the dashboard to show 0 conversations.
Switch to fs.lstat() + skip symlinks so the recursive JSONL finder is robust against broken links and any other unreadable entries in ~/.claude.
Fixes: dashboard shows "Found 0 conversations" on macOS when ~/.claude/debug/latest is a dangling symlink
Summary by cubic
Make the JSONL scan resilient to broken symlinks so analytics doesn’t abort and show 0 conversations. We now inspect entries with
fs.lstatand skip symlinks and unreadable items.fs.lstatand skip symlinks/unreadable entries inConversationAnalyzerto prevent ENOENT aborts during scans.~/.claude/debug/latestis a dangling symlink on macOS.cli-tool/src/).docs/components.json) change needed.Written for commit c7f984c. Summary will update on new commits.