feat(apollo-react): expose caseFlowManifest + handle hover handlers#756
Merged
Conversation
3e3a600 to
9199366
Compare
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Dependency License Review
License distribution
Excluded packages
|
9199366 to
8012fb1
Compare
ayushya
reviewed
May 29, 2026
ayushya
reviewed
May 29, 2026
ayushya
reviewed
May 29, 2026
ayushya
approved these changes
May 29, 2026
8012fb1 to
36bee11
Compare
Surface manifest pieces needed by PO.Frontend's case-management canvas to register `caseFlowManifest` (PR #720), wrap apollo's `BaseNode` in a thin host-side `CaseBaseNode` renderer, provide the canvas mode that `BaseNode` reads via `useBaseCanvasMode()`, and expose hover events on the source-handle `+` add-button so hosts can mount a hover-preview affordance. - Add `CaseFlow/index.ts` re-exporting the manifest pieces, and surface it via `components/index.ts`. - Add `toolbarExtensions.design` (change-trigger-type) to the trigger manifest, mirroring flow-workbench's `triggerToolbarExtensions`. - Mark the trigger's source handle as `showButton: true` so `BaseNode` draws the inline add-next-stage `+` button (host wires the click via `onHandleAction`). - Re-export `BaseCanvasModeProvider` from the BaseCanvas barrel so hosts that don't use apollo's `BaseCanvas` (PO.Frontend has its own) can still satisfy `BaseNode`'s mode dependency. - Plumb optional `onMouseEnter` / `onMouseLeave` callbacks through `HandleButton` → `ButtonHandle` → `ButtonHandlesBase` → `useButtonHandles` → `BaseNodeOverrideConfig.onHandleMouseEnter` / `onHandleMouseLeave`, with parallel `handle:mouseenter` / `handle:mouseleave` events on `canvasEventBus`. Hosts (e.g. PO.Frontend) use these to preview the to-be-created node when the cursor enters the `+`, then commit on `onHandleAction`.
36bee11 to
8a725aa
Compare
CalinaCristian
approved these changes
May 29, 2026
Miyuki-L
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
caseFlowManifest/caseManagementTriggerManifest(withdisplay.shape: 'circle', source-handleshowButton: true, and achange-trigger-typedesign-mode toolbar action) fromapollo-reactso PO.Frontend can register its case-management canvas against apollo's manifest pipeline.BaseCanvasModeProviderfrom theBaseCanvasbarrel so hosts that don't mountBaseCanvascan still satisfyBaseNode'suseBaseCanvasMode()dependency.onMouseEnter/onMouseLeavehooks to apollo'sBaseNodeadd-button, threaded throughHandleButton→ButtonHandle→useButtonHandles→BaseNodeOverrideConfig.onHandleMouseEnter/onHandleMouseLeave, plus parallelcanvasEventBusevents.Motivation
PO.Frontend's case-management canvas is moving its trigger node onto apollo's manifest-driven
BaseNode(mirroring flow-workbench'sFlowBaseNodepattern). These are the apollo-side changes required to make that consumption possible. The hover handlers in particular let PO.Frontend preserve its existing preview-on-hover UX (translucent ghost node next to the+until the user clicks) without forcing flow-workbench to adopt the pattern — every new callback is optional and defaults to a no-op.What's new
canvas/components/CaseFlow/—case-flow.manifest.ts(exportscaseFlowCategories,caseManagementTriggerManifest,caseFlowManifest),index.tsbarrel, surfaced viacanvas/components/index.ts.caseManagementTriggerManifest.toolbarExtensions.design— adds thechange-trigger-typeaction so the apollo toolbar renders it when the trigger is selected.showButton: trueon the trigger soBaseNodedraws the inline add-next-stage+.BaseCanvasModeProviderre-export fromcanvas/components/BaseCanvas/index.ts.HandleMouseEvent(inButtonHandle.tsx) andCanvasHandleMouseEvent(inCanvasEventBus.ts) — new exported payload types.onMouseEnter/onMouseLeaveonHandleButton,ButtonHandle,ButtonHandleConfig, anduseButtonHandles(per-handle override beats global, same precedence asonAction).BaseNodeOverrideConfig.onHandleMouseEnter/onHandleMouseLeave— consumer-facing callbacks for hosts.canvasEventBus— new'handle:mouseenter'/'handle:mouseleave'event types withCanvasHandleMouseEventpayloads.Backwards compatibility
All new callbacks are optional and have no default behavior —
HandleButtononly wires the inneronMouseEnter/onMouseLeaveprops when a host actually supplies them, andcanvasEventBus.emit('handle:mouseenter', ...)is a no-op for any consumer that doesn't subscribe. Existing consumers (flow-workbench, agent canvas, coded-agent flow, etc.) are unaffected because no defaults change. Confirmed by running the fullvitestsuite (1590 tests, all passing).Test plan
tsc --noEmitclean (excluding pre-existinglocale-registry/material/components/ap-tool-callerrors)vitestpasses, including the new tests forHandleButton,ButtonHandle,useButtonHandles, andBaseNodeWithHoverPreviewandWithToolbarActionstories render underComponents/CaseFlow/Trigger+(new), and theWithHoverPreviewstory locks the preview affordance. Visual baselines need refresh — please runnpm run test:visual -- --update-snapshots.Demo
Screen.Recording.2026-05-27.at.9.47.02.PM.mov
Generated by Claude Code