The best way to control Claude Code, Codex and more from any computer or phone
fix(web): prevent overlapping usage breakdown columns (#14318)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Paul van der lei committed
Oct 20, 2026 at 07:06 UTC
805ff51e58b7cf6a1f34e26b0cf3e1e2a679e732
1 file changed
+69
-68
apps/web/src/components/usage/UsagePage.tsx
+69
-68
@@ -691,7 +691,6 @@ function UsageOverview({
691
.slice(cursorInsertAt)
692
.map((provider) => ({ kind: "usage" as const, provider })),
693
];
694
- const timeValueColumnWidth = `${60 / (activeProviders.length + 2)}%`;
694
695
return (
696
<div aria-busy={loadingPartial} className="flex flex-col gap-6">
@@ -999,80 +998,82 @@ function UsageOverview({
998
</tbody>
999
</table>
1000
) : (
1002
- <table className="w-full table-fixed text-sm">
1003
- <colgroup>
1004
- <col className="w-2/5" />
1005
- {activeProviders.map((provider) => (
1006
- <col key={provider} style={{ width: timeValueColumnWidth }} />
1007
- ))}
1008
- <col style={{ width: timeValueColumnWidth }} />
1009
- <col style={{ width: timeValueColumnWidth }} />
1010
- </colgroup>
1011
- <thead>
1012
- <tr className="border-b border-border text-left text-xs text-muted-foreground">
1013
- <th className="py-2 font-normal">{shownHourly ? "Hour" : "Day"}</th>
1014
- {activeProviders.map((provider) => (
1015
- <th key={provider} className="py-2 text-right font-normal">
1016
- {PROVIDER_PRESENTATION[provider].label}
1017
- </th>
1018
- ))}
1019
- <th className="py-2 text-right font-normal">Total</th>
1020
- <th className="py-2 text-right font-normal">Tokens</th>
1021
- </tr>
1022
- </thead>
1023
- <tbody>
1024
- {breakdownPeriods.length === 0 ? (
1025
- <tr>
1026
- <td
1027
- colSpan={activeProviders.length + 3}
1028
- className="py-6 text-center text-muted-foreground"
1029
- >
1030
- No activity in this window.
1031
- </td>
1001
+ <div
1002
+ className="overflow-x-auto outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
1003
+ role="region"
1004
+ aria-label="Usage breakdown by time"
1005
+ tabIndex={0}
1006
+ >
1007
+ <table className="w-full text-sm whitespace-nowrap">
1008
+ <colgroup>
1009
+ <col className="w-2/5" />
1010
+ </colgroup>
1011
+ <thead>
1012
+ <tr className="border-b border-border text-left text-xs text-muted-foreground">
1013
+ <th className="py-2 font-normal">{shownHourly ? "Hour" : "Day"}</th>
1014
+ {activeProviders.map((provider) => (
1015
+ <th key={provider} className="py-2 pl-4 text-right font-normal">
1016
+ {PROVIDER_PRESENTATION[provider].label}
1017
+ </th>
1018
+ ))}
1019
+ <th className="py-2 pl-4 text-right font-normal">Total</th>
1020
+ <th className="py-2 pl-4 text-right font-normal">Tokens</th>
1021
</tr>
1033
- ) : (
1034
- breakdownPeriods.map((period) => (
1035
- <tr
1036
- key={"hourStart" in period ? period.hourStart : period.day}
1037
- className="border-b border-border/50 transition-colors hover:bg-muted/50"
1038
- >
1039
- <td className="py-2 text-foreground">
1040
- {"hourStart" in period
1041
- ? formatHourShort(period.hourStart, shownWindow.timeZone, hour12)
1042
- : formatDayShort(period.day)}
1022
+ </thead>
1023
+ <tbody>
1024
+ {breakdownPeriods.length === 0 ? (
1025
+ <tr>
1026
+ <td
1027
+ colSpan={activeProviders.length + 3}
1028
+ className="py-6 text-center text-muted-foreground"
1029
+ >
1030
+ No activity in this window.
1031
</td>
1044
- {activeProviders.map((provider) => (
1032
+ </tr>
1033
+ ) : (
1034
+ breakdownPeriods.map((period) => (
1035
+ <tr
1036
+ key={"hourStart" in period ? period.hourStart : period.day}
1037
+ className="border-b border-border/50 transition-colors hover:bg-muted/50"
1038
+ >
1039
+ <td className="py-2 text-foreground">
1040
+ {"hourStart" in period
1041
+ ? formatHourShort(period.hourStart, shownWindow.timeZone, hour12)
1042
+ : formatDayShort(period.day)}
1043
+ </td>
1044
+ {activeProviders.map((provider) => (
1045
+ <td
1046
+ key={provider}
1047
+ className={cn(
1048
+ "py-2 pl-4 text-right text-muted-foreground tabular-nums",
1049
+ figureClass(loadingProviders.has(provider)),
1050
+ )}
1051
+ >
1052
+ {formatUsd(period.byProvider.get(provider)?.costUsd ?? 0)}
1053
+ </td>
1054
+ ))}
1055
<td
1046
- key={provider}
1056
className={cn(
1048
- "py-2 text-right text-muted-foreground tabular-nums",
1049
- figureClass(loadingProviders.has(provider)),
1057
+ "py-2 pl-4 text-right text-foreground tabular-nums",
1058
+ figureClass(loadingPartial),
1059
)}
1060
>
1052
- {formatUsd(period.byProvider.get(provider)?.costUsd ?? 0)}
1061
+ {formatUsd(period.costUsd)}
1062
</td>
1054
- ))}
1055
- <td
1056
- className={cn(
1057
- "py-2 text-right text-foreground tabular-nums",
1058
- figureClass(loadingPartial),
1059
- )}
1060
- >
1061
- {formatUsd(period.costUsd)}
1062
- </td>
1063
- <td
1064
- className={cn(
1065
- "py-2 text-right text-muted-foreground tabular-nums",
1066
- figureClass(loadingPartial),
1067
- )}
1068
- >
1069
- {formatTokens(period.totalTokens)}
1070
- </td>
1071
- </tr>
1072
- ))
1073
- )}
1074
- </tbody>
1075
- </table>
1063
+ <td
1064
+ className={cn(
1065
+ "py-2 pl-4 text-right text-muted-foreground tabular-nums",
1066
+ figureClass(loadingPartial),
1067
+ )}
1068
+ >
1069
+ {formatTokens(period.totalTokens)}
1070
+ </td>
1071
+ </tr>
1072
+ ))
1073
+ )}
1074
+ </tbody>
1075
+ </table>
1076
+ </div>
1077
)}
1078
</section>
1079
</div>