diff --git a/src/commands/cliproxy/quota-subcommand.ts b/src/commands/cliproxy/quota-subcommand.ts index 3466e1e7..567a3ccb 100644 --- a/src/commands/cliproxy/quota-subcommand.ts +++ b/src/commands/cliproxy/quota-subcommand.ts @@ -302,7 +302,7 @@ function getCodexWindowDisplayLabel( } if (window.category === 'additional') { - const pretty = prettifyCodexFeatureLabel(window.featureLabel || 'Additional'); + const pretty = prettifyCodexFeatureLabel(window.featureLabel || window.label || 'Additional'); if (window.cadence === '5h') return `${pretty} (5h)`; if (window.cadence === 'weekly') return `${pretty} (weekly)`; return pretty; diff --git a/ui/src/lib/utils.ts b/ui/src/lib/utils.ts index a05576a8..eacab42f 100644 --- a/ui/src/lib/utils.ts +++ b/ui/src/lib/utils.ts @@ -343,16 +343,16 @@ export type CodexWindowKind = export function getCodexWindowKind(labelOrWindow: string | CodexQuotaWindow): CodexWindowKind { if (typeof labelOrWindow === 'object' && labelOrWindow !== null) { const w = labelOrWindow; - if (w.category === 'additional') { + if (w.category === 'additional' && w.cadence) { return w.cadence === 'weekly' ? 'additional-weekly' : 'additional-5h'; } - if (w.category === 'code-review') { + if (w.category === 'code-review' && w.cadence) { return w.cadence === 'weekly' ? 'code-review-weekly' : 'code-review-5h'; } - if (w.category === 'usage') { + if (w.category === 'usage' && w.cadence) { return w.cadence === 'weekly' ? 'usage-weekly' : 'usage-5h'; } - // No category metadata -> fall through to label sniffing. + // Missing or incomplete category metadata -> fall through to label sniffing. return getCodexWindowKindFromLabel(w.label); } return getCodexWindowKindFromLabel(labelOrWindow);