From 0e602932f21230111dd5f6b663e7634b7df2dffa Mon Sep 17 00:00:00 2001 From: yousiki <18757689+yousiki@users.noreply.github.com> Date: Tue, 28 Apr 2026 10:59:58 +0900 Subject: [PATCH] fix(ui): widen getCodexWindowKind parameter to accept CodexWindowSummary The new helpers added in this PR (inferCodeReviewCadence, getCodexWindowDisplayLabel) operate on CodexWindowSummary - a Pick subset of CodexQuotaWindow without usedPercent/remainingPercent/resetAt. They pass that subset into getCodexWindowKind, which was still typed as string | CodexQuotaWindow, so tsc -b fails with TS2345 in CI. The function only reads label/category/cadence, all of which exist on CodexWindowSummary, so widening the parameter is safe and lets a real CodexQuotaWindow continue to flow through unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- ui/src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/lib/utils.ts b/ui/src/lib/utils.ts index eacab42f..66cb1ee7 100644 --- a/ui/src/lib/utils.ts +++ b/ui/src/lib/utils.ts @@ -340,7 +340,7 @@ export type CodexWindowKind = * Map a Codex window into a semantic bucket. Prefers explicit category metadata * (post-2026-04 windows) and falls back to label sniffing for legacy cached data. */ -export function getCodexWindowKind(labelOrWindow: string | CodexQuotaWindow): CodexWindowKind { +export function getCodexWindowKind(labelOrWindow: string | CodexWindowSummary): CodexWindowKind { if (typeof labelOrWindow === 'object' && labelOrWindow !== null) { const w = labelOrWindow; if (w.category === 'additional' && w.cadence) {