fix(cli): show checksum progress in the live watch view - #1151
Open
aparajon wants to merge 2 commits into
Open
Conversation
The watch TUI parsed progress responses through its own private table struct, which dropped the checksum counters (and throttle fields), so a checksumming apply rendered a full bar with no verify percent or rows line while the status view showed both. Route the watch TUI through the shared ParseProgressResponse and delete the duplicate structs, so every progress view renders from the same parsed data. The watch-only value-adds move into the shared parser: internal-table filtering, preferring Spirit's progress string over the stored copy fields, deriving shard percent from rows, promoting the slowest shard's ETA to the table, and normalizing raw engine statuses. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aparajon
marked this pull request as ready for review
August 26, 2026 04:23
aparajon
requested review from
JashLal,
Kiran01bm,
eeSeeGee,
jayjanssen,
jemiahw and
morgo
as code owners
August 26, 2026 04:23
Contributor
There was a problem hiding this comment.
Pull request overview
This PR unifies CLI/TUI progress rendering by routing the watch TUI through the shared templates.ParseProgressResponse parser, ensuring checksum/verify progress (and other previously-dropped fields) are consistently available across status, progress, and the live watch view.
Changes:
- Watch TUI now consumes
templates.ParseProgressResponseoutput directly, removing duplicate progress structs/conversion logic. - Shared progress parser now centralizes additional normalization/derivation (internal-table filtering, Spirit progress-string precedence, shard percent derivation, and slowest-shard ETA promotion).
- Adds/updates tests to cover checksum progress visibility in watch, shard percent derivation, ETA promotion, internal-table filtering, and status normalization.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/cmd/internal/templates/progress_parse.go | Moves watch-only progress normalization into the shared parser and filters internal tables consistently. |
| pkg/cmd/internal/templates/progress_parse_test.go | Adds coverage for ETA promotion, shard percent derivation, internal-table filtering, and Spirit progress-string precedence. |
| pkg/cmd/commands/watch_tui.go | Replaces watch-private progress table types with shared template progress types. |
| pkg/cmd/commands/watch_tui_commands.go | Simplifies watch progress parsing by delegating to templates.ParseProgressResponse. |
| pkg/cmd/commands/watch_tui_view.go | Updates rendering helpers to operate on shared template progress types and removes conversion helpers. |
| pkg/cmd/commands/watch_tui_view_multi.go | Updates multi-deployment view helpers to use shared template progress types. |
| pkg/cmd/commands/watch_tui_test.go | Updates tests for shared types and adds coverage for checksum/verify progress in the watch view. |
| pkg/cmd/commands/watch_tui_vitess_test.go | Adjusts tests to validate watch parsing from API response shapes (typed apitypes structs). |
| pkg/cmd/commands/common.go | Updates change-count summarization helper to accept shared template progress types. |
| pkg/cmd/commands/common_test.go | Updates tests to use shared template progress types. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Row totals are estimates, so a nearly finished copy can report more rows copied than the total; the percent derived from them must not exceed 100. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Watching an apply during its checksum phase rendered a full progress bar and a numberless "Checksumming to verify data..." label, while
schemabot statuson the same apply showed the verify percent and a "Rows verified" line. The watch TUI parsed the progress response through its own private table struct, which dropped the checksum counters (plus the throttle fields and per-shard percent/cutover attempts) before they ever reached the shared renderer.templates.ParseProgressResponseoutput directly; the duplicate parse structs are deleted, so every progress view (status,progress, and the watch TUI) renders from the same parsed data.Watch view during checksum (rendered)
Previously this rendered a full bar with "Checksumming to verify data..." and no rows line.
🤖 Generated with Claude Code