pdftract/crates/pdftract-cli
jedarden 1d316bce2b feat(pdftract-2hqxi): implement indicatif progress bar with watchdog
Implements the progress bar for pdftract grep with:
- 100ms steady tick for spinner animation
- 500ms watchdog guarantee for liveness during slow file operations
- 30s slow-file warning
- TTY detection with --progress/--no-progress flags
- Multi-progress: main bar (overall) + current bar (per-file)
- Output to stderr (separate from --json stdout)

Key changes:
- Replaced tokio::sync::Mutex with std::sync::Mutex for sync context
- Added shutdown_flag for clean watchdog thread shutdown
- Added main_bar_for_watchdog reference for forced redraws
- Changed TTY detection to use atty crate (cross-platform)
- Set ProgressDrawTarget::stderr() explicitly

Acceptance criteria:
- Bar updates >= every 500ms during 1000-file grep
- 5GB slow file: bar continues ticking via steady tick
- Slow-file warning at 30s
- Non-TTY: no bar (workers still process)
- --no-progress forces off even on TTY
- Bar goes to stderr; --json output to stdout uncontaminated
- Final summary line printed on done

Related: pdftract-43sg2 (ProgressEvent source)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 20:02:11 -04:00
..
benches feat(pdftract-3h9xo): implement threads JSON output + schema integration 2026-05-25 13:40:15 -04:00
src feat(pdftract-2hqxi): implement indicatif progress bar with watchdog 2026-05-27 20:02:11 -04:00
tests feat(pdftract-3b1mk): implement TH-09 inspector XSS test with CSP headers 2026-05-26 20:38:21 -04:00
build.rs docs(pdftract-32y9): finalize SDK architecture note with workspace layout, cross-compile matrix, and KU-12 alignment 2026-05-24 06:38:23 -04:00
Cargo.toml feat(pdftract-3b1mk): implement TH-09 inspector XSS test with CSP headers 2026-05-26 20:38:21 -04:00
pdftract-cli.cdx.json feat(pdftract-67tm8): implement MCP stdio transport with integration tests 2026-05-23 00:16:42 -04:00