Commit f8fa21e25c

f8fa21e25cd8188a7a9b3fd868afa1a9c8abb4b2

parent: cde7fbf640

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-14 08:44 UTC

Admin instance: a failed runner removal reloads; the mailbox check says it can wait

The runner list reloads after a removal whether or not it went through,
since a refusal can mean the row was gone already. The inbound check
says, while it connects, that a mailbox which does not answer takes a
minute.

Ref #37

Layout: unified · split

gitbay/Admin/AdminInstance.swift +2 −1
@@ -173,12 +173,13 @@ final class AdminInstanceViewModel {
173173 defer { working = false }
174174 do {
175175 try await client.run(["admin", "runners", "remove", runner.fingerprint])
176 await loadRunners()
177176 } catch let error as GitbayError {
178177 actionError = error.userFacingMessage
179178 } catch {
180179 actionError = GitbayError.transport(error).userFacingMessage
181180 }
181 // Either way: a refusal may mean the row went already.
182 await loadRunners()
182183 }
183184
184185 func checkInbound() async {
gitbay/Views/Admin/AdminInstanceViews.swift +12 −1
@@ -214,7 +214,18 @@ struct AdminInboundView: View {
214214 .font(.gbSans(.subheadline))
215215 }
216216 }
217 .overlay { LoadStateOverlay(state: model.inbound) }
217 .overlay {
218 if case .loading = model.inbound {
219 // A live connection to the mailbox; one that does not answer
220 // takes its timeout, twice with the retry.
221 ProgressView("Connecting to the mailbox. This can take a minute when it does not answer.")
222 .font(.gbSans(.subheadline))
223 .multilineTextAlignment(.center)
224 .padding()
225 } else {
226 LoadStateOverlay(state: model.inbound)
227 }
228 }
218229 .navigationTitle("Inbound Mail")
219230 .navigationBarTitleDisplayMode(.inline)
220231 .task { await model.checkInbound() }