feat: add live dashboard and polling to validate command#189
Merged
Conversation
**Added:** - Introduced `--plain` flag to disable live dashboard and stream results to stdout in validate command - Added `--poll` flag to rerun validation on a configurable cadence in validate command - Implemented terminal TUI dashboard for validation runs using Bubbletea and Lipgloss, including real-time category/status breakdown and polling support - `internal/validate/tui.go` - Added static summary panel rendering for post-run summary output - `internal/validate/panel.go` - Created table-driven tests for poll interval parsing and dashboard rendering - `cli/cmd/validate_test.go`, `internal/validate/panel_test.go`, `internal/validate/tui_test.go` **Changed:** - Refactored validate command to support TUI dashboard, polling, and new CLI flags - Replaced direct color output with summary panel rendering when not using TUI - Updated output logic to separate TUI/console flows, including warnings for ignored flags **Removed:** - Removed dependency on `github.com/fatih/color` in favor of Lipgloss styling for output - Eliminated redundant/legacy color output logic from validate summary
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.
Key Changes:
validatecommand using Bubbletea and Lipgloss--plainand--pollflags to control dashboard output and recurring validationAdded:
internal/validate/tui.go,internal/validate/panel.go--plain(disable dashboard) and--poll(repeat validation at intervals) flags to thevalidatecommand -cmd/validate.gocmd/validate_test.go,internal/validate/panel_test.go,internal/validate/tui_test.goChanged:
runValidateto support TUI or plain output based on terminal detection and user flags -cmd/validate.gointernal/validate/validator.gogolang.org/x/termfor terminal detection and UI sizing -go.modRemoved:
github.com/fatih/colorinvalidate.goin favor of Lipgloss-based rendering for consistent color and style handling