Skip to content

Fix BUG-013: empty-plan state when no plan authored (no live-role pseudo-DAG)#811

Merged
anutron merged 1 commit into
masterfrom
argus/fix-no-plan-empty-state
Jun 25, 2026
Merged

Fix BUG-013: empty-plan state when no plan authored (no live-role pseudo-DAG)#811
anutron merged 1 commit into
masterfrom
argus/fix-no-plan-empty-state

Conversation

@anutron

@anutron anutron commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What

The Plan pane fell back to rendering live worker roles as a flat edgeless single stage ("no plan authored — live roles:") when an orchestrator had no authored plan — depicting ad-hoc managed agents as if they were a plan-DAG, which contradicts the model (DAG = the authored plan; rail = the agent roster).

Fix

When an orchestrator has no authored plan — zero planned nodes (RoleView.Planned) and zero hera_blocks edges — the Plan pane now renders an empty-plan state ("No plan authored" + author hint) instead of the live-role stage. When a plan is authored (≥1 planned node or edge), the full DAG renders exactly as before (planned + live nodes + edges, with #795 cancelled/failed states, BUG-010 scroll, BUG-011 wrap, BUG-012 sync — none regressed). Live agents remain in the rail untouched.

Tests / spec

  • Tests: a live-workers-but-no-plan orchestrator projects to the empty state (not a stage); an orchestrator with ≥1 planned node/edge still projects the full DAG; planview renders the placeholder for an empty node set.
  • golangci-lint v2.11.4 --new-from-rev → 0 issues; go test ./internal/tui/hera/ ./internal/tui/planview/ ./internal/tui/ green; build + gofmt clean.
  • OpenSpec change fix-bug-013-no-plan-empty-state (hera-view delta replacing the old live-role-fallback contract, validates --strict); plan.go comment + gotcha updated.

🤖 Generated with Claude Code

…udo-DAG)

When a coordinator has no authored plan (no planned nodes, no hera_blocks edges),
the Plan pane now renders an empty-plan placeholder ("No plan authored." + an
authoring hint) instead of drawing the live worker roles as a flat pseudo-DAG
stage. The live agents stay visible in the rail.

The empty-vs-DAG decision lives in the hera layer (HeraPage.rebuildPlan gates on
the new planIsAuthored helper and feeds the widget an empty node set when no plan
is authored); the projection heraPlanNodesWithBridge is unchanged and still
surfaces live worker nodes for the plan-authored case. The planview widget stays
a generic node renderer; its empty-node-set placeholder text was improved.

Adds page + widget + smoke tests for the empty-state and the still-rendered DAG;
OpenSpec hera-view delta modifies the Plan-DAG requirement accordingly.
@github-actions

Copy link
Copy Markdown

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/drn/argus/internal/tui 83.99% (ø)
github.com/drn/argus/internal/tui/hera 92.14% (-0.02%) 👎
github.com/drn/argus/internal/tui/planview 93.93% (+0.18%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/drn/argus/internal/tui/hera/page.go 91.78% (+0.09%) 292 (+3) 268 (+3) 24 👍
github.com/drn/argus/internal/tui/hera/plan.go 93.10% (-1.13%) 58 (+6) 54 (+5) 4 (+1) 👎
github.com/drn/argus/internal/tui/planview/planview.go 93.93% (+0.18%) 955 (+12) 897 (+13) 58 (-1) 👍

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

  • github.com/drn/argus/internal/tui/hera/dag_test.go
  • github.com/drn/argus/internal/tui/hera/plan_test.go
  • github.com/drn/argus/internal/tui/hera_mutations_smoke_test.go
  • github.com/drn/argus/internal/tui/planview/planview_test.go
  • github.com/drn/argus/internal/tui/planview/render_test.go

@anutron anutron merged commit 348b918 into master Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant