Skip to content

[AiButton/Security] Migrate ai-related buttons to use custom styles#259847

Merged
paulinashakirova merged 7 commits intoelastic:mainfrom
paulinashakirova:ai-button-by-owner
Apr 2, 2026
Merged

[AiButton/Security] Migrate ai-related buttons to use custom styles#259847
paulinashakirova merged 7 commits intoelastic:mainfrom
paulinashakirova:ai-button-by-owner

Conversation

@paulinashakirova
Copy link
Copy Markdown
Contributor

@paulinashakirova paulinashakirova commented Mar 26, 2026

Summary

This PR is a part of initiative to migrate our Ai related buttons to use our new AiButton custom component.
Here is a Storybook to see how they look.

Please, let me know if there are more buttons that can benefit from this migration, so we can add them here, or you could push the additional instances.

@paulinashakirova paulinashakirova self-assigned this Mar 26, 2026
@paulinashakirova paulinashakirova added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Mar 26, 2026
<AiButton
aria-label={i18n.ADD_TO_CHAT}
color={color}
variant="empty"
Copy link
Copy Markdown
Contributor Author

@paulinashakirova paulinashakirova Mar 26, 2026

Choose a reason for hiding this comment

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

Image

Also we changed the colour logic.

We now have a few options you can pick from based on intent.
Could you confirm which one you would prefer in this case.

@paulinashakirova paulinashakirova marked this pull request as ready for review March 26, 2026 18:23
@paulinashakirova paulinashakirova requested review from a team as code owners March 26, 2026 18:23
@paulinashakirova paulinashakirova marked this pull request as draft March 30, 2026 09:32
onClick={onShowOverlay}
>
{i18n.ASK_ASSISTANT_ERROR_BUTTON}
</AiButton>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Image

>
{i18n.translate('xpack.elasticAssistantPlugin.aiAssistant.regenerateResponseButtonLabel', {
defaultMessage: 'Regenerate',
})}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Image


return (
<EuiButtonEmpty
<AiButton
Copy link
Copy Markdown
Contributor Author

@paulinashakirova paulinashakirova Mar 31, 2026

Choose a reason for hiding this comment

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

I couldn't reproduce it in UI, so please check it locally and share the screenshot here. Thank you

>
{i18n.TRY_AI_AGENT}
</EuiButton>
</AiButton>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Image

@paulinashakirova paulinashakirova marked this pull request as ready for review March 31, 2026 09:45
@paulinashakirova
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #182 / Detections Response - Detection rule type telemetry @ess @serverless Detection rule status telemetry "indicator_match/threat_match" rule type should have non zero values for "index_duration"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 9300 9311 +11

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.6MB 11.6MB +6.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
elasticAssistant 272.6KB 272.5KB -13.0B

History

cc @paulinashakirova

Copy link
Copy Markdown
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

LGTM for the @elastic/security-threat-hunting-investigations team

@paulinashakirova paulinashakirova merged commit d8e3f68 into elastic:main Apr 2, 2026
18 checks passed
@paulinashakirova paulinashakirova deleted the ai-button-by-owner branch April 2, 2026 09:01
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 added a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
…lastic#259847)

## Summary
Migrate AI related buttons to use
Kibana's custom component.
Storybook in the description.
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 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants