+
+
+
+ {lane.displayName}
+
+ {periodLabel && {periodLabel}}
+
+
+ {lane.limits.map((limit) => (
+
+ {limit.label} {limit.remaining}%
+
+ ))}
+
+
+
+ {cells.map((cell) => (
+
+ ))}
+
+
+ {nowPercent !== null && (
+
+ )}
+
+ {windows.length === 0 ? (
+
+ {t('quota_management.windows_idle', {
+ defaultValue: 'no window counting down',
+ })}
+
+ ) : (
+ windows.map((window) => {
+ // A label needs room to read; below that the bar speaks for itself
+ // and the detail lives in the tooltip.
+ const showLabel = window.widthPercent > (mode === 'session' ? 4.5 : 9);
+ const endText =
+ mode === 'session'
+ ? formatTime(window.endMs)
+ : `${formatDay(window.endMs)} ${formatTime(window.endMs)}`;
+
+ return (
+
+ {/* Consumed portion of the *current* window only — a past or
+ future window has no meaningful fill. */}
+ {window.state === 'live' && lane.remaining !== null && (
+
+ )}
+ {showLabel && (
+
+ {window.state === 'live' && lane.remaining !== null
+ ? `${lane.remaining}% · `
+ : ''}
+ {endText}
+
+ )}
+
+ );
+ })
+ )}
+