feat(app): add flow diagnostics and refine interface
CI / Validate manifests (push) Has been cancelled
CI / SwiftLint (push) Has been cancelled
CI / iOS / Extension (push) Has been cancelled
CI / macOS (push) Has been cancelled

Improve failure recovery visibility, strengthen account-session handling, and make the cross-platform interface more consistent.
This commit is contained in:
Rocky
2026-08-26 14:40:06 +08:00
parent 1ee032bdb9
commit 39002336c0
78 changed files with 2737 additions and 735 deletions
@@ -0,0 +1,53 @@
// ProgressTrack.swift
// OSGKeyboard · Shared Design System
//
// Shared linear progress track for consistent height, shape, and background.
import SwiftUI
public struct ProgressTrackSegment {
let fraction: Double
let color: Color
public init(fraction: Double, color: Color) {
self.fraction = fraction
self.color = color
}
}
public struct ProgressTrack: View {
@Environment(\.themePalette) private var palette
private let segments: [ProgressTrackSegment]
public init(segments: [ProgressTrackSegment]) {
self.segments = segments
}
public var body: some View {
GeometryReader { proxy in
ZStack(alignment: .leading) {
Capsule()
.fill(palette.surfaceElevated.opacity(0.55))
HStack(spacing: 0) {
ForEach(segments.indices, id: \.self) { index in
Rectangle()
.fill(segments[index].color)
.frame(
width: proxy.size.width * clampedFraction(
segments[index].fraction
)
)
}
}
.clipShape(Capsule())
}
}
.frame(height: 8)
}
private func clampedFraction(_ fraction: Double) -> Double {
min(max(fraction, 0), 1)
}
}