Fix BUG-012: re-project plan-DAG on status change so rail and DAG stay in sync#810
Merged
Conversation
…in sync planview.UpdateData short-circuited on an unchanged projectionSig, which folded in only each node's State.Glyph()/Drillable/edges — never the resolved status ICON. A hera status step / ready_to_close clear changes a node's icon (the rail-parity review checkmark / role-status glyph) while its task-derived State is unchanged (e.g. still working), so the signature didn't change, UpdateData no-op'd, and the DAG node kept rendering the stale checkmark while the rail moved on. Fold the node icon (Glyph + Animated) into projectionSig so an icon-only change re-installs the layout and the DAG node updates in lock-step with the rail. failed/cancelled states sync via the same projection. No goroutine, no Sync. Drift fix toward the existing hera-view plan-node parity contract; no new spec.
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
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.
What
After a status change (Shift+S step /
ready_to_closeclear), the rail updated but the plan-DAG node rendered the stale state — e.g. a worker showed review-✓ in the DAG while the rail (correctly) showed it back to working.Root cause
planview.UpdateDatashort-circuits to a no-op whenprojectionSigis unchanged. The sig folded in each node's ID +State.Glyph()+ Drillable + edges — but not the resolved status icon. A status step changes a node's icon (rail-parity review ✓ / role-status glyph) while its task-derivedStatestays "working", so the sig didn't change,UpdateDatano-op'd, and the DAG kept the stale icon while the rail moved on.Fix
Fold the node icon (Glyph + Animated) into
projectionSig, so an icon-only change re-installs the layout and the DAG updates in lock-step with the rail.failed/cancelled(from #795) sync via the same projection. No goroutine, noscreen.Sync()— follows the existing debounced Refresher/doRefresh pattern. (Chose this over forcingSetDataevery step, which would reset the operator's plan cursor / fanned groups — the regressionUpdateDataexists to prevent.)Tests / verification
planview.TestUpdateData_IconChangeReinstalls+hera.TestRefresh_StatusStepReprojectsPlanNode(both red→green).go test -race ./internal/tui/hera/... ./internal/tui/planview/...pass; golangci-lint v2.11.4--new-from-rev→ 0 issues; build + gofmt clean.🤖 Generated with Claude Code