Repository navigation
[SigEvents] Redesign the Nightshift significant event flyout - #299456
achyutjhunjhunwala merged 4 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2bc31a3 to
a6fb62f
Compare
| const cutoff = Date.now() - 65 * 60 * 1000; | ||
| return events.some(({ investigations }) => | ||
| investigations?.some( | ||
| ({ completed_at: completedAt, started_at: startedAt }) => | ||
| completedAt == null && Date.parse(startedAt) > cutoff |
There was a problem hiding this comment.
Severity: P3 (Low)
Reconcile timed-out investigations before permanently stopping their polling. The managed investigation workflow has a 60-minute timeout and explicitly does not execute its failure fallback on timeout or cancellation, so those runs emit neither terminal attachment. With the new persisted running entry, this cutoff leaves them permanently “In progress,” including after reload, rather than recording a terminal state.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Thanks, this is the existing workflow timeout/cancellation lifecycle gap. As the managed workflow documents, those terminal paths do not run its failure fallback.
We documented the Significant Events impact, source links, terminal-handling requirements, and suggested regression coverage here:
https://github.com/elastic/nightshift-program/issues/1820#issuecomment-6319878416
This requires engine-backed terminal reconciliation, coordinated with retry/recovery, and is being tracked as separate lifecycle work. The related event-reader work is linked here:
https://github.com/elastic/nightshift-program/issues/1838#issuecomment-6319878431
The 65-minute cutoff only bounds polling; it does not record a terminal outcome.
| eventSearchClient: eventClient, | ||
| eventId: params.path.id, | ||
| investigation: { | ||
| workflow_execution_id: executionId, | ||
| started_at: new Date().toISOString(), | ||
| }, |
There was a problem hiding this comment.
Severity: P2 (Medium)
Keep queued follow-ups distinguishable from the run already executing. start() returns the same conversation ID for a follow-up, and the investigation workflow queues runs on that ID. If a user queues a follow-up while the first run is active, the first run's completion replaces this newly written running entry because attachInvestigationToEvent matches only workflow_execution_id. The event then appears completed and stops polling throughout the queued follow-up, since its later started event is not attached. Track the run/generation or otherwise preserve pending rounds when processing terminal callbacks.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
Thanks, this identifies the existing conversation/run identity gap in the shared investigation lifecycle. Follow-ups share a conversation ID, while terminal callbacks do not distinguish individual runs.
We reproduced the attachment-ordering cases and documented the findings, source links, proposed fix direction, and regression coverage here:
https://github.com/elastic/nightshift-program/issues/1838#issuecomment-6319878431
We are tracking run-aware queued-follow-up handling as separate lifecycle work under that issue, coordinated with terminal reconciliation in:
https://github.com/elastic/nightshift-program/issues/1820#issuecomment-6319878416
💛 Build succeeded, but was flaky
Failed CI Steps
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsshared chunks total size
total optimizer output size
warm start memory
workflow yaml validation
Test Failures
History
|
| const latestInvestigationInProgress = | ||
| availableInvestigation != null && | ||
| availableInvestigation.completed_at == null && | ||
| investigationStatus !== 'complete'; | ||
| availableInvestigation != null && availableInvestigation.completed_at == null; |
There was a problem hiding this comment.
What happens if an investigation goes stale? Checking the hasInvestigationsToPoll function. Will latestInvestigationInProgress be in progress forever?
There was a problem hiding this comment.
Yes, without a terminal attachment it remains in progress; the 65-minute cutoff only stops polling. This is the existing timeout/cancellation reconciliation gap, documented here and being tackled as separate lifecycle work: https://github.com/elastic/nightshift-program/issues/1820#issuecomment-6319878416
| <FlyoutTemplate.Footer> | ||
| <FlyoutTemplate.Footer.PrimaryActionMenu | ||
| label={ACTIONS_LABEL} | ||
| panels={actionMenuPanels} |
There was a problem hiding this comment.
Does this handle empty state?
There was a problem hiding this comment.
Yes. When no actions are available, we pass panels=[]. FlyoutTemplate.Footer ignores the empty menu and hides the footer when no other actions remain. This exact case is covered by the existing test, which I reran successfully:
…#299456) ## Summary closes elastic/nightshift-program#1940 Match the [redesigned significant event flyout ](https://symmetrical-adventure-2y9no3w.pages.github.io/main/#/alerts)while keeping the existing investigation, chat, and status actions. - Add Overview and Timeline tabs with severity, confidence, and status badges. - Show a linked investigation card and the five earliest detections in Overview. - Consolidate investigation, chat, and mark-inactive actions into one Actions menu. - Persist running investigations and terminal outcomes; show failed runs as Failed. - Wait for server-recorded completion so read errors and stale follow-up results cannot stop polling early. ## How to test 1. Open Nightshift → Detections → Events and open a significant event. Check the header badges and Overview sections. 2. Open Timeline. Confirm detections run earliest first and the significant event appears last. Click a detection twice to open and close its child flyout. Click the event title to return to Overview. 3. Open an event with an investigation. Click its investigation card and confirm the investigation opens. Check that events without an investigation omit the card. 4. From Actions, run an investigation. Confirm the flyout and table show In progress immediately, retain that state after a reload, and show Completed when the run succeeds. Run a follow-up and confirm the previous result does not immediately complete the new round. 5. Cause an investigation to fail. Confirm its card shows Failed. Start a follow-up and confirm the card returns to In progress. 6. Simulate a temporary 5xx when reading a running investigation. Confirm it does not mark the event investigation Completed or stop event polling early. 7. Check chat actions and Mark inactive. With read-only access or a paused engine, verify the available actions and disabled-state explanations. 8. Expand an event with more than five detections. Open another event and confirm it starts on Overview with the first five detections visible. ## Demo <img width="1702" height="1318" alt="Oct-21-2026 15-45-54" src="https://github.com/user-attachments/assets/1b97540b-275d-44e0-8a3f-073ad59ec429" /> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
closes https://github.com/elastic/nightshift-program/issues/1940
Match the redesigned significant event flyout while keeping the existing investigation, chat, and status actions.
How to test
Demo