import SwiftUI struct CICircle: View { let status: CIStatus var body: some View { Circle() .fill(color) .frame(width: 10, height: 10) } private var color: Color { switch status { case .success: return .green case .failure: return .red case .running: return .orange case .cancelled: return .gray case .unknown: return .gray.opacity(0.5) } } } struct ReviewBadge: View { let state: ReviewState var body: some View { Text(text) .font(.caption2.weight(.semibold)) .padding(.horizontal, 6) .padding(.vertical, 2) .background(color.opacity(0.15)) .foregroundColor(color) .clipShape(Capsule()) } private var text: String { switch state { case .approved: return "Approved" case .changesRequested: return "Changes" case .needsReview: return "Needs review" case .unknown: return "" } } private var color: Color { switch state { case .approved: return .green case .changesRequested: return .red case .needsReview: return .orange case .unknown: return .gray } } }