Plan canvas: WI dependency graph with frontier, blocked, and orphan overlays #599

Open
toasterson wants to merge 4 commits from claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro into main
Owner

Anima work item 019fd894-bff4-7682-8b8f-ddd449eeab8d.

What to build

The node-based canvas on the Plan detail page (anima-pwa/src/pages/PlanDetail/PlanDetail.tsx): the plan's Work Items as nodes, Dependency edges as drawn edges, auto topological layout, with overlays for the Ready frontier (all edges satisfied), blocked nodes (with their blocking chain on hover/select), orphaned edges, and non-binding late edges. Drag from node to node creates an edge via AddWorkItemDependency; cycle rejection from the server renders inline at the attempted edge. Demoable in the browser against a plan with chained WIs.

Pushed context

  • ADR 0036 consequences section is the spec for the overlays. Blocked ≠ Parked visually and in copy (CONTEXT.md).
  • Reuse the DAG-shaped WorkflowGraph component (nodes + edge-list props, hand-rolled SVG — landed by WI 019fbdc3-f502 under plan 019fbdc3-a44b; if it is not on main, PARK, do not reimplement). WI nodes are a sibling use of the same renderer: this slice may extract a shared graph core if that is cleaner than props-stretching.
  • No new npm dependencies (no reactflow/d3/dagre) — plans are 3-10 WIs; a layered topo layout by hand is fine. Auto-layout only, no persisted positions. Violet Void tokens only (rule at top of src/index.css); import UI primitives from the components/ui barrel.
  • Data: dependsOnIds/blockedBy from the API-surface slice via TanStack useQuery ([fnName, ...args] key convention). Cross-plan edges render as ghost nodes linking out (title + code, click-through), per ADR 0036's same-project scope.
  • Edge-draw writes through AddWorkItemDependency; a WI already dispatched shows new edges as non-binding (distinct stroke + tooltip) exactly as the server flags them. An empty plan or a plan with no edges renders the plain WI list state — a wiring failure and an idle state must never look the same, so API errors surface, never blank-fallback.

Acceptance criteria

  • Nodes + edges render for a plan with chained WIs; topo layers stable and deterministic (test).
  • Frontier/blocked/orphaned/non-binding states visually distinct; blocked chain inspectable (test).
  • Edge-draw calls the RPC; server cycle rejection renders inline (test with mocked client).
  • Ghost nodes for cross-plan edges link through (test).
  • PWA build, vitest, lint green before push.

Blocked by

  • 019fd894-47db-70b0-aaac-cafc45071a8c (API surface). Also parks if WorkflowGraph (WI 019fbdc3-f502) is not yet on main.
Anima work item `019fd894-bff4-7682-8b8f-ddd449eeab8d`. ## What to build The node-based canvas on the Plan detail page (anima-pwa/src/pages/PlanDetail/PlanDetail.tsx): the plan's Work Items as nodes, Dependency edges as drawn edges, auto topological layout, with overlays for the Ready frontier (all edges satisfied), blocked nodes (with their blocking chain on hover/select), orphaned edges, and non-binding late edges. Drag from node to node creates an edge via AddWorkItemDependency; cycle rejection from the server renders inline at the attempted edge. Demoable in the browser against a plan with chained WIs. ## Pushed context - ADR 0036 consequences section is the spec for the overlays. Blocked ≠ Parked visually and in copy (CONTEXT.md). - Reuse the DAG-shaped WorkflowGraph component (nodes + edge-list props, hand-rolled SVG — landed by WI 019fbdc3-f502 under plan 019fbdc3-a44b; if it is not on main, PARK, do not reimplement). WI nodes are a sibling use of the same renderer: this slice may extract a shared graph core if that is cleaner than props-stretching. - No new npm dependencies (no reactflow/d3/dagre) — plans are 3-10 WIs; a layered topo layout by hand is fine. Auto-layout only, no persisted positions. Violet Void tokens only (rule at top of src/index.css); import UI primitives from the components/ui barrel. - Data: dependsOnIds/blockedBy from the API-surface slice via TanStack useQuery ([fnName, ...args] key convention). Cross-plan edges render as ghost nodes linking out (title + code, click-through), per ADR 0036's same-project scope. - Edge-draw writes through AddWorkItemDependency; a WI already dispatched shows new edges as non-binding (distinct stroke + tooltip) exactly as the server flags them. An empty plan or a plan with no edges renders the plain WI list state — a wiring failure and an idle state must never look the same, so API errors surface, never blank-fallback. ## Acceptance criteria - [ ] Nodes + edges render for a plan with chained WIs; topo layers stable and deterministic (test). - [ ] Frontier/blocked/orphaned/non-binding states visually distinct; blocked chain inspectable (test). - [ ] Edge-draw calls the RPC; server cycle rejection renders inline (test with mocked client). - [ ] Ghost nodes for cross-plan edges link through (test). - [ ] PWA build, vitest, lint green before push. ## Blocked by - 019fd894-47db-70b0-aaac-cafc45071a8c (API surface). Also parks if WorkflowGraph (WI 019fbdc3-f502) is not yet on main.
toasterson changed title from WIP: Plan canvas: WI dependency graph with frontier, blocked, and orphan overlays to Plan canvas: WI dependency graph with frontier, blocked, and orphan overlays 2026-08-18 15:03:05 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro:claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git rebase main
git switch main
git merge --ff-only claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git rebase main
git switch main
git merge --no-ff claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch main
git merge --squash claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch main
git merge --ff-only claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git switch main
git merge claude/wi-019fd894-plan-canvas-wi-dependency-graph-with-fro
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/Anima!599
No description provided.