diff --git a/NucleicRemote/Shared/SessionActivityAttributes.swift b/NucleicRemote/Shared/SessionActivityAttributes.swift index 9809710..b352ef9 100644 --- a/NucleicRemote/Shared/SessionActivityAttributes.swift +++ b/NucleicRemote/Shared/SessionActivityAttributes.swift @@ -48,6 +48,30 @@ struct NucleicSessionAttributes: ActivityAttributes { /// A compact right-aligned status: its diff ("3 files +42 −7"), "2 to approve", /// "Waiting on you", "Working…", etc. var detail: String + /// The single most-urgent pending approval on this session, when it has one — the id the + /// inline Allow/Deny buttons resolve (`ApproveFromActivityIntent`). `nil` when the session + /// isn't blocked on an approval, or when the producer doesn't carry it (an older host, or a + /// summary that predates the field) — in which case the row falls back to a plain deep-link + /// tap, exactly as before. Optional so a host that omits it still decodes. + var approvalID: String? + /// Whether that approval is high-risk (destructive / network / host-exec). The surface hides + /// inline Allow on a high-risk request (§3.3) — only Deny / open-the-app is offered. `nil` + /// (treated as unknown → no inline Allow) when the producer doesn't carry it. + var approvalIsHighRisk: Bool? + + init( + id: String, title: String, project: String, backend: Backend, kind: Kind, + detail: String, approvalID: String? = nil, approvalIsHighRisk: Bool? = nil + ) { + self.id = id + self.title = title + self.project = project + self.backend = backend + self.kind = kind + self.detail = detail + self.approvalID = approvalID + self.approvalIsHighRisk = approvalIsHighRisk + } } struct ContentState: Codable, Hashable {