From 7b817a1d2aed0e8b89f36b410f2779f4a6b35407 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 16 Jul 2026 16:59:55 -0500 Subject: Move Home system status into a title-bar status badge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the disruption-only banner on the Home tab with a persistent circular status indicator in the navigation bar, next to the "Home" title. The badge reflects the existing status logic — green/check when operational, orange/exclamation on disruption, gray otherwise — and taps through to System Status. SystemStatusSummaryRow is unchanged and still used by the More tab. Resolve the system-status result first in HomeViewModel.loadDashboard so the badge settles from cache immediately instead of waiting on the slower projects/jobs/tickets/inbox loads, which had left it spinning for several seconds. Bump MARKETING_VERSION to 3.8.2 and record it in ROADMAP. --- Hutch/Views/Home/HomeViewModel.swift | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'Hutch/Views/Home/HomeViewModel.swift') diff --git a/Hutch/Views/Home/HomeViewModel.swift b/Hutch/Views/Home/HomeViewModel.swift index 3789c11..7779bea 100644 --- a/Hutch/Views/Home/HomeViewModel.swift +++ b/Hutch/Views/Home/HomeViewModel.swift @@ -365,6 +365,19 @@ final class HomeViewModel { async let inboxUnreadTask = loadInboxUnreadSnapshot(forceRefresh: forceRefresh) async let systemStatusTask = loadSystemStatusSnapshot(forceRefresh: forceRefresh) + // Resolve system status first so the Home title-bar status badge can + // settle from cache without waiting on the slower list data below. + let systemStatusResult = await systemStatusTask + switch systemStatusResult { + case .success(let result): + systemStatusSnapshot = result.value + isShowingStaleSystemStatus = result.isStale + systemStatusErrorMessage = result.isStale ? result.refreshErrorMessage : nil + case .failure(let error): + systemStatusErrorMessage = error.userFacingMessage + } + isLoadingSystemStatus = false + let projectsResult = await projectsTask switch projectsResult { case .success(let projects): @@ -404,16 +417,6 @@ final class HomeViewModel { unreadInboxThreadCount = inboxUnreadSnapshot?.unreadCount unreadInboxThreads = inboxUnreadSnapshot?.threads ?? [] hasUnreadInboxThreads = (unreadInboxThreadCount ?? 0) > 0 - let systemStatusResult = await systemStatusTask - switch systemStatusResult { - case .success(let result): - systemStatusSnapshot = result.value - isShowingStaleSystemStatus = result.isStale - systemStatusErrorMessage = result.isStale ? result.refreshErrorMessage : nil - case .failure(let error): - systemStatusErrorMessage = error.userFacingMessage - } - isLoadingSystemStatus = false lastRefreshed = Date() persistNeedsAttentionSnapshot() persistSystemStatusWidgetSnapshot() -- cgit v1.2.3