@devries-cameron20 / t3code-1 / commits / 8f258f0216
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(usage): use each account accent colour in limit bars (#24630)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: maria-rcks <maria@kuuro.net>

Dan Fakkeldy committed Oct 31, 2026 at 05:34 UTC 8f258f02161afd67ebe97b9f2b224f9887ddcd45
6 files changed +21 -5
apps/mobile/src/features/threads/ComposerUsageLimits.tsx
+1
@@ -44,6 +44,7 @@ export function ComposerUsageLimits({
44 dense
45 first={index === 0}
46 driver={account.driver}
47 + accentColor={account.accentColor}
48 label={driverLabel}
49 instanceLabel={
50 account.instanceId
apps/mobile/src/features/usage/UsageLimitsPooled.tsx
+9 -2
@@ -1,6 +1,7 @@
1 import { useAtomValue } from "@effect/atom-react";
2 import { useNavigation, type StaticScreenProps } from "@react-navigation/native";
3 import { EnvironmentId } from "@t3tools/contracts";
4 +import { normalizeProviderAccentColor } from "@t3tools/client-runtime/state/provider-instance-display";
5 import {
6 collectLimitAccounts,
7 collectExternalUsageLinks,
@@ -253,7 +254,7 @@ function PoolWindowCard({
254 <View className="absolute inset-0 overflow-hidden rounded-md">
255 <AccountSegment
256 remaining={remainingPercent(window)}
256 - color={color}
257 + color={normalizeProviderAccentColor(account.accentColor) ?? color}
258 refillPercent={window.resetsAt ? member.refillPercent : 0}
259 />
260 </View>
@@ -324,6 +325,7 @@ function PoolWindowCard({
325 <View>
326 {pool.columns.map(({ account, window }, index) => {
327 if (!window) return null;
328 + const segmentColor = normalizeProviderAccentColor(account.accentColor) ?? color;
329 const credits = account.limits.resetCredits?.availableCount ?? 0;
330 const resetsIn = formatResetsIn(window, now);
331 return (
@@ -335,7 +337,12 @@ function PoolWindowCard({
337 onPress={() => openAccount(account)}
338 className="min-h-[44px] flex-row items-center gap-2 active:opacity-60"
339 >
338 - <View className="size-5 items-center justify-center overflow-hidden rounded-md bg-subtle-strong">
340 + <View className="relative size-5 items-center justify-center overflow-hidden rounded-md bg-subtle-strong">
341 + <View
342 + pointerEvents="none"
343 + className="absolute inset-0"
344 + style={{ backgroundColor: segmentColor, opacity: 0.35 }}
345 + />
346 <Text className="text-xs font-t3-medium tabular-nums text-foreground">
347 {index + 1}
348 </Text>
apps/mobile/src/features/usage/UsageLimitsSection.tsx
+4 -1
@@ -1,5 +1,6 @@
1 import * as Dialog from "../../components/ui/Dialog";
2 import { RegistryContext, useAtomMount, useAtomValue } from "@effect/atom-react";
3 +import { normalizeProviderAccentColor } from "@t3tools/client-runtime/state/provider-instance-display";
4 import {
5 AuthProvidersManageScope,
6 type EnvironmentId,
@@ -157,6 +158,7 @@ function AccountInstanceLabel({ value }: { readonly value: string }) {
158
159 export function AccountLimits(props: {
160 readonly driver: Driver;
161 + readonly accentColor?: string | undefined;
162 readonly label: string;
163 readonly instanceLabel: string;
164 readonly detail: string | undefined;
@@ -168,7 +170,8 @@ export function AccountLimits(props: {
170 readonly footer?: ReactNode;
171 }) {
172 const { limits, now, dense = false } = props;
171 - const color = useBarColor(props.driver);
173 + const providerColor = useBarColor(props.driver);
174 + const color = normalizeProviderAccentColor(props.accentColor) ?? providerColor;
175 if (!limits) return null;
176 const notice = limitsNotice(limits);
177 const externalUsage = limits.externalUsage;
apps/web/src/components/chat/ComposerUsageLimits.tsx
+1
@@ -132,6 +132,7 @@ function UsageLimitsBannerBody({
132 <LimitWindows
133 compact
134 driver={account.driver}
135 + accentColor={account.accentColor}
136 windows={account.limits.windows}
137 now={now}
138 />
apps/web/src/components/usage/UsageLimits.tsx
+4 -1
@@ -9,6 +9,7 @@ import {
9 UsageProviderKind,
10 } from "@t3tools/contracts";
11 import { useAtomValue } from "@effect/atom-react";
12 +import { normalizeProviderAccentColor } from "@t3tools/client-runtime/state/provider-instance-display";
13 import {
14 formatDuration,
15 formatResetsIn,
@@ -186,16 +187,18 @@ function WindowBar({
187
188 export function LimitWindows({
189 driver,
190 + accentColor,
191 windows,
192 now,
193 compact = false,
194 }: {
195 readonly driver: ServerProvider["driver"];
196 + readonly accentColor?: string | undefined;
197 readonly windows: ReadonlyArray<ServerProviderUsageWindow>;
198 readonly now: number;
199 readonly compact?: boolean;
200 }) {
198 - const color = barColor(driver);
201 + const color = normalizeProviderAccentColor(accentColor) ?? barColor(driver);
202 return (
203 <div
204 className={
apps/web/src/components/usage/UsageLimitsPooled.tsx
+2 -1
@@ -15,6 +15,7 @@ import {
15 remainingPercent,
16 } from "@t3tools/shared/usageLimits";
17 import type { Popover as PopoverPrimitive } from "@base-ui/react/popover";
18 +import { normalizeProviderAccentColor } from "@t3tools/client-runtime/state/provider-instance-display";
19 import { AlertTriangleIcon, ExternalLinkIcon, TicketIcon } from "lucide-react";
20 import {
21 createContext,
@@ -515,7 +516,7 @@ function PoolBar({
516 window={member.window}
517 reset={restores.get(member.account.key)}
518 refillPercent={member.refillPercent}
518 - color={color}
519 + color={normalizeProviderAccentColor(member.account.accentColor) ?? color}
520 now={now}
521 index={position + 1}
522 showAccountName={pool.columns.length > 1}