From 51b2eb0e6296734960f37cebd40fee34a1f261f9 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 14 May 2026 13:18:55 -0500 Subject: feat: add App Intents for Hutch navigation - add read-only App Intents for core Hutch workflows - route intents through the existing Hutch navigation/deep-link model - expose Work Queue, Recent Activity, System Status, pinned resources, projects, failed builds, assigned tickets, saved searches, and search where supported - keep App Intents non-mutating for the initial implementation - preserve existing widget, Safari extension, and hutch:// routing behavior References: https://todo.sr.ht/~ccleberg/hutch/71 --- Hutch/App/HutchApp.swift | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'Hutch/App/HutchApp.swift') diff --git a/Hutch/App/HutchApp.swift b/Hutch/App/HutchApp.swift index 69d1311..2b1977a 100644 --- a/Hutch/App/HutchApp.swift +++ b/Hutch/App/HutchApp.swift @@ -28,20 +28,10 @@ struct HutchApp: App { deepLinkLogger.error("Rejected URL: \(url.absoluteString, privacy: .public)") } } - .onChange(of: HutchIntentNavigator.shared.pendingDestination) { _, destination in - guard let destination else { return } - HutchIntentNavigator.shared.pendingDestination = nil - let link: DeepLink - switch destination { - case .home: link = .home - case .work: link = .work - case .builds: link = .buildsTab - case .repositories: link = .repositoriesTab - case .trackers: link = .trackersTab - case .systemStatus: link = .systemStatus - case .lookup: link = .lookup - } - appState.pendingDeepLink = link + .onChange(of: HutchIntentNavigator.shared.pendingRoute) { _, route in + guard let route else { return } + HutchIntentNavigator.shared.pendingRoute = nil + appState.open(route) } } } -- cgit v1.2.3