fix(apollo-react): hand the mocked-output adornment to consumers [MST-13618] - #1069
fix(apollo-react): hand the mocked-output adornment to consumers [MST-13618]#1069BenGSchulz wants to merge 1 commit into
Conversation
|
Apollo Coded App preview deployments are ready.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
This PR updates the apollo-react canvas node adornment model so the bottom-right “mocked output” badge is no longer rendered by the library. Instead, the bottom-right slot is left for consumers to populate via BaseNodeOverrideConfig (enabling consumer-specific icons and semantics), while keeping isOutputPinned in the execution-state type as deprecated for compatibility.
Changes:
- Remove the library-owned mocked-output bottom-right adornment (and stop reading
isOutputPinned) from the adornment resolver. - Deprecate
NodeExecutionStateWithDebug.isOutputPinnedinstead of removing it to avoid a compile-time breaking change. - Export
CanvasTooltipfrom the canvas barrel and update the BaseNode Adornments story + tests accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/utils/adornment-resolver.tsx | Removes SquareDashedIndicator and forces bottomRight to resolve to undefined so consumers own the slot. |
| packages/apollo-react/src/canvas/utils/adornment-resolver.test.tsx | Removes the legacy isOutputPinned assertion; should add a regression test asserting isOutputPinned is ignored. |
| packages/apollo-react/src/canvas/types/execution.ts | Marks isOutputPinned as @deprecated and documents the replacement approach. |
| packages/apollo-react/src/canvas/components/index.ts | Re-exports CanvasTooltip so consumers can build custom adornments with the same tooltip. |
| packages/apollo-react/src/canvas/components/BaseNode/BaseNode.stories.tsx | Updates the Adornments story to demonstrate consumer-supplied bottom-right mocked-output icons via override config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
📊 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 |
Storybook visual diffBaseline is the deployed main Storybook, so changes merged to main after this branch was last updated can also appear here. Logs Updated (PT): Aug 21, 2026, 03:38:56 PM |
…-13618] The bottom-right badge rendered an empty dashed square for mocked output, which read as a missing icon rather than a state. Drop the library-side indicator and the `isOutputPinned` read so the slot is owned by consumers, who supply `adornments.bottomRight` through `BaseNodeOverrideConfig` and can match the icon already used in the output config. `isOutputPinned` stays on `NodeExecutionStateWithDebug` as deprecated and inert: removing it breaks consumers that annotate the type or read the field, so it goes in the next major. Also export `CanvasTooltip` from the canvas barrel, which consumers need to build their own adornments, and demo both variants in the Adornments story (`file-braces-corner` for static, `file-sparkles-corner` for generated).
8562354 to
ca1252f
Compare
Summary
The bottom-right node badge for mocked output rendered an empty dashed square (
square-dashed), which testers read as a missing icon rather than a state (MST-13618, reported independently on Slack connector and HTTP Webhook nodes in the Aug 13 Flow bug bash).Rather than swap one hardcoded icon for another, this hands the slot to consumers. The library stops rendering a mocked-output indicator and stops reading
isOutputPinnedoff the execution-status API; consumers supplyadornments.bottomRightthroughBaseNodeOverrideConfig, so they can use the same icon as their output config and distinguish static from generated mocks. The Adornments story demos both:file-braces-cornericon for static mock data and a newfile-sparkles-cornericon for generated simulation output.Changes
adornment-resolver.tsx: removeSquareDashedIndicatorand theisOutputPinnedread.bottomRightnow always resolves toundefined, leaving the slot to the override config.execution.ts: markisOutputPinned@deprecatedand inert rather than deleting it. Removing the field is a compile break for consumers that annotateNodeExecutionStateWithDebug(TS2353 on object literals) or read the field (TS2339), so it goes in the next major. Verified both cases against tsc 5.9.3.components/index.ts: exportCanvasTooltipfrom the canvas barrel. It was never reachable by consumers, who need it to build their own adornments.BaseNode.stories.tsx: Adornments story gains a static and a generated mock row, wired throughBaseNodeOverrideConfigProvidervia a story-local node wrapper (per-node config, so one provider around the canvas would not do). Replaces a stalecustomrow whose key matched no execution state and rendered nothing.adornment-resolver.test.tsx: drop theisOutputPinnedbottom-right assertion.CanvasIcon name="file-sparkles-corner" />Flow
flowchart TD A[Execution status API] -->|status, debug, isExecutionStartPoint| B[resolveAdornments] A -.->|isOutputPinned: deprecated, no longer read| B B --> C["topLeft / topRight / bottomLeft"] B --> D["bottomRight: undefined"] E[Consumer] -->|"adornments.bottomRight"| F[BaseNodeOverrideConfigProvider] C --> G[BaseNode adornment merge] D --> G F --> G G --> H[BaseBadgeSlot renders 4 slots]Migration
Consumers that set
isOutputPinnedlose the badge silently, since nothing reads it any more. Replacement:Testing
pnpm lintpasses (JS + CSS)pnpm lint:deps/pnpm check:dependenciespasspnpm typecheckpassespnpm testpasses (156 files, 2487 tests)pnpm audit --prod+npm audit signaturescleanas anyor type suppressions added)