Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/CodexBar/MenuCardHeightFingerprint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ extension UsageMenuCardView.Model.Metric {
MenuCardHeightFingerprint.field("detailLeft", self.detailLeftText),
MenuCardHeightFingerprint.field("detailRight", self.detailRightText),
MenuCardHeightFingerprint.field(
"sessionEquivalentVerdict",
self.sessionEquivalentDetail?.verdictText),
"sessionEquivalentLeft",
self.sessionEquivalentDetail?.leftText),
MenuCardHeightFingerprint.field(
"sessionEquivalentNumber",
self.sessionEquivalentDetail?.numberText),
"sessionEquivalentRight",
self.sessionEquivalentDetail?.rightText),
self.pacePercent == nil ? "pace=0" : "pace=1",
self.paceOnTop ? "paceTop=1" : "paceTop=0",
self.cardStyle ? "card=1" : "card=0",
Expand Down
23 changes: 13 additions & 10 deletions Sources/CodexBar/MenuCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -552,16 +552,19 @@ private struct MetricRow: View {
}
}
if let sessionEquivalentDetail = self.metric.sessionEquivalentDetail {
Text(sessionEquivalentDetail.verdictText)
.font(.footnote)
.foregroundStyle(MenuHighlightStyle.primary(self.isHighlighted))
.lineLimit(1)
.accessibilityLabel(sessionEquivalentDetail.verdictAccessibilityLabel)
Text(sessionEquivalentDetail.numberText)
.font(.footnote)
.foregroundStyle(MenuHighlightStyle.secondary(self.isHighlighted))
.lineLimit(1)
.accessibilityLabel(sessionEquivalentDetail.numberAccessibilityLabel)
HStack(alignment: .firstTextBaseline) {
Text(sessionEquivalentDetail.leftText)
.font(.footnote)
.foregroundStyle(MenuHighlightStyle.primary(self.isHighlighted))
.lineLimit(1)
Spacer()
Text(sessionEquivalentDetail.rightText)
.font(.footnote)
.foregroundStyle(MenuHighlightStyle.secondary(self.isHighlighted))
.lineLimit(1)
}
.accessibilityElement(children: .ignore)
.accessibilityLabel(sessionEquivalentDetail.accessibilityLabel)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "لا يمكن أن ينفد الحد الأسبوعي قبل إعادة التعيين بهذه الوتيرة";
"Weekly can run out ≈%d windows early" = "قد ينفد الحد الأسبوعي مبكرًا بنحو %d نافذة";
"Estimated: %@" = "تقديري: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "حصة الجلسة";
"session quotas" = "حصص الجلسات";
"Coding Plan" = "خطة البرمجة";
"Agent Plan" = "خطة الوكيل";
"Team" = "فريق";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,9 @@
"Weekly cannot run out before reset at this pace" = "La quota setmanal no es pot esgotar abans del reinici a aquest ritme";
"Weekly can run out ≈%d windows early" = "La quota setmanal es pot esgotar ≈%d finestres abans";
"Estimated: %@" = "Estimació: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "quota de sessió";
"session quotas" = "quotes de sessió";
"Coding Plan" = "Pla de programació";
"Agent Plan" = "Pla d'agent";
"Team" = "Equip";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,9 @@
"Weekly cannot run out before reset at this pace" = "Das Wochenlimit kann bei diesem Tempo nicht vor dem Reset aufgebraucht sein";
"Weekly can run out ≈%d windows early" = "Das Wochenlimit kann ≈%d Fenster früher aufgebraucht sein";
"Estimated: %@" = "Geschätzt: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "Sitzungskontingent";
"session quotas" = "Sitzungskontingente";
"Coding Plan" = "Coding-Plan";
"Agent Plan" = "Agentenplan";
"Team" = "Team";
Expand Down
5 changes: 4 additions & 1 deletion Sources/CodexBar/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,10 @@
"≈%d full 5h windows of weekly left · %d windows until reset" = "≈%d full 5h windows of weekly left · %d windows until reset";
"Weekly cannot run out before reset at this pace" = "Weekly cannot run out before reset at this pace";
"Weekly can run out ≈%d windows early" = "Weekly can run out ≈%d windows early";
"Estimated: %@" = "Estimated: %@";
"Estimated: %@" = "Est. %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "session quota";
"session quotas" = "session quotas";
"Coding Plan" = "Coding Plan";
"Agent Plan" = "Agent Plan";
"Team" = "Team";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@
"Weekly cannot run out before reset at this pace" = "La cuota semanal no puede agotarse antes del reinicio a este ritmo";
"Weekly can run out ≈%d windows early" = "La cuota semanal puede agotarse ≈%d ventanas antes";
"Estimated: %@" = "Estimación: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "cuota de sesión";
"session quotas" = "cuotas de sesión";
"Coding Plan" = "Plan de programación";
"Agent Plan" = "Plan de agente";
"Team" = "Equipo";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/fa.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "با این روند، سهم هفتگی پیش از بازنشانی تمام نمی‌شود";
"Weekly can run out ≈%d windows early" = "سهم هفتگی ممکن است حدود %d بازه زودتر تمام شود";
"Estimated: %@" = "برآوردی: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "سهمیه جلسه";
"session quotas" = "سهمیه‌های جلسه";
"Coding Plan" = "طرح کدنویسی";
"Agent Plan" = "طرح عامل";
"Team" = "تیم";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,9 @@
"Weekly cannot run out before reset at this pace" = "Le quota hebdomadaire ne peut pas être épuisé avant la réinitialisation à ce rythme";
"Weekly can run out ≈%d windows early" = "Le quota hebdomadaire peut être épuisé ≈%d fenêtres plus tôt";
"Estimated: %@" = "Estimation : %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "quota de session";
"session quotas" = "quotas de session";
"Coding Plan" = "Plan de codage";
"Agent Plan" = "Plan d'agent";
"Team" = "Équipe";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/gl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,9 @@
"Weekly cannot run out before reset at this pace" = "A cota semanal non pode esgotarse antes do restablecemento a este ritmo";
"Weekly can run out ≈%d windows early" = "A cota semanal pode esgotarse ≈%d xanelas antes";
"Estimated: %@" = "Estimación: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "cota de sesión";
"session quotas" = "cotas de sesión";
"Coding Plan" = "Plan de programación";
"Agent Plan" = "Plan de axente";
"Team" = "Equipo";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "Kuota mingguan tidak dapat habis sebelum reset dengan laju ini";
"Weekly can run out ≈%d windows early" = "Kuota mingguan dapat habis ≈%d jendela lebih awal";
"Estimated: %@" = "Perkiraan: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "kuota sesi";
"session quotas" = "kuota sesi";
"Coding Plan" = "Paket Coding";
"Agent Plan" = "Paket Agen";
"Team" = "Tim";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "La quota settimanale non può esaurirsi prima del reset a questo ritmo";
"Weekly can run out ≈%d windows early" = "La quota settimanale può esaurirsi ≈%d finestre prima";
"Estimated: %@" = "Stima: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "quota di sessione";
"session quotas" = "quote di sessione";
"Coding Plan" = "Piano di codifica";
"Agent Plan" = "Piano agente";
"Team" = "Squadra";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,9 @@
"Weekly cannot run out before reset at this pace" = "このペースではリセット前に週間枠を使い切れません";
"Weekly can run out ≈%d windows early" = "週間枠は約%dウィンドウ早く使い切る可能性があります";
"Estimated: %@" = "推定:%@";
"session_quota_estimate_value_format" = "%1$@%2$@";
"session quota" = "セッション枠";
"session quotas" = "セッション枠";
"Coding Plan" = "コーディングプラン";
"Agent Plan" = "エージェントプラン";
"Team" = "チーム";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,9 @@
"Weekly cannot run out before reset at this pace" = "이 속도라면 재설정 전에 주간 한도를 소진할 수 없습니다";
"Weekly can run out ≈%d windows early" = "주간 한도가 약 %d개 창 일찍 소진될 수 있습니다";
"Estimated: %@" = "예상: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "세션 할당량";
"session quotas" = "세션 할당량";
"Coding Plan" = "코딩 요금제";
"Agent Plan" = "에이전트 요금제";
"Team" = "팀";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,9 @@
"Weekly cannot run out before reset at this pace" = "Het weeklimiet kan bij dit tempo niet vóór de reset opraken";
"Weekly can run out ≈%d windows early" = "Het weeklimiet kan ≈%d vensters eerder opraken";
"Estimated: %@" = "Schatting: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "sessiequotum";
"session quotas" = "sessiequota";
"Coding Plan" = "Codeerplan";
"Agent Plan" = "Agentplan";
"Team" = "Team";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "Przy tym tempie limit tygodniowy nie może wyczerpać się przed resetem";
"Weekly can run out ≈%d windows early" = "Limit tygodniowy może wyczerpać się ≈%d okien wcześniej";
"Estimated: %@" = "Szacunek: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "limit sesji";
"session quotas" = "limity sesji";
"Coding Plan" = "Plan kodowania";
"Agent Plan" = "Plan agenta";
"Team" = "Zespół";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,9 @@
"Weekly cannot run out before reset at this pace" = "A cota semanal não pode acabar antes da renovação nesse ritmo";
"Weekly can run out ≈%d windows early" = "A cota semanal pode acabar ≈%d janelas antes";
"Estimated: %@" = "Estimativa: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "cota da sessão";
"session quotas" = "cotas da sessão";
"Coding Plan" = "Plano de codificação";
"Agent Plan" = "Plano de agente";
"Team" = "Equipe";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,9 @@
"Weekly cannot run out before reset at this pace" = "При таком темпе недельный лимит не может закончиться до сброса";
"Weekly can run out ≈%d windows early" = "Недельный лимит может закончиться на ≈%d окон раньше";
"Estimated: %@" = "Оценка: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "лимит сессии";
"session quotas" = "лимиты сессий";
"Coding Plan" = "План программирования";
"Agent Plan" = "План агента";
"Team" = "Команда";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@
"Weekly cannot run out before reset at this pace" = "Veckokvoten kan inte ta slut före återställningen i den här takten";
"Weekly can run out ≈%d windows early" = "Veckokvoten kan ta slut ≈%d fönster tidigare";
"Estimated: %@" = "Uppskattning: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "sessionskvot";
"session quotas" = "sessionskvoter";
"Coding Plan" = "Kodningsplan";
"Agent Plan" = "Agentplan";
"Team" = "Team";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/th.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@
"Weekly cannot run out before reset at this pace" = "ด้วยอัตรานี้ โควตารายสัปดาห์จะไม่หมดก่อนรีเซ็ต";
"Weekly can run out ≈%d windows early" = "โควตารายสัปดาห์อาจหมดเร็วขึ้น ≈%d ช่วง";
"Estimated: %@" = "โดยประมาณ: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "โควตาเซสชัน";
"session quotas" = "โควตาเซสชัน";
"Coding Plan" = "แผนการเขียนโค้ด";
"Agent Plan" = "แผนเอเจนต์";
"Team" = "ทีม";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,9 @@
"Weekly cannot run out before reset at this pace" = "Bu hızda haftalık kota sıfırlamadan önce tükenemez";
"Weekly can run out ≈%d windows early" = "Haftalık kota ≈%d pencere erken tükenebilir";
"Estimated: %@" = "Tahmini: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "oturum kotası";
"session quotas" = "oturum kotaları";
"Coding Plan" = "Kodlama Planı";
"Agent Plan" = "Ajan Planı";
"Team" = "Ekip";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,9 @@
"Weekly cannot run out before reset at this pace" = "За такого темпу тижневий ліміт не може вичерпатися до скидання";
"Weekly can run out ≈%d windows early" = "Тижневий ліміт може вичерпатися на ≈%d вікон раніше";
"Estimated: %@" = "Оцінка: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "ліміт сесії";
"session quotas" = "ліміти сесій";
"Coding Plan" = "План кодування";
"Agent Plan" = "План агента";
"Team" = "Команда";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,9 @@
"Weekly cannot run out before reset at this pace" = "Với tốc độ này, hạn mức tuần không thể hết trước khi đặt lại";
"Weekly can run out ≈%d windows early" = "Hạn mức tuần có thể hết sớm ≈%d cửa sổ";
"Estimated: %@" = "Ước tính: %@";
"session_quota_estimate_value_format" = "%1$@ %2$@";
"session quota" = "hạn mức phiên";
"session quotas" = "hạn mức phiên";
"Coding Plan" = "Gói lập trình";
"Agent Plan" = "Gói tác nhân";
"Team" = "Nhóm";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,9 @@
"Weekly cannot run out before reset at this pace" = "按此速度,每周额度无法在重置前用完";
"Weekly can run out ≈%d windows early" = "每周额度可能提前约 %d 个窗口用完";
"Estimated: %@" = "估算:%@";
"session_quota_estimate_value_format" = "%1$@%2$@";
"session quota" = "会话额度";
"session quotas" = "会话额度";
"Coding Plan" = "编程套餐";
"Agent Plan" = "智能体套餐";
"Team" = "团队";
Expand Down
3 changes: 3 additions & 0 deletions Sources/CodexBar/Resources/zh-Hant.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,9 @@
"Weekly cannot run out before reset at this pace" = "依此速度,每週額度無法在重置前用完";
"Weekly can run out ≈%d windows early" = "每週額度可能提前約 %d 個視窗用完";
"Estimated: %@" = "預估:%@";
"session_quota_estimate_value_format" = "%1$@%2$@";
"session quota" = "工作階段額度";
"session quotas" = "工作階段額度";
"Coding Plan" = "程式設計方案";
"Agent Plan" = "智慧體方案";
"Team" = "團隊";
Expand Down
63 changes: 33 additions & 30 deletions Sources/CodexBar/UsagePaceText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ enum UsagePaceText {
}

struct SessionEquivalentDetail: Equatable {
let verdictText: String
let numberText: String
let verdictAccessibilityLabel: String
let numberAccessibilityLabel: String
let leftText: String
let rightText: String
let accessibilityLabel: String
}

private enum DetailContext {
Expand All @@ -38,36 +37,40 @@ enum UsagePaceText {
}

static func sessionEquivalentDetail(forecast: SessionEquivalentForecast) -> SessionEquivalentDetail {
let displayedEstimate = Self.boundedFullWindowCount(forecast.estimatedWindowsToExhaustWeekly)
let numberText = String.localizedStringWithFormat(
L("≈%d full 5h windows of weekly left · %d windows until reset"),
displayedEstimate,
forecast.windowsUntilReset)
let verdictText: String
if forecast.estimatedWindowsToExhaustWeekly >= forecast.availableWindowsUntilReset {
verdictText = L("Weekly cannot run out before reset at this pace")
let leftText = Self.sessionQuotaEstimateText(forecast.estimatedWindowsToExhaustWeekly)
let rightText = Self.windowsUntilResetText(forecast.windowsUntilReset)
return SessionEquivalentDetail(
leftText: leftText,
rightText: rightText,
accessibilityLabel: L("%@ · %@", leftText, rightText))
}

private static func sessionQuotaEstimateText(_ value: Double) -> String {
let displayedEstimate: String
let unit: String
if value.isFinite, value > 0 {
let boundedValue = min(value, 1_000_000)
let roundedValue = (boundedValue * 10).rounded() / 10
displayedEstimate = roundedValue.formatted(
.number
.precision(.fractionLength(0...1))
.locale(codexBarLocalizedLocale()))
unit = roundedValue > 0 && roundedValue <= 1 ? L("session quota") : L("session quotas")
} else {
let windowsEarly = Self.boundedWindowCount(
forecast.availableWindowsUntilReset - forecast.estimatedWindowsToExhaustWeekly)
verdictText = String.localizedStringWithFormat(
L("Weekly can run out ≈%d windows early"),
max(1, windowsEarly))
displayedEstimate = codexBarLocalizedInteger(0)
unit = L("session quotas")
}
return SessionEquivalentDetail(
verdictText: verdictText,
numberText: numberText,
verdictAccessibilityLabel: L("Estimated: %@", verdictText),
numberAccessibilityLabel: L("Estimated: %@", numberText))
let estimateValue = L("session_quota_estimate_value_format", displayedEstimate, unit)
return L("Estimated: %@", L("%@ left", estimateValue))
}

private static func boundedWindowCount(_ value: Double) -> Int {
guard value.isFinite, value > 0 else { return 0 }
return Int(min(value, 1_000_000).rounded())
}

private static func boundedFullWindowCount(_ value: Double) -> Int {
guard value.isFinite, value > 0 else { return 0 }
return Int(floor(min(value, 1_000_000)))
private static func windowsUntilResetText(_ count: Int) -> String {
let combinedText = String.localizedStringWithFormat(
L("≈%d full 5h windows of weekly left · %d windows until reset"),
0,
count)
guard let separatorRange = combinedText.range(of: " · ") else { return combinedText }
return String(combinedText[separatorRange.upperBound...])
}

private static func detailLeftLabel(for pace: UsagePace) -> String {
Expand Down
1 change: 1 addition & 0 deletions Tests/CodexBarTests/LocalizationLanguageCatalogTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ struct LocalizationLanguageCatalogTests {
"menu_bar_layout_token_account",
"ory_session_…=…; csrftoken=…",
"section_privacy",
"session_quota_estimate_value_format",
"tab_menu",
]
let unchanged = Set(english.keys.filter { italian[$0] == english[$0] })
Expand Down
6 changes: 3 additions & 3 deletions Tests/CodexBarTests/MenuCardOverrideIsolationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ struct MenuCardOverrideIsolationTests {
sourceLabel: nil,
cacheKey: "bob")))
let weeklyMetric = try #require(model.metrics.first { $0.id == "secondary" })
let numberText = try #require(weeklyMetric.sessionEquivalentDetail?.numberText)
let leftText = try #require(weeklyMetric.sessionEquivalentDetail?.leftText)

#expect(numberText.hasPrefix("≈8 full 5h windows"))
#expect(!numberText.hasPrefix("≈2 full 5h windows"))
#expect(leftText == "Est. 8 session quotas left")
#expect(leftText != "Est. 2 session quotas left")
}

@Test
Expand Down
Loading