From 9c11d69002d71556fea1e2a938e02d4f4d503ea5 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Fri, 7 Aug 2026 03:06:34 -0500 Subject: Expand App Intents: dialogs, search type, mutating intents (#17) Addresses the three open items on the App Intents ticket: - Check Status / Check Builds now return a spoken/visible dialog alongside their value, so they surface a result in Siri instead of appearing to do nothing. Logic consolidated to always produce a message. - Search Hutch gains a Search Type parameter (user, git/hg repo, mailing list, tracker, build job) threaded through the .search route into Lookup, which pre-selects the type. LookupType now conforms to AppEnum. - Adds mutating intents (not just navigation): Clear Recent Activity and Unpin Resource, backed by RecentActivityStore.clear and a new HomePinStore.removePin. Both act on the active account's storage. Tests cover search-type routing, the blank-query fallback, and pin removal. --- Hutch/App/RootView.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Hutch/App/RootView.swift') diff --git a/Hutch/App/RootView.swift b/Hutch/App/RootView.swift index 2e16718..a3f9e7e 100644 --- a/Hutch/App/RootView.swift +++ b/Hutch/App/RootView.swift @@ -247,12 +247,12 @@ struct RootView: View { appState.pendingBuildListFilter = .failed appState.selectedTab = .builds - case .search(let query): + case .search(let query, let type): morePath = NavigationPath() appState.selectedTab = .more Task { await settleNavigationTransition() - morePath.append(MoreRoute.lookup(query: query)) + morePath.append(MoreRoute.lookup(query: query, type: type)) } case .lookup: @@ -260,7 +260,7 @@ struct RootView: View { appState.selectedTab = .more Task { await settleNavigationTransition() - morePath.append(MoreRoute.lookup(query: nil)) + morePath.append(MoreRoute.lookup(query: nil, type: nil)) } case .buildsTab: @@ -431,7 +431,7 @@ enum MoreDestination: Hashable { } enum MoreRoute: Hashable { - case lookup(query: String?) + case lookup(query: String?, type: LookupType?) case projects case lists case pastes @@ -454,8 +454,8 @@ private struct MoreNavigationRoot: View { MoreView() .navigationDestination(for: MoreRoute.self) { route in switch route { - case .lookup(let query): - LookupView(initialQuery: query ?? "") + case .lookup(let query, let type): + LookupView(initialQuery: query ?? "", initialType: type) case .projects: ProjectsListView() case .lists: -- cgit v1.2.3