Skip to content

feat(storybook): BaseNode V2 & LoopNode V2 — iterative design proposals#706

Draft
1980computer wants to merge 16 commits into
mainfrom
basenode-improvements
Draft

feat(storybook): BaseNode V2 & LoopNode V2 — iterative design proposals#706
1980computer wants to merge 16 commits into
mainfrom
basenode-improvements

Conversation

@1980computer
Copy link
Copy Markdown
Collaborator

@1980computer 1980computer commented May 14, 2026

Summary

  • BaseNode V2 (BaseNodeV2.stories.tsx) — Anatomy page with shape docs, adornment slot diagram, Loop Count Badge reference table (what ↻ N means, when it appears, slot priority). Custom AdornmentResolverProvider keeps all V2 changes isolated from the original BaseNode story.
  • LoopNode V2 (LoopNodeV2.stories.tsx) — New file. Full Anatomy page + two execution canvas stories.
  • Storybook sort order — Anatomy surfaces first in both V2 sidebars.

LoopNode V2 — what's prototyped

Compound Iteration Picker

Replaces the original single ◄ / ► buttons with a richer compound control:

Control Behaviour
|◄ / ►| Jump to first / last iteration
/ Step back / forward one iteration
[k / N] Click the index number to type-jump to any iteration
All toggle Collapses the picker into an aggregate view

Per-iteration status dots

A small coloured dot (●) appears next to the iteration number in the picker, reflecting that specific iteration's outcome — green (Completed), red (Failed), amber (In Progress), purple (Paused), grey (Cancelled).

Richer "All" aggregate

When the All toggle is active and status data is available, the badge shows ✓ completed ✗ failed with status colours instead of just Σ total.

Jump-to-failed shortcut

A ⚠ button appears whenever at least one iteration has a Failed status. One click jumps directly to the first failed iteration.

Iteration progress strip

A 1 px hairline at the bottom edge of the loop header fills proportionally as iterations reach a terminal state. Turns red if any iteration failed; green otherwise.

Execution Count documentation

Anatomy page includes a dedicated Execution Count subsection under V2 Iterations explaining:

  • The denominator N in the picker = how many iterations the loop ran
  • Each child node displays the same count as a ↻ N badge in its bottomRight slot
  • Both numbers always match when the loop finishes

Scope

All canvas changes are isolated to the V2 story files. The original BaseNode.stories.tsx and LoopNode.stories.tsx are unchanged and serve as frozen reference.

Test plan

  • Open Storybook → Canvas → BaseNode V2 → Anatomy — verify Loop Count Badge table renders
  • Open Canvas → LoopNode V2 → Anatomy — verify all subsections present (Container Structure, Adornment Slots, Handles, V2 Iterations with Execution Count / Compound Picker / Progress Strip)
  • Open Canvas → LoopNode V2 → Execution States V2 — interact with compound picker on each loop card; verify status dots, All aggregate, ⚠ jump-to-failed, and 1 px progress strip
  • Confirm original Canvas → BaseNode and Canvas → LoopNode stories are visually unchanged

🤖 Generated with Claude Code

1980computer and others added 2 commits May 14, 2026 11:30
- Add @types/react pnpm override to force single React 19 types version
  across workspace, eliminating @types/react@18 conflicts with cmdk/vaul
- Set abortOnError: false in apollo-react and apollo-wind rslib configs so
  declaration type errors warn rather than fail the build
- Remove unused @uipath/ap-chat dep from storybook-app to drop ap-chat
  from the turbo build chain
- Prefer .ts over .js in Vite extension resolution so ESM locale files
  are picked up instead of stale CJS .js compiled outputs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Duplicates the BaseNode story suite under a new 'Components/BaseNode V2'
title so the team can click between before/after in Storybook while
iterating on BaseNode improvements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@1980computer 1980computer force-pushed the basenode-improvements branch from faee264 to 1a1ac93 Compare May 14, 2026 18:30
… count docs

- Add LoopNodeV2.stories.tsx with Anatomy page covering container structure,
  adornment slots, handles, and V2 Iterations section
- Compound iteration picker: All toggle, per-iteration status dots, richer
  All aggregate (✓ completed / ✗ failed breakdown), jump-to-failed shortcut
  (⚠), and 1 px progress strip at the header bottom edge
- Execution Count subsection documents how loop total (N) and child-node
  ↻ N badge relate — both surface the same loop execution count
- Update BaseNodeV2 anatomy: Loop Count Badge reference table explaining
  slot, visibility condition, what N means, tooltip, and priority rule
- Storybook sort order updated to surface Anatomy first in both V2 sidebars
- Add AdornmentResolverProvider context to adornment-resolver.tsx so V2
  stories can inject custom resolvers without affecting original stories

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@1980computer 1980computer changed the title feat(storybook): BaseNode V2 — iterative design comparison feat(storybook): BaseNode V2 & LoopNode V2 — iterative design proposals May 14, 2026
},
] as const;

function NodeAnatomyDiagram() {
1980computer and others added 8 commits May 14, 2026 15:03
Strip is now a 1px flex column child inside the navigator overlay div,
sitting directly below the iteration picker at the same width — instead
of a full-width absolute bar spanning the entire loop node header.

Anatomy page updated to match: live demo and strip-states section both
reflect the new layout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove iteration progress strip — status dot and All aggregate
  already carry the same information
- Change jump-to-failed icon from circle-alert to crosshair so it
  reads as navigation rather than a duplicate status indicator
- Suppress jump-to-failed button when overall loop status is Failed
  (topRight adornment already communicates it)
- Make aggregate badge (✓/✗) clickable to exit All mode — same as
  clicking All again, with hover accent border as affordance
- Fix 1px vertical misalignment: V2_OVERLAY_TOP 9 → 10 so All,
  picker, and Sequential badge share the same center line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the same callout diagram as BaseNode V2 — LoopNode mock with
left/right slot labels and connector lines — so both anatomy pages
are consistent.

Also corrects the bottomRight slot description: LoopNode does not
carry a loop count badge (that lives on child BaseNodes). bottomRight
only shows the output-pinned indicator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a second interactive prototype under V2 Iterations for reviewer
comparison. Option B folds the All toggle into the left segment of a
single pill — removing the first/last jump buttons and reducing the
control to one cohesive element. A side-by-side comparison table
calls out the key tradeoffs between Option A and Option B.

Option A (compound picker) is unchanged and labeled as current.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both picker options are proposals — updated the badge from "current"
to "current proposal" to reflect that.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the stacked layout with a 2-column grid so reviewers can
directly compare the two iteration picker proposals. Each column has
a heading, short description, live interactive demo, and a one-line
summary. The tradeoff table and Option A control reference sit
full-width below.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Duplicates the nested loop layout from NestedOuterOutputAppend and
wires it up with the V2 compound iteration picker. Outer loop is in
progress (iteration 2 of 5); inner loop has completed all 3
iterations. Both pickers are interactive for review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1980computer and others added 4 commits May 14, 2026 16:50
- Wire all nodes and loops with full edge connections (initialEdges was
  previously defined but not passed to useCanvasStory)
- Expand to 4 levels deep: Region → City → Street → Property, each with
  3 activity nodes and a live V2 iteration picker
- Auto-fit view on load via initialAutoLayout so the full diagram is
  immediately visible
- Remove StoryInfoPanel — no longer needed on the demo page
- Rename story to "Demo - Option A" in the sidebar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire up the same interactive tooling as other loop stories: drag-to-connect
triggers the add-node preview, clicking a handle opens the picker, pane
click dismisses preview, and Backspace/Delete removes selected nodes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename demo story to "Demo - Option B"
- Add LoopExecutionCanvasNodePill node type using IterationNavigatorPill
- Demo canvas uses LOOP_EXECUTION_NODE_TYPES_PILL so Option A story is unaffected
- Default isAll=true so the pill opens in the aggregate (All) state
- Also default Option B anatomy demo to All-selected state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r context

- Add Option A (inside border) vs Option B (on border) placement diagrams
  to both BaseNode V2 and LoopNode V2 anatomy pages
- LoopNode V2 diagrams use full interactive header mocks (iteration picker +
  Sequential badge + real adornment icons) so header crowding is visible
- Pros/cons bullet lists per option; two-point trade-off callout covering
  canvas density and the topRight badge / header crowding tension
- Default Option B anatomy demo to All-selected state
- Switch Demo page to Option B pill (LoopExecutionCanvasNodePill) and
  rename story to "Demo - Option B"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ickers

BaseNode V2:
- Add ActionNeeded execution state with amber circle adornment (top-right)
- Add ActionNeededCanvasNode: renders Take Action button below node label
- Add dedicated Action Needed story showing all three shapes fit to view
- Document Action Needed in anatomy page with design notes and reference table
- Fix circular module TDZ: get BaseNode via useNodeTypesFromRegistry hook
  instead of direct import (BaseNode → adornment-resolver → canvas/index.ts
  → HierarchicalCanvas DEFAULT_NODE_TYPES access before init)

LoopNode V2:
- Add responsive tiers (full ≥400px, compact 260-399px, minimal <260px)
  to IterationNavigatorV2 and IterationNavigatorPill, driven by props.width
- Document responsive behavior in anatomy with breakpoint table and
  interactive tier mocks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
},
] as const;

function NodeAnatomyDiagram() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants