Memoji character (11 expressions) on the engine's motion; Claude limit shows time to reset; ChatGPT weekly limit from Codex logs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 22:16:53 +03:00
parent 8a8dd98e06
commit fbf90fd4fb
23 changed files with 358 additions and 89 deletions
+32 -2
View File
@@ -486,9 +486,12 @@ struct IslandHeader: View {
// Right: plan pill (GitHub build, home view only) + action icons
HStack(spacing: 8) {
#if !APPSTORE
if state.view == .overview && state.showPlanInNotch && state.planRelayInstalled {
if (state.view == .overview || state.view == .empty) && state.showPlanInNotch && state.planRelayInstalled {
ClaudePlanHeaderPill(state: state)
}
if (state.view == .overview || state.view == .empty), let w = state.codexWeekly {
ChatGPTLimitPill(window: w)
}
#endif
HStack(spacing: 14) {
Button(action: {
@@ -564,7 +567,10 @@ struct ClaudePlanHeaderPill: View {
private var label: String {
guard let usage = state.claudePlanUsage,
let pct = ClaudePlanGauge.dominantPct(usage) else { return "Claude —" }
return "Claude \(Int(pct.rounded()))%"
guard let w = ClaudePlanGauge.dominantWindow(usage), w.resetsAt > Date() else {
return "Claude \(Int(pct.rounded()))%"
}
return "Claude \(Int(pct.rounded()))% (до сброса \(PlanTime.untilReset(w.resetsAt)))"
}
private var isActive: Bool { state.showingPlanDetail || isHovered }
@@ -608,6 +614,30 @@ struct ClaudePlanHeaderPill: View {
}
#endif
/// ChatGPT weekly limit, from the Codex logs: "ChatGPT 23% (сброс пт 14:00)".
struct ChatGPTLimitPill: View {
let window: PlanWindow
var body: some View {
let pct = ClaudePlanGauge.effectivePct(window)
let color = ClaudePlanGauge.color(for: pct)
let reset = window.resetsAt > Date() ? " (сброс \(PlanTime.resetMoment(window.resetsAt)))" : ""
HStack(spacing: 4) {
Circle().fill(Color(hex: color)).frame(width: 6, height: 6)
Text("ChatGPT \(Int(pct.rounded()))%\(reset)")
.font(.system(size: 10, weight: .semibold))
.foregroundColor(Color(hex: "#6B7079"))
.lineLimit(1)
.fixedSize()
}
.padding(.horizontal, 8)
.padding(.vertical, 4)
.background(Capsule().fill(Color(hex: "#0E0F11")))
.overlay(Capsule().stroke(Color(hex: color).opacity(0.14), lineWidth: 1))
.help("Недельный лимит ChatGPT (по логам Codex)")
}
}
// MARK: - Compact mini mochi grid (2×2 to the right of the notch)
struct CompactMiniGrid: View {