summaryrefslogtreecommitdiff
path: root/Hutch/App/RootView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-07-15 21:48:58 -0500
committerChristian Cleberg <[email protected]>2026-07-15 21:48:58 -0500
commit0eceec357b7ef5251ed0ae9d42b513c17380e0af (patch)
tree98b421635cbaf5a846a460603f03765680d1da06 /Hutch/App/RootView.swift
parentccec322f8eac4d14638f5abdae7dae7abc95eb7e (diff)
downloadhutch-0eceec357b7ef5251ed0ae9d42b513c17380e0af.tar.gz
hutch-0eceec357b7ef5251ed0ae9d42b513c17380e0af.tar.bz2
hutch-0eceec357b7ef5251ed0ae9d42b513c17380e0af.zip
feat: review patchsets
Patchsets are how contributions reach sourcehut, and Hutch had no reference to them anywhere. This adds review and triage: read a series, see its checks and version chain, and set its status. Two schema facts shaped the design. MailingList exposes no patchsets field, so a list's patchsets cannot be queried directly. They are reachable only through thread roots, so the existing threads query now also selects root.patchset — no extra request — and the Patches tab is derived from that. It appears only on lists that actually carry patches. Patch carries no diff. index, count, version, prefix, subject, and trailers are all it has; the diff exists only inside the email body. Patch bodies are split with the same InboxThreadUtilities.segmentMessageBody the inbox uses and rendered through the existing DiffView. Patches are ordered by their [PATCH n/m] index rather than receipt order, since mail arrives out of sequence. Patches with no index are kept at the end rather than dropped, because a one-off patch has no prefix. updatePatchset is nullable, so a null response is treated as a declined change and the local status is left alone rather than advanced optimistically. UNKNOWN and SUPERSEDED are not offered: the first is a sentinel, the second is set by the server when a newer version lands. Patch submission stays out of scope. It is a git send-email flow, not a GraphQL mutation.
Diffstat (limited to 'Hutch/App/RootView.swift')
-rw-r--r--Hutch/App/RootView.swift3
1 files changed, 3 insertions, 0 deletions
diff --git a/Hutch/App/RootView.swift b/Hutch/App/RootView.swift
index 1ae4651..59d7caa 100644
--- a/Hutch/App/RootView.swift
+++ b/Hutch/App/RootView.swift
@@ -439,6 +439,7 @@ enum MoreRoute: Hashable {
case projectDashboard(id: String, title: String?)
case mailingList(InboxMailingListReference)
case thread(InboxThreadSummary)
+ case patchset(id: Int, listName: String?)
case manPageBrowser
case manPage(URL)
}
@@ -472,6 +473,8 @@ private struct MoreNavigationRoot: View {
ProjectDashboardDeepLinkView(projectID: id, title: title)
case .mailingList(let mailingList):
MailingListDetailView(mailingList: mailingList)
+ case .patchset(let id, let listName):
+ PatchsetDetailView(patchsetID: id, listName: listName)
case .thread(let thread):
ThreadDetailView(
thread: thread,