feat(apollo-react): add task breakpoints to case-management StageNode [MST-12196]#917
feat(apollo-react): add task breakpoints to case-management StageNode [MST-12196]#917alfredo-mruiz wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Adds task-level breakpoint visualization and interaction to the case-management StageNode in apollo-react, enabling consumers to show/toggle per-task breakpoints (click + optional right-click menu wiring) across sequential, ad hoc, and event-driven tasks.
Changes:
- Introduces
TaskBreakpointDot(ghost/set/paused-pulse states) and wires it into all StageNode task renderers. - Adds additive API surface:
StageTaskExecution.breakpoint?: boolean,StageNodeBaseProps.onToggleTaskBreakpoint?, andStageNodeBaseProps.canBreakpoint?, plusresolveTaskBreakpointTogglehelper. - Adds unit/component tests and Storybook stories covering breakpoint rendering and interaction.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/components/StageNode/TaskBreakpointDot.tsx | New breakpoint marker component (display-only + interactive modes) with hover/focus ghost, active dot, and paused pulse. |
| packages/apollo-react/src/canvas/components/StageNode/TaskBreakpointDot.test.tsx | Unit tests for marker rendering, labeling, click toggling, blur behavior, and pulse gating. |
| packages/apollo-react/src/canvas/components/StageNode/StageNodeTaskUtilities.ts | Adds resolveTaskBreakpointToggle helper to centralize per-task eligibility logic (handler present, not placeholder, passes predicate). |
| packages/apollo-react/src/canvas/components/StageNode/StageNodeSequentialTaskGroups.tsx | Passes resolved breakpoint toggle handler into sequential task rendering. |
| packages/apollo-react/src/canvas/components/StageNode/StageNodeEventDrivenTaskGroups.tsx | Passes resolved breakpoint toggle handler into event-driven task rendering. |
| packages/apollo-react/src/canvas/components/StageNode/StageNodeAdhocTaskGroups.tsx | Passes resolved breakpoint toggle handler into ad hoc task rendering. |
| packages/apollo-react/src/canvas/components/StageNode/StageNode.utils.test.ts | Adds unit coverage for resolveTaskBreakpointToggle. |
| packages/apollo-react/src/canvas/components/StageNode/StageNode.types.ts | Extends public types with breakpoint execution flag and optional breakpoint toggle/predicate props. |
| packages/apollo-react/src/canvas/components/StageNode/StageNode.test.tsx | Component tests ensuring breakpoint marker presence for ad hoc + event-driven tasks when armed, and absence when unarmed. |
| packages/apollo-react/src/canvas/components/StageNode/StageNode.stories.tsx | Adds interactive breakpoint stories/playground demonstrating lifecycle and task-type coverage. |
| packages/apollo-react/src/canvas/components/StageNode/EventDrivenTask.tsx | Renders TaskBreakpointDot within event-driven task cards and adds group class for hover/focus styling. |
| packages/apollo-react/src/canvas/components/StageNode/DraggableTask.types.ts | Adds onToggleBreakpoint prop to support interactive breakpoint toggling in draggable tasks. |
| packages/apollo-react/src/canvas/components/StageNode/DraggableTask.tsx | Renders TaskBreakpointDot within draggable task cards and adds group class for hover/focus styling. |
| packages/apollo-react/src/canvas/components/StageNode/AdhocTask.tsx | Renders TaskBreakpointDot within ad hoc task cards and adds group class for hover/focus styling. |
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
27f37b5 to
6acba70
Compare
📦 Dev Packages
|
6acba70 to
9e9dfad
Compare
9e9dfad to
ee68e9d
Compare
ee68e9d to
1a67038
Compare
1a67038 to
089145d
Compare
089145d to
e16fd3d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
packages/apollo-react/src/canvas/components/StageNode/TaskBreakpointDot.tsx:19
- The PR description states that the breakpoint dot is interactive (ghost on hover/focus, click-to-toggle, pulsing when paused) and mentions new StageNode APIs (
onToggleTaskBreakpoint,canBreakpoint,resolveTaskBreakpointToggle). In the current implementation, the dot is explicitly display-only (pointer-events-none), renders only whenactiveis true, and has no paused/ghost/toggle behavior (and there are no references to those new APIs in the StageNode directory). Please either update the PR description to match the shipped behavior, or implement the described interactive/pulsing behavior and APIs before merging so consumers aren’t misled about the contract.
* animation. Like Flow, the marker does not change when the run is paused on the
* task. The paused state is conveyed separately by the card's amber border and
* the pause status icon, both driven by the task's execution status.
*
* Display only. Breakpoints are added and removed through the task's right-click
Description
Adds a task-level breakpoint marker to the case-management
StageNode(MST-12196).Each task (sequential, ad hoc, event-driven) can show a breakpoint: a solid red dot at the top-left corner of the task card, matching the Flow/BPMN canvas breakpoint (
DebugBreakpoint) — 14px, canvas error color, no border or animation. The marker is display-only: it renders only when the task has a breakpoint set and never intercepts pointer events (pointer-events-none).Following Flow's interaction design, breakpoints are added/removed exclusively through the task's right-click / task menu (no hover affordance, no click-on-dot), so task and stage hover states stay uncluttered.
Pause is independent of the marker: when the run is paused on a task, the card shows its amber
Pausedborder and pause status icon (driven by the task's execution status); the breakpoint dot itself does not change.Public API (additive): the only shipped contract is
StageTaskExecution.breakpoint?: boolean, which drives the marker. Add/remove is wired by the consumer through the existing task context-menu callback (getTaskContextMenuItems). No newStageNodeprops are introduced.When the marker shows
flowchart LR MENU["right-click / task menu<br/>Add or Remove breakpoint"] --> APP["consumer updates<br/>execution.taskStatus[id].breakpoint"] APP --> BP["execution.taskStatus[id].breakpoint === true"] BP --> DOT["solid red dot<br/>(sequential / ad hoc / event-driven)"]Demo
apollo-ui-cm-breakpoint.mov
Storybook: Components/Nodes/StageNode → three breakpoint stories:
Risks of rolling out
StageTaskExecution.breakpointadded).pointer-events-none, so it cannot block clicks/drags on the task card.Feature flag
No new feature flag introduced.
Tests
Details:
TaskBreakpointDot.test.tsx— renders only when a breakpoint is set, ispointer-events-none, and is static (no animation).StageNode.test.tsxcovers the ad hoc and event-driven paths;DraggableTask.test.tsxcovers the sequential path.