Repository navigation
fix(designer-v2): align Shared node authoring and monitoring behavior across renderers - #9732
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change required. |
| Commit Type | ✅ | Keep only fix selected. |
| Risk Level | Consider changing the body selection and label from Medium to High due to the broad user-facing scope. | |
| What & Why | ✅ | No change required. |
| Impact of Change | ✅ | No change required. |
| Test Plan | ✅ | Unit and E2E coverage are present in the diff. |
| Contributors | Add credits if other contributors participated. | |
| Screenshots/Videos | ✅ | Visual evidence is comprehensive and applicable. |
The PR title and body pass the required compliance checks. The advised risk is higher than the submitted Medium estimate; please consider updating the risk selection and risk:high label after confirming with the appropriate reviewers.
Powered by: Logic App (fallback) | Last updated: Tue, 24 Nov 2026 03:00:41 GMT
📊 Coverage CheckThe following changed files need attention:
Please add tests for the uncovered files before merging. |
There was a problem hiding this comment.
🟡 Changes recommended
MCP cards can show aggregate failure status instead of the selected invocation’s result and omit its duration, while refreshes can overwrite a successful invocation’s status.
4 open issues
What changed in this PR
This PR improves authoring and monitoring parity in designer-v2, keeping shared presentation in designer-ui-v2 and workflow state, layout, and commands in the designer host.
Changes:
- Improves compact titles, low-zoom readability, hover placement, branch controls, and keyboard focus.
- Scopes monitoring data to selected repetitions and blocks editing commands during monitoring while preserving Copy.
- Adds regression tests, browser coverage, and Storybook documentation.
| File | Description |
|---|---|
| libs/designer-v2/src/lib/ui/panel/runTreeView/TreeActionItem.tsx | Coordinates Agent and tool repetition selection. |
| libs/designer-v2/src/lib/ui/panel/runTreeView/__tests__/TreeActionItem.spec.tsx | Tests tool selection across renderers. |
| libs/designer-v2/src/lib/ui/panel/multiSelectPanel/SharedExtractionPreviewNode.tsx | Aligns preview cards with editor sizing. |
| libs/designer-v2/src/lib/ui/panel/multiSelectPanel/multiSelectPanel.tsx | Locks bulk edits during monitoring. |
| libs/designer-v2/src/lib/ui/panel/multiSelectPanel/__test__/SharedWorkflowExtractionPreview.spec.tsx | Tests compact preview presentation. |
| libs/designer-v2/src/lib/ui/panel/multiSelectPanel/__test__/multiSelectPanel.spec.tsx | Tests monitoring command restrictions. |
| libs/designer-v2/src/lib/ui/menuItems/deleteMenuItem.tsx | Disables Delete during monitoring. |
| libs/designer-v2/src/lib/ui/DesignerReactFlow.tsx | Applies overview styling and grouped hover feedback. |
| libs/designer-v2/src/lib/ui/Designer.tsx | Disables editing shortcuts during monitoring. |
| libs/designer-v2/src/lib/ui/CustomNodes/useLoopGroupHover.ts | Coordinates loop header and body highlighting. |
| libs/designer-v2/src/lib/ui/CustomNodes/OperationCardNode.tsx | Scopes tool status and adds Testing shortcuts. |
| libs/designer-v2/src/lib/ui/CustomNodes/GraphContainerNode.tsx | Adds loop joins and merge hover targets. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/handles/handles.styles.ts | Enables merge-point pointer interaction. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/handles/DefaultHandle.tsx | Identifies merge-linked insertion controls. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/card/SharedNodeHoverCard.tsx | Avoids neighboring cards and exposes test-data editing. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/card/SharedActionCard.tsx | Prioritizes titles and forwards hover actions. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/card/nodeUiStrings.ts | Localizes branch captions and outcomes. |
| libs/designer-v2/src/lib/ui/CustomNodes/components/card/__test__/SharedFamilyCards.spec.tsx | Tests branch controls and localization. |
| libs/designer-v2/src/lib/ui/CustomNodes/__test__/OperationCardNode.spec.tsx | Tests monitoring data and deletion restrictions. |
| libs/designer-v2/src/lib/ui/CustomNodes/__test__/GraphContainerNode.spec.tsx | Updates collapsed-state test setup. |
| libs/designer-v2/src/lib/ui/connections/sharedEdgeArrowCap.tsx | Marks highlighted arrow caps. |
| libs/designer-v2/src/lib/ui/connections/mergeHover.ts | Shares merge hover identity. |
| libs/designer-v2/src/lib/ui/connections/edge.tsx | Connects edge highlighting and merge insertion. |
| libs/designer-v2/src/lib/ui/connections/dropzone.tsx | Handles merge activation, monitoring, and focus return. |
| libs/designer-v2/src/lib/ui/connections/__tests__/dropzone.spec.tsx | Tests insertion behavior during monitoring. |
| libs/designer-v2/src/lib/ui/common/LoopsPager/helper.ts | Adds Agent repetition identity helpers. |
| libs/designer-v2/src/lib/ui/common/EdgeContextualMenu/EdgeContextualMenu.tsx | Restores insertion-button focus after Escape. |
| libs/designer-v2/src/lib/ui/common/DesignerContextualMenu/DesignerContextualMenu.tsx | Adds host lane commands and bulk edit locks. |
| libs/designer-v2/src/lib/ui/common/DesignerContextualMenu/__test__/DesignerContextualMenu.spec.tsx | Tests lane menus and monitoring restrictions. |
| libs/designer-v2/src/lib/ui/common/DeleteModal/MultiSelectDeleteModal.tsx | Blocks and dismisses bulk deletion during monitoring. |
| libs/designer-v2/src/lib/ui/common/DeleteModal/DeleteModal.tsx | Guards single-node deletion during monitoring. |
| libs/designer-v2/src/lib/ui/common/DeleteModal/__test__/monitoringDeletion.spec.tsx | Tests deletion guards and pending-dialog dismissal. |
| libs/designer-v2/src/lib/ui/__test__/Designer.spec.tsx | Tests monitoring shortcut restrictions. |
| libs/designer-v2/src/lib/core/utils/loopRepetitions.ts | Centralizes repetition-count extraction. |
| libs/designer-v2/src/lib/core/utils/graph.ts | Reserves loop pager height. |
| libs/designer-v2/src/lib/core/state/workflow/workflowSlice.ts | Tracks repetition identity and clears stale tool data. |
| libs/designer-v2/src/lib/core/state/workflow/workflowInterfaces.ts | Adds Agent repetition identity metadata. |
| libs/designer-v2/src/lib/core/state/workflow/__test__/workflowSlice.graphBehavior.spec.ts | Tests stale-data clearing and page preservation. |
| libs/designer-v2/src/lib/core/state/undoRedo/undoRedoSelectors.ts | Disables history controls when editing is locked. |
| libs/designer-v2/src/lib/core/state/designerView/designerViewInterfaces.ts | Adds menu entry-point and focus-return metadata. |
| libs/designer-v2/src/lib/core/state/designerOptions/workflowEditLock.ts | Centralizes read-only and monitoring locks. |
| libs/designer-v2/src/lib/core/queries/runs.ts | Fetches repetition-specific condition outputs. |
| libs/designer-v2/src/lib/core/queries/__test__/runs.spec.ts | Tests output isolation and secured-output handling. |
| libs/designer-v2/src/lib/core/parsers/updateAgenticGraph.ts | Extends the Agent update payload. |
| libs/designer-v2/src/lib/core/graphlayout/helpers.ts | Determines when loop pager space is needed. |
| libs/designer-v2/src/lib/core/graphlayout/elklayout.tsx | Adds loop join coordinates and collapse-aware layout. |
| libs/designer-v2/src/lib/core/graphlayout/__test__/familyPresentation.spec.ts | Tests expanded and collapsed pager sizing. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/wrapInScope.ts | Rejects grouping when editing is locked. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/undoRedo.ts | Guards undo and redo commands. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/delete.ts | Guards bulk deletion commands. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/copypaste.ts | Guards Cut and Duplicate across asynchronous work. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/__test__/wrapInScope.spec.ts | Tests direct grouping restrictions. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/__test__/undoRedo.spec.ts | Tests history preservation during monitoring. |
| libs/designer-v2/src/lib/core/actions/bjsworkflow/__test__/copypaste.spec.ts | Tests monitoring transitions during Cut. |
| libs/designer-ui-v2/stories/NodeBranchShell.stories.tsx | Demonstrates branch header surfaces. |
| libs/designer-ui-v2/stories/NodeBranchActions.stories.tsx | Demonstrates keyboard-invoked branch commands. |
| libs/designer-ui-v2/stories/LoopBodyJoin.stories.tsx | Demonstrates normal and highlighted loop joins. |
| libs/designer-ui-v2/stories/Introduction.mdx | Updates documented export counts. |
| libs/designer-ui-v2/stories/API.mdx | Documents new presentation contracts. |
| libs/designer-ui-v2/src/theme/tokens.ts | Adds configurable title typography variables. |
| libs/designer-ui-v2/src/nodes/primitives/NodeText.tsx | Prioritizes wrapped titles and exposes styling markers. |
| libs/designer-ui-v2/src/nodes/primitives/NodeLine.tsx | Strengthens forced-color edge highlighting. |
| libs/designer-ui-v2/src/nodes/primitives/NodeIconTile.tsx | Exposes glyphs for overview styling. |
| libs/designer-ui-v2/src/nodes/primitives/NodeCard.tsx | Aligns typography and distinguishes focus from status. |
| libs/designer-ui-v2/src/nodes/primitives/NodeBranchShell.tsx | Adds a presentational branch header shell. |
| libs/designer-ui-v2/src/nodes/primitives/NodeBranchActions.tsx | Adds host-controlled branch action buttons. |
| libs/designer-ui-v2/src/nodes/primitives/NodeAddButton.tsx | Adds externally activated insertion styling. |
| libs/designer-ui-v2/src/nodes/primitives/LoopBodyJoin.tsx | Adds decorative loop joins and hover styling. |
| libs/designer-ui-v2/src/nodes/overviewStyles.ts | Adds low-zoom node and edge styling. |
| libs/designer-ui-v2/src/nodes/metrics.ts | Defines compact title font family. |
| libs/designer-ui-v2/src/nodes/index.ts | Exports new presentation utilities. |
| libs/designer-ui-v2/src/nodes/compactTitle.ts | Bounds measurement caching and handles font loading. |
| libs/designer-ui-v2/src/nodes/cards/TriggerNodeCard.tsx | Supports title-priority rendering. |
| libs/designer-ui-v2/src/nodes/cards/shared.ts | Extends compact-card title options. |
| libs/designer-ui-v2/src/nodes/cards/NodeInfoCard.tsx | Supports fully wrapped hover titles. |
| libs/designer-ui-v2/src/nodes/cards/nodeHoverPlacement.ts | Selects placements that avoid neighboring content. |
| libs/designer-ui-v2/src/nodes/cards/NodeHoverCard.tsx | Integrates measured obstacle-aware placement. |
| libs/designer-ui-v2/src/nodes/cards/LoopNodeCard.tsx | Supports a host-provided monitoring pager row. |
| libs/designer-ui-v2/src/nodes/cards/ActionNodeCard.tsx | Supports title-priority rendering. |
| libs/designer-ui-v2/src/nodes/__test__/useEdgeActiveState.spec.tsx | Updates hover event simulation. |
| libs/designer-ui-v2/src/nodes/__test__/nodeHoverPlacement.spec.ts | Tests obstacle avoidance and placement fallback. |
| libs/designer-ui-v2/src/nodes/__test__/compactTitle.spec.ts | Tests measurement reuse, eviction, and invalidation. |
| libs/designer-ui-v2/src/nodes/__test__/compactCards.spec.tsx | Tests title priority without hiding status or counts. |
| libs/designer-ui-v2/README.md | Documents new components and export counts. |
| libs/designer-ui-v2/.storybook/check-inventory.mjs | Registers new public exports. |
| e2e/designer/sharedNodeUiRedesignMonitoring.spec.ts | Tests monitoring deletion protection. |
| e2e/designer/sharedNodeUiRedesign.spec.ts | Tests focus return, long titles, and hover placement. |
| e2e/designer/sharedNodeUiOverview.spec.ts | Tests overview styling, merge hover, and contrast. |
| e2e/designer/sharedNodeUiConnections.spec.ts | Tests monitoring edit locks while preserving Copy. |
| e2e/designer/sharedNodeUiCommands.spec.ts | Covers Testing shortcuts, insertion, search, and tabs. |
| e2e/designer/sharedNodeUiCanvas.spec.ts | Stabilizes resting-state paint comparisons. |
| e2e/designer/sharedNodeUiBranchCommands.spec.ts | Tests case rename, deletion confirmation, and Default protection. |
| e2e/designer/nodeSearchPanel.spec.ts | Uses scoped search-dialog interactions. |
Review effort: Balanced
Keep invocation status and duration scoped during refreshes and paging. Preserve the compact title line height at overview zoom and restore the forced-colors loop hover cue. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Commit Type
Risk Level
Medium under the repo risk guide: this changes designer-v2 state management (monitoring repetition selection, monitoring edit locking) and node rendering. It does not meet any High criteria:
libs/logic-apps-sharedor any other shared runtime utility; onlylibs/designer-v2,libs/designer-ui-v2, E2E tests, and localization strings change.@microsoft/designer-ui-v2exports are additive, and workflow schema, serialization, and backend contracts are unchanged.The file count comes from tests (34 of 106 files) and the new Shared node presentation. That presentation, its layout sizing, and the Switch controls run only when a host sets
useSharedNodeUi, which is off by default. On the default Legacy path the changes are narrower: paste, delete, undo, and wrap-in-scope are blocked when a host opens monitoring withoutreadOnly(Copy still works), and monitoring reads the selected loop repetition's data. Both paths have flag-on and flag-off unit and E2E coverage.What & Why
Summary
Fixes Standard designer node behavior in authoring and monitoring. Shared cards are easier to read at fit zoom, Switch cases have explicit rename and delete controls, and run status follows the selected repetition. Both renderers now block node edits when a host opens monitoring without setting
readOnly; Copy still works.Design
designer-ui-v2owns the cards, branch controls, join, and hover placement. Standard owns workflow data, graph layout, and commands. Shared presentation changes stay behinduseSharedNodeUi; Legacy authoring keeps its existing controls.Key decisions
Files changed
libs/designer-ui-v2: node presentation, tests, and Storybook contracts.libs/designer-v2andLocalize/lang/strings.json: layout, run-state mapping, node commands, and labels.e2e/designer: fixture-based coverage for both native v2 renderers.Impact of Change
Test Plan
Testing
pnpm --dir libs/designer-ui-v2 run test:lib --maxWorkers=4: 560 passed.pnpm --dir libs/designer-v2 run test:lib --maxWorkers=4: 4,088 passed, 1 skipped.pnpm --dir libs/designer-ui-v2 exec tsc --noEmit,pnpm --dir libs/designer-v2 exec tsc --noEmit, andpnpm --dir libs/designer-ui-v2 run typecheck:storybook: passed.pnpm --dir libs/designer-ui-v2 run test:storybook-inventory: 5 passed.pnpm run extractandpnpm exec biome checkon the 96 changed files: passed.NODE_E2E_PASS=final-default pnpm exec playwright test --config playwright-report-ephemeral/node-e2e/playwright.config.ts --grep-invert @real: 294 passed, 2 skipped, including both keyboard insertion cases. The local config used default routing and explicit flag-on and flag-off cases.Native Azure Portal, live Azure runs, and live Otto consumption were not verified.
Contributors
Screenshots/Videos
Side-by-side comparison
Captured in Standalone. The three-line overview title, forced-colors Foreach hover, and MCP tool repetition pairs are from
378f6835a; the other pairs are from223e73b78. Each composite uses the same fixture, 1600 × 1000 viewport, and zoom in both renderers. Legacy (useSharedNodeUi=false) is on the left; Shared (true) is on the right.Native monitoring fit was 0.360376 Shared / 0.380866 Legacy in both themes. Shared meets the 0.36 gate; the low-zoom pairs use 0.36 on both sides.
Authoring
Compact action cards: Compare card size, operation identity, and the resting insertion control at 100% zoom.
Light
Dark
Long action title: Shared gives the authored title two lines without reducing its text size.
Light
Dark
Three-line title at overview zoom: At 48% zoom, Shared keeps the three-line title within the 68 px card height reserved by layout.
Light
Dark
Open Action details: Selecting Compose opens the same node panel; Shared paints selection outside the card.
Light
Dark
Insertion hover: The same edge exposes its Add tooltip and shows the insertion target.
Light
Dark
Node hover: Shared opens the Compose details card without opening the editing panel.
Light
Dark
Edit test data from hover: An eligible Shared action offers a shortcut to the Testing tab; the fixture supplies a simulated static-result schema.
Light
Dark
Condition lanes: True and False use separate branch headers and distinct connectors.
Light
Dark
Collapsed action counts: Shared labels the count of hidden actions on compact headers.
Light
Dark
Nested Until loops: Do headers, actions, and Until cards keep their order through a nested loop.
Light
Dark
Switch
Switch case controls: Shared puts Rename and More on explicit cases and keeps Default protected.
Light
Dark
Switch lane menu: Shared opens the lane menu from More; Legacy uses the lane context menu.
Light
Dark
Switch join hover: Hovering the Shared join activates only its downstream Add control.
Light
Dark
Monitoring
Low-zoom overview: The same 36% framing shows how Shared keeps icons and titles while hiding secondary text.
Light
Dark
Mixed run: The recorded run includes succeeded, failed, skipped, and inactive actions.
Light
Dark
Succeeded: Parse JSON shows a success indicator and duration inside the Shared card.
Light
Dark
Failed: The failed Delay has a distinct tinted surface and inset perimeter in Shared.
Light
Dark
Failure and selection: Selecting Delay opens run details without replacing the Shared failure perimeter.
Light
Dark
Skipped: Response has a skipped indicator, distinct from nodes with no run data.
Light
Dark
Running: Delay shows an in-progress state while downstream nodes have no run data.
Light
Dark
Foreach repetition: Both pagers show iteration 2 of 4 using the same simulated repetition data.
Light
Dark
Collapsed Foreach: The collapsed loop hides the pager and Shared does not reserve its row.
Light
Dark
Forced colors and selection: A selected failed action keeps its status perimeter distinct from selection with forced colors active.
Light
Dark
Foreach join hover in forced colors: Hovering the outer Foreach header highlights the line connecting it to its body in Shared.
Light
Dark
Agent tools
Expanded Agent and tools: The expanded Agent distinguishes the model and regular, built-in MCP, and managed MCP tools.
Light
Dark
Collapsed Agent: Both renderers hide tool cards and show an Agent summary after collapse.
Light
Dark
Recorded Agent run: The top-level Agent is Running while the recorded repetition details load.
Light
Dark
MCP tool repetition: On simulated iteration 2 of 3, Shared shows the selected invocation as Succeeded (2 s), even though the aggregate status is Failed.
Light
Dark