fix: keep weekly summary on codex limit
Frontend / quality (push) Canceled after 0s

This commit is contained in:
2026-09-02 16:30:05 +08:00
parent 75fba7ab69
commit 0b2f969c6d
3 changed files with 29 additions and 15 deletions
+10 -5
View File
@@ -1701,11 +1701,16 @@ const quickSummaryLimits = (
(limit) =>
limit.windowDurationMinutes > 0 && limit.windowDurationMinutes < 24 * 60,
);
const week = sorted.find(
(limit) =>
limit.windowDurationMinutes >= 6 * 24 * 60 &&
limit.windowDurationMinutes <= 8 * 24 * 60,
);
const week =
sorted.find(
(limit) =>
limit.limitId.toLowerCase() === "codex" &&
limit.windowDurationMinutes === 168 * 60,
) ??
sorted.find(
(limit) =>
limit.limitName == null && limit.windowDurationMinutes === 168 * 60,
);
const selected: Array<{ kind: QuickLimitKind; limit: Limit }> = [];
if (hour) selected.push({ kind: "hour", limit: hour });
if (week && week !== hour) selected.push({ kind: "week", limit: week });