stop button too bright

This commit is contained in:
Ian Gulliver
2026-10-19 09:53:54 -07:00
parent 55fea11fab
commit 577a35afb9
6 changed files with 262 additions and 344 deletions
-3
View File
@@ -1553,9 +1553,6 @@ private struct SnapshotRow: View {
.help("Start a new task from this snapshot, its agent continuing the conversation as it stood here")
if snap.trigger != .answer {
reviewButton
if let review, review.state == .running {
StopReviewButton(reviewId: review.id)
}
}
Rectangle().fill(Palette.border).frame(height: 1)
}
-24
View File
@@ -86,30 +86,6 @@ func findingWhere(_ f: JSONDict) -> String {
return path.isEmpty ? "" : "\(path)\(line > 0 ? ":\(line)\(end > line ? "–\(end)" : "")" : "")"
}
struct StopReviewButton: View {
let reviewId: String
@Environment(Store.self) private var store
@Environment(Overlays.self) private var overlays
@ViewState private var busy = false
var body: some View {
Button("stop") {
busy = true
Task {
do {
_ = try await store.api.client.stopReview(path: .init(reviewId: reviewId)).ok
} catch {
busy = false
overlays.showAlert(errorText(error))
}
}
}
.buttonStyle(SmallLinkButtonStyle(color: Palette.danger))
.disabled(busy)
.help("End the reviewer and record this review as failed")
}
}
struct FindingRow: View {
let review: Review
let index: Int