Skip to content

feat(live): determinate progress bars for preprocess & rank - #207

Merged
whatever merged 2 commits into
mainfrom
feat/live-stage-progress-bars
Sep 3, 2026
Merged

feat(live): determinate progress bars for preprocess & rank#207
whatever merged 2 commits into
mainfrom
feat/live-stage-progress-bars

Conversation

@whatever

@whatever whatever commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds stacked progress bars to the --live panel for the preprocess and rank pipeline stages
  • Bars fill incrementally as each stage executes, with a DONE! marker when both complete
  • Extends SourcehuntStagePayload with an optional progress: float field (0.0–1.0)
preprocess: [████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒]

preprocess: [████████████████████]
rank:       [████████▒▒▒▒▒▒▒▒▒▒▒▒]

preprocess: [████████████████████]
rank:       [████████████████████]
DONE!

Files changed

File Change
event_payloads.py progress field on SourcehuntStagePayload
runner.py Thread progress kwarg through _emit_stage
preprocessor.py Emit progress events at substep boundaries (static analysis → file enum → callgraph → reachability → semgrep → taint)
ranker.py Emit progress per completed chunk
llm_activity.py Subscribe to SOURCEHUNT_STAGE, track state, render bars in the Rich panel

Test plan

  • ruff check passes on all modified files
  • 181 related tests pass (-k "preprocess or ranker or llm_activity or event")
  • Manual: run sourcehunt with --live on a small repo, confirm bars animate and show DONE!

The --live panel now shows stacked progress bars that fill incrementally
as the preprocess and rank stages execute, with a DONE! marker when both
complete.  Progress is driven by SOURCEHUNT_STAGE events carrying a new
optional `progress` float (0.0–1.0).
@whatever
whatever merged commit a1d48c0 into main Sep 3, 2026
1 check 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.

2 participants