Skip to content

fix(apollo-react): hand the mocked-output adornment to consumers [MST-13618] - #1069

Open
BenGSchulz wants to merge 1 commit into
mainfrom
fix/MST-13618-mock-output-adornment
Open

fix(apollo-react): hand the mocked-output adornment to consumers [MST-13618]#1069
BenGSchulz wants to merge 1 commit into
mainfrom
fix/MST-13618-mock-output-adornment

Conversation

@BenGSchulz

@BenGSchulz BenGSchulz commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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 isOutputPinned off the execution-status API; consumers supply adornments.bottomRight through BaseNodeOverrideConfig, so they can use the same icon as their output config and distinguish static from generated mocks. The Adornments story demos both: file-braces-corner icon for static mock data and a new file-sparkles-corner icon for generated simulation output.

Screenshot 2026-08-21 at 3 09 44 PM

Changes

  • adornment-resolver.tsx: remove SquareDashedIndicator and the isOutputPinned read. bottomRight now always resolves to undefined, leaving the slot to the override config.
  • execution.ts: mark isOutputPinned @deprecated and inert rather than deleting it. Removing the field is a compile break for consumers that annotate NodeExecutionStateWithDebug (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: export CanvasTooltip from 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 through BaseNodeOverrideConfigProvider via a story-local node wrapper (per-node config, so one provider around the canvas would not do). Replaces a stale custom row whose key matched no execution state and rendered nothing.
  • adornment-resolver.test.tsx: drop the isOutputPinned bottom-right assertion.
  • Adds new FileSparklesCornerIcon and exposes via Icon Registry so consumers can use it as 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]
Loading

Migration

Consumers that set isOutputPinned lose the badge silently, since nothing reads it any more. Replacement:

<BaseNodeOverrideConfigProvider
  value={{ adornments: { bottomRight: <MockOutputIcon /> } }}
>
  <BaseNode {...props} />
</BaseNodeOverrideConfigProvider>

Testing

  • pnpm lint passes (JS + CSS)
  • pnpm lint:deps / pnpm check:dependencies pass
  • pnpm typecheck passes
  • pnpm test passes (156 files, 2487 tests)
  • pnpm audit --prod + npm audit signatures clean
  • Storybook Adornments story checked, both mock rows render their icons
  • Type-safe (no as any or type suppressions added)

Copilot AI lite review requested due to automatic review settings August 20, 2026 22:19
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Apollo Coded App preview deployments are ready.

Project Status Preview Updated (PT)
apollo-design Ready Preview · Logs Aug 21, 2026, 03:19:40 PM
apollo-docs Ready Preview · Logs Aug 21, 2026, 03:19:40 PM
apollo-landing Ready Preview · Logs Aug 21, 2026, 03:19:40 PM
apollo-vertex Ready Preview · Logs Aug 21, 2026, 03:19:40 PM

@github-actions github-actions Bot added the size:L 100-499 changed lines. label Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency License Review

  • 1948 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 2 package(s) excluded (see details below)
License distribution
License Packages
MIT 1719
ISC 88
Apache-2.0 55
BSD-3-Clause 27
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 4
MIT-0 3
CC0-1.0 3
MIT OR Apache-2.0 2
(MIT OR Apache-2.0) 2
Unlicense 2
LGPL-3.0-or-later 1
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Unknown 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.3.2 LGPL-3.0-or-later LGPL pre-built binary, not linked
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.isOutputPinned instead of removing it to avoid a compile-time breaking change.
  • Export CanvasTooltip from 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.

Comment thread packages/apollo-react/src/canvas/utils/adornment-resolver.test.tsx
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage + size by package

Per-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.

Package Coverage New-line coverage Packed (gzip) Unpacked vs main
@uipath/apollo-core 41.59 MB 49.70 MB ±0
@uipath/apollo-react 41.0% 21.4% (3/14) 7.55 MB 29.09 MB +1.6 KB
@uipath/apollo-ui-icons 2.85 MB 6.91 MB ±0
@uipath/apollo-wind 416.0 KB 2.66 MB +12 B
@uipath/ap-chat 85.8% 43.46 MB 56.09 MB ±0

"Coverage" is each package's own coverage.include scope (e.g. apollo-core instruments only scripts/). "Packed"/"Unpacked" come from npm pack --dry-run and only cover built packages — "—" means not measured this run (package not affected / not built). "vs main" is the packed (gzipped) delta against the last successful main build (the package-sizes artifact from the Release workflow); "—" there means no main baseline was available this run. The baseline is main's latest build, not this PR's exact merge-base, so it includes any drift since the branch diverged. Packages with no vitest config are omitted.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Storybook visual diff

⚠️ Visual changes detected: 18 changed (of 354 compared, 336 unchanged). View report

Baseline 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).
Copilot AI review requested due to automatic review settings August 21, 2026 22:11
@BenGSchulz
BenGSchulz force-pushed the fix/MST-13618-mock-output-adornment branch from 8562354 to ca1252f Compare August 21, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@BenGSchulz
BenGSchulz requested a review from snuziale August 21, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:L 100-499 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants