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 {
173 defer { working = false } 173 defer { working = false }
174 do { 174 do {
175 try await client.run(["admin", "runners", "remove", runner.fingerprint]) 175 try await client.run(["admin", "runners", "remove", runner.fingerprint])
176 await loadRunners()
177 } catch let error as GitbayError { 176 } catch let error as GitbayError {
178 actionError = error.userFacingMessage 177 actionError = error.userFacingMessage
179 } catch { 178 } catch {
180 actionError = GitbayError.transport(error).userFacingMessage 179 actionError = GitbayError.transport(error).userFacingMessage
181 } 180 }
181 // Either way: a refusal may mean the row went already.
182 await loadRunners()
182 } 183 }
183 184
184 func checkInbound() async { 185 func checkInbound() async {
gitbay/Views/Admin/AdminInstanceViews.swift +12 −1
@@ -214,7 +214,18 @@ struct AdminInboundView: View {
214 .font(.gbSans(.subheadline)) 214 .font(.gbSans(.subheadline))
215 } 215 }
216 } 216 }
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 }
218 .navigationTitle("Inbound Mail") 229 .navigationTitle("Inbound Mail")
219 .navigationBarTitleDisplayMode(.inline) 230 .navigationBarTitleDisplayMode(.inline)
220 .task { await model.checkInbound() } 231 .task { await model.checkInbound() }