Skip to content

Add live scan progress counter#13

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/scan-progress
May 29, 2026
Merged

Add live scan progress counter#13
github-actions[bot] merged 1 commit into
mainfrom
feat/scan-progress

Conversation

@riddim-developer-bot
Copy link
Copy Markdown
Contributor

Summary

Scanning ~/.codex/sessions/ can touch thousands of files before any output appears. Adds a live stderr counter so the command doesn't look frozen:

  scanning codex sessions: 1,234 / 4,567  (27%)

The line clears itself before the results table renders, so output is uncluttered.

Details

  • onProgress callback added to computeIssueCost and computeWorktreeCost — fires once per file during the Codex scan (and Claude scan for --worktree)
  • CLI wires up makeProgressReporter() only when stderr.isTTY — silent when piping --json output
  • All 66 tests pass

Test plan

  • llm-cost --worktree <path> shows live counter then clean results
  • llm-cost <ISSUE-ID> shows live counter then clean results
  • llm-cost --worktree <path> --json | jq . produces clean JSON with no progress noise

Shows a live stderr counter while scanning Codex and Claude sessions
so the command doesn't appear frozen on large transcript directories.
Clears automatically before the results table. Silent when stderr is
not a TTY (--json piped output unaffected).
@github-actions github-actions Bot enabled auto-merge (squash) May 29, 2026 18:22
@github-actions github-actions Bot merged commit 824fc8c into main May 29, 2026
2 checks passed
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