Skip to content

[One Workflow] Fix connector step icons falling back to generic plugs in YAML editor#260785

Merged
Kiryous merged 2 commits intoelastic:mainfrom
Kiryous:fix/workflow-connector-step-icons
Apr 2, 2026
Merged

[One Workflow] Fix connector step icons falling back to generic plugs in YAML editor#260785
Kiryous merged 2 commits intoelastic:mainfrom
Kiryous:fix/workflow-connector-step-icons

Conversation

@Kiryous
Copy link
Copy Markdown
Contributor

@Kiryous Kiryous commented Apr 1, 2026

Closes https://github.com/elastic/security-team/issues/16358

Summary

getIconBase64 was checking resolveIconToDataUrl(icon) before looking up HardcodedIcons[actionTypeId]. Connector icons like Slack, Email, and Inference pass an EUI icon name string (e.g. 'logoSlack') as icon, which resolveIconToDataUrl can't resolve to a data URL — so it fell back to the generic plugs icon for all of them.

Fix: check HardcodedIcons[actionTypeId] first. If a hardcoded SVG exists for the connector, return it immediately without trying to resolve the runtime icon. Also changed the default fallback from a generic circle SVG to the plugs icon (consistent with StepIcon component behavior).

The regression was introduced on main during the refactor that extracted resolveIconToDataUrl — on 9.3, the old code gracefully fell through EUI name strings and reached the hardcoded lookup. No backport needed.

Before / After (Storybook Use Dynamic Type Icons)

Before After
dynamic_icons_before_full dynamic_icons_after_full
Notice how slack, email, inference, slack_api, and all built-in step types now show their correct branded icons instead of the generic plugs fallback.

Testing

  • Added tests covering all HardcodedIcons entries, priority over EUI name strings, error handling paths, and getStepIconType/getIconBase64 consistency
  • Fixed Storybook stories for StepIcon, Use Dynamic Type Icons, and ActionsMenu (were missing Kibana context)

… in YAML editor

Check HardcodedIcons before resolveIconToDataUrl so connector types
like Slack, Email, and Inference show their branded icons in Monaco
instead of the generic plugs fallback. Update default fallback from
circle SVG to the plugs icon. Add coverage for all hardcoded entries,
priority over EUI name strings, error paths, and cross-path consistency.
Fix Storybook stories (StepIcon, UseDynamicTypeIcons, ActionsMenu).

Made-with: Cursor
@Kiryous Kiryous added Team:One Workflow Team label for One Workflow (Workflow automation) release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 1, 2026
@Kiryous Kiryous self-assigned this Apr 1, 2026
@Kiryous Kiryous marked this pull request as ready for review April 1, 2026 17:30
@Kiryous Kiryous requested a review from a team as a code owner April 1, 2026 17:30
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @Kiryous

Copy link
Copy Markdown
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!!!

];

export const Default = () => {
const hasHardcodedIcon = (actionTypeId: string): boolean =>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] this could be extracted to a util an reuse the same one here and in step_icon.stories.tsx

@Kiryous Kiryous merged commit 7eef799 into elastic:main Apr 2, 2026
20 checks passed
mbondyra added a commit to mbondyra/kibana that referenced this pull request Apr 2, 2026
…heck

* commit 'af66aadafa7470ca8ba3e3edd3793bde81fa4596': (31 commits)
  [Scout] Update test config manifests (elastic#260850)
  [SLO]: register alerts schema embeddable (elastic#256570)
  [Discover][Flyout] Update overview fields table with new prop headerVisibility set to false (elastic#260692)
  [AiButton/Security] Migrate ai-related buttons to use custom styles (elastic#259847)
  [One Workflow] Fix connector step icons falling back to generic plugs in YAML editor (elastic#260785)
  [Agent Builder] Dashboard skill: Guard against editing non-ESQL based panels (elastic#260714)
  Security quality gate Cypress cleanup - Periodic Pipeline (elastic#260820)
  [Search] Deprecate search indices in favour of index management (elastic#260210)
  Upgrade dependency @elastic/charts to v71.4.0 (elastic#260593)
  [Security Solution] [HDQ]: integration-based targeting and descriptor versioning (elastic#258418)
  docs(saved-objects): consolidate docs and document scoped vs system client (elastic#260743)
  Fix observability UIAM config and add CPS observability variant (elastic#260485)
  [Security Solution] Add "matched_indices_count" rule execution metric (elastic#259938)
  [SigEvents] Add callout with working promote action. (elastic#260433)
  [Alerting V2] Episode table actions (elastic#260195)
  [Automatic Migration] Add ability to skip Reference Set step in QRadar upload workflow (elastic#259959)
  [Rules] KQL-to-DSL conversion without data view produces incorrect queries for keyword fields for Metric threshold rule (elastic#260046)
  Update dependency lightningcss to v1.32.0 (main) (elastic#259017)
  Update postcss (main) (elastic#255420)
  Migrate server-side apm.addLabels to OTel dual-write helpers (elastic#259619)
  ...
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
@Kiryous Kiryous deleted the fix/workflow-connector-step-icons branch April 3, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants