Add JSON and TUI output modes for progress command#5
Merged
Conversation
Changes to phaser-cli: - Add --json and --tui flags (mutually exclusive, TUI is default) - Create ProgressOutput and WorkerOutput structs for JSON serialization - Implement run_progress_json() that outputs one JSON line per update with RFC3339 timestamps and human-readable durations - Implement run_progress_tui() with ratatui showing: * Job status panel with ID, status, and block counts * Progress bar (Gauge) with percentage, rate, and bytes * Workers table with stage, blocks, current block, rate, elapsed * Completed workers show ✓ and frozen elapsed time * Active workers show live current block and updating elapsed * Press 'q' to quit, auto-exit after job completion - Add format_duration() helper for human-readable time (e.g., "15m3s") Dependencies added: - chrono for RFC3339 timestamp formatting - ratatui for terminal UI - crossterm for terminal control This provides both machine-readable JSON output and a rich interactive TUI for monitoring sync job progress in real-time.
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.
Changes to phaser-cli:
Dependencies added:
This provides both machine-readable JSON output and a rich interactive TUI for monitoring sync job progress in real-time.