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
| /** | ||
| * When `true`, the task shows a breakpoint marker (a red gutter dot) indicating the | ||
| * debugger will pause on this task. Breakpoints attach to individual tasks, not to the | ||
| * stage container. | ||
| */ | ||
| breakpoint?: boolean; |
Description
Enables task-level breakpoints on the case-management
StageNode(ticket MST-12196).Each task in a stage (sequential, ad hoc, and event-driven) gains a breakpoint marker: a red dot at the top-left corner of the task card. It is solid when a breakpoint is set, pulses when the debug run is paused on that task, and appears as a translucent ghost on hover/focus to add one. Breakpoints are toggled by clicking the corner dot or via a right-click Add / Remove breakpoint menu (parity with the BPMN canvas). An optional
canBreakpointpredicate lets consumers restrict which tasks can host a breakpoint.The dot is driven entirely by execution state, so no new "armed" concept and no "debug" canvas mode are introduced (this matches how the BPMN implementation in
PO.frontend-casemodels breakpoints):active(solid dot) comes fromtaskStatus[id].breakpointpaused(pulse) comes fromtaskStatus[id].status === 'Paused'API (all additive / optional, so existing
StageNodeconsumers are unchanged):StageTaskExecution.breakpoint?: booleanStageNodeBaseProps.onToggleTaskBreakpoint?(taskId)— enables the click affordanceStageNodeBaseProps.canBreakpoint?(task)— gates which tasks can host a breakpointTaskBreakpointDot; new utilresolveTaskBreakpointToggleBreakpoint dot lifecycle
stateDiagram-v2 [*] --> Idle Idle --> Ghost: hover or focus Ghost --> Idle: unhover or blur Idle --> Set: right-click Add Ghost --> Set: click Add Set --> Paused: run pauses here Paused --> Set: run continues Set --> Idle: click or menu Remove Paused --> Idle: click or menu RemoveVisuals: Idle = nothing · Ghost = translucent dot + "Add breakpoint" tooltip · Set = solid red dot · Paused = solid red dot + pulsing halo, plus the card's amber Paused border and pause icon.
How it is wired
flowchart TD S["execution.taskStatus[id]<br/>breakpoint, status"] --> G["StageNode task groups<br/>sequential / ad hoc / event-driven"] OT["onToggleTaskBreakpoint"] --> R{"resolveTaskBreakpointToggle"} CB["canBreakpoint(task)"] --> R G --> R R -->|allowed| D["TaskBreakpointDot<br/>active = breakpoint<br/>paused = status is Paused"] R -->|placeholder or rejected| N["display-only / hidden<br/>no toggle affordance"] G --> M["right-click menu<br/>Add / Remove breakpoint"]Demo
apollo-ui-cm-breakpoint.mov
Storybook: Components/Nodes/StageNode → three breakpoint stories:
Risks of rolling out
StageTasknow carries a Tailwindgroupmarker class (no descendant utilities rely on it) and aTaskBreakpointDotthat returnsnullwhen no breakpoint is set and no toggle handler is provided.Feature flag
N/A
Tests
Details:
TaskBreakpointDot.test.tsx(idle/set/paused rendering, pulse gated onactive && paused, click toggles, mouse-click blurs so the focus-revealed ghost doesn't linger) andresolveTaskBreakpointToggle(no handler, allowed, placeholder,canBreakpointaccept/reject).StageNode.test.tsxrenders the breakpoint marker on armed ad hoc and event-driven tasks (and its absence when unarmed).