diff --git a/src/Backend/AutopilotMonitor.Functions/Functions/IngestEventsFunction.cs b/src/Backend/AutopilotMonitor.Functions/Functions/IngestEventsFunction.cs index 3f55a160..a80c0b03 100644 --- a/src/Backend/AutopilotMonitor.Functions/Functions/IngestEventsFunction.cs +++ b/src/Backend/AutopilotMonitor.Functions/Functions/IngestEventsFunction.cs @@ -97,6 +97,7 @@ namespace AutopilotMonitor.Functions.Functions EnrollmentEvent? lastPhaseChangeEvent = null; EnrollmentEvent? completionEvent = null; EnrollmentEvent? failureEvent = null; + EnrollmentEvent? gatherCompletionEvent = null; EnrollmentEvent? diagnosticsUploadedEvent = null; string? failureReason = null; DateTime? earliestEventTimestamp = null; @@ -121,6 +122,10 @@ namespace AutopilotMonitor.Functions.Functions { completionEvent = evt; } + else if (evt.EventType == "gather_rules_collection_completed") + { + gatherCompletionEvent = evt; + } else if (evt.EventType == "enrollment_failed") { failureEvent = evt; @@ -175,6 +180,20 @@ namespace AutopilotMonitor.Functions.Functions ); _logger.LogWarning("{SessionPrefix} Status: Failed - {FailureReason} (transitioned={Transitioned})", sessionPrefix, failureReason, statusTransitioned); } + else if (gatherCompletionEvent != null) + { + // Gather rules collection completed — mark session as Succeeded. + // Does not trigger enrollment stats or Teams notifications (not a real enrollment). + await _storageService.UpdateSessionStatusAsync( + request.TenantId, + request.SessionId, + SessionStatus.Succeeded, + gatherCompletionEvent.Phase, + completedAt: gatherCompletionEvent.Timestamp, + earliestEventTimestamp: earliestEventTimestamp + ); + _logger.LogInformation("{SessionPrefix} Status: Succeeded (gather_rules)", sessionPrefix); + } else if (lastPhaseChangeEvent != null) { // Update current phase (still in progress) diff --git a/src/Web/autopilot-monitor-web/app/globals.css b/src/Web/autopilot-monitor-web/app/globals.css index 8870f491..487aa7b9 100644 --- a/src/Web/autopilot-monitor-web/app/globals.css +++ b/src/Web/autopilot-monitor-web/app/globals.css @@ -4,7 +4,8 @@ html { scroll-behavior: smooth; - overflow-y: overlay; + overflow-y: scroll; + scrollbar-gutter: stable; } :root {