[Security Solution][Attacks/Alerts] Attacks page tour (#17464)#275055
[Security Solution][Attacks/Alerts] Attacks page tour (#17464)#275055e40pud wants to merge 4 commits into
Conversation
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
There was a problem hiding this comment.
One non-blocking performance note left inline on the always-on MutationObserver in useIsAnchorMounted. Otherwise the change is well-structured: the tour is fully gated behind the attacksPageTourEnabled experimental flag (off by default), state persistence/reconciliation and the anchor safety valve are sound, and the provider/tour/callout each have focused unit coverage. Telemetry, i18n, and the doc link are wired correctly.
Generated by Claude Reviewer for issue #275055 · 235.8 AIC · ⌖ 10.4 AIC · ⊞ 3.9K
…ep illustrations out of the page-load bundle The tour's illustration SVGs are all under webpack's 8KB inline threshold, so they were embedded as base64 into the page-load bundle (the Attacks page is statically imported), pushing the securitySolution plugin over its size limit. Lazy-load the tour view components (`WelcomeTourCallout`, `AttacksTour`) via `React.lazy` + `Suspense` so their inlined SVGs land in async chunks instead of the page-load bundle, matching the onboarding cards pattern. The provider stays eager since it has no images; the step config (which imports the SVGs) now lives only in the lazy `AttacksTour`, and the step count moved to a lightweight `ATTACKS_TOUR_STEP_COUNT` constant so the provider no longer needs to import it. No optimizer limit bump required.
…ur to keep illustrations out of the page-load bundle" This reverts commit e3475dd.
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @e40pud |
Summary
Adds a first-run onboarding experience to the Security Solution Attacks page, gated behind a new experimental feature flag (
attacksPageTourEnabled). It introduces:EuiTourStepthat walks the user through the key parts of the page:data-test-subj).view,view_docs,dismiss, start) and per-step interactions.siem.attacksPagedocumentation link.The whole experience is off by default; flipping
attacksPageTourEnabledenables it.Closes #17464
Changes
attacksPageTourEnabled(defaultfalse) incommon/experimental_features.ts.siem.attacksPagein@kbn/doc-links(types.ts,get_doc_links.ts).ATTACKS_PAGE/ATTACKS_PAGE_CALLOUTtour storage keys incommon/constants.ts.TourCalloutAction/TourStepActionevents and schemas.public/detections/components/attacks/tour/):attacks_tour_provider.tsx– context provider, state persistence, reconciliation, anchor safety valve.attacks_tour.tsx– renders the currentEuiTourSteponly when its anchor is mounted.welcome_tour_callout.tsx– the welcome callout.tour_steps_config.tsx,translations.ts,constants.ts,use_is_anchor_mounted.ts,index.ts.images/– callout and per-step illustrations.content.tsxmounts the provider, callout, and tour behind the flag;table/table_section.tsxsurfaces filter-aware attack presence (onAttackIdsChange) used to drive the optional flyout step.How to verify
config/kibana.dev.yml(orkibana.yml):hideAnnouncementsis off.view_docstelemetry.Resetting a finished/dismissed tour
The tour and callout persist their state in the browser's local storage, so once completed or dismissed they won't reappear. To re-test from a clean slate, clear the relevant keys from the browser console (DevTools → Console) and reload:
Then reload the Attacks page — the welcome callout reappears and the tour can be started again. (You can inspect the same keys under DevTools → Application → Local Storage to see the persisted state.)
Screenshots
Screen.Recording.2026-06-25.at.14.55.44.mov
PR developed with Cursor + Claude Opus 4.8