From 7eac56cb46369c9b8d6fd33c51d5ccbb80350945 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 22 Aug 2026 00:32:30 +0100 Subject: [PATCH] docs(webui): fix stale percent in minuteRateTitle doc example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SHOULD-B (v0.22 review round, round 2): the doc comment still showed "(92%)" for 12 attempts/1 failure — stale against the floor-not-round fix (formatRatePercent) landed earlier in this same file, which the spec's own test asserts as 91%. No functional change; comment only. No admin-asset regen needed — verified byte-identical dist/ output before and after (a doc comment does not reach the minified bundle). --- webui/src/lib/provider-rate.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/webui/src/lib/provider-rate.ts b/webui/src/lib/provider-rate.ts index 21729e7..01f6c66 100644 --- a/webui/src/lib/provider-rate.ts +++ b/webui/src/lib/provider-rate.ts @@ -99,11 +99,14 @@ function countWord(n: number, singular: string, plural: string): string { * minuteRateTitle builds the provider-level badge's title/aria-label — * the "right now" minute-window detail the spec asks for beside the * day-window badge text itself, e.g. "12 attempts, 1 failure in the last - * minute (92%)". Singular/plural wording follows the actual count, and a - * zero-attempt minute reads as its own sentence rather than a "0%" that - * would misread as a total outage. Provider-level only — a per-model - * badge no longer has minute-window counters to build this from at all - * (SHOULD-2, v0.22 review round: see dayRateTitle, its own fallback). + * minute (91%)" (formatRatePercent floors, not rounds — SHOULD-B, v0.22 + * review round, round 2: this example previously said "(92%)", stale + * against the floor fix below it in this same file). Singular/plural + * wording follows the actual count, and a zero-attempt minute reads as + * its own sentence rather than a "0%" that would misread as a total + * outage. Provider-level only — a per-model badge no longer has minute- + * window counters to build this from at all (SHOULD-2, v0.22 review + * round: see dayRateTitle, its own fallback). */ export function minuteRateTitle(attemptsMinute: number, failuresMinute: number): string { if (attemptsMinute <= 0) return 'no traffic in the last minute'