The best way to control Claude Code, Codex and more from any computer or phone
fix: hide email-bearing account labels in usage limits (#10668)
Julius Marminge committed
Sep 7, 2026 at 21:01 UTC
6ba15c027a6d411c7f75cc0ca59b601a295c3633
2 files changed
+52
-7
apps/mobile/src/features/usage/UsageLimitsSection.tsx
+24
-3
@@ -97,6 +97,29 @@ function WindowRow(props: {
97
);
98
}
99
100
+function AccountInstanceLabel({ value }: { readonly value: string }) {
101
+ const [revealed, setRevealed] = useState(false);
102
+ if (!value.includes("@")) {
103
+ return (
104
+ <Text className="shrink text-xs text-foreground-tertiary" numberOfLines={1}>
105
+ · {value}
106
+ </Text>
107
+ );
108
+ }
109
+ return (
110
+ <Pressable
111
+ className="shrink active:opacity-60"
112
+ accessibilityRole="button"
113
+ accessibilityLabel={revealed ? "Hide account label" : "Reveal account label"}
114
+ onPress={() => setRevealed((current) => !current)}
115
+ >
116
+ <Text className="text-xs text-foreground-tertiary" numberOfLines={1}>
117
+ · {revealed ? value : "••••••@••••••"}
118
+ </Text>
119
+ </Pressable>
120
+ );
121
+}
122
+
123
/** One account: icon, name and plan on a single line, then its windows. */
124
export function AccountLimits(props: {
125
readonly driver: Driver;
@@ -128,9 +151,7 @@ export function AccountLimits(props: {
151
<View className="min-w-0 flex-1 flex-row items-baseline gap-2">
152
<Text className="text-base font-t3-medium text-foreground">{props.label}</Text>
153
{props.instanceLabel !== props.label ? (
131
- <Text className="shrink text-xs text-foreground-tertiary" numberOfLines={1}>
132
- · {props.instanceLabel}
133
- </Text>
154
+ <AccountInstanceLabel key={props.instanceLabel} value={props.instanceLabel} />
155
) : null}
156
{props.detail ? (
157
<Text className="shrink text-sm text-foreground-muted" numberOfLines={1}>
apps/web/src/components/chat/ComposerUsageLimits.tsx
+28
-4
@@ -3,6 +3,7 @@ import { limitsNotice } from "@t3tools/shared/usageLimits";
3
import { GaugeIcon } from "lucide-react";
4
5
import { getDriverOption } from "../settings/providerDriverMeta";
6
+import { RedactedSensitiveText } from "../settings/RedactedSensitiveText";
7
import { LimitWindows, ResetCredits } from "../usage/UsageLimits";
8
import { ComposerBanner } from "./ComposerBanner";
9
import type { ComposerBannerStackItem } from "./ComposerBannerStack";
@@ -20,6 +21,27 @@ function accountLabel(account: UsageLimitsReport["accounts"][number]): string {
21
: driver;
22
}
23
24
+function AccountSummary({ account }: { readonly account: UsageLimitsReport["accounts"][number] }) {
25
+ const label = accountLabel(account);
26
+ return (
27
+ <>
28
+ {label.includes("@") ? (
29
+ <RedactedSensitiveText
30
+ key={label}
31
+ value={label}
32
+ ariaLabel="Toggle account label visibility"
33
+ revealTooltip="Click to reveal account"
34
+ hideTooltip="Click to hide account"
35
+ className="max-w-full truncate align-bottom font-sans text-xs leading-normal"
36
+ />
37
+ ) : (
38
+ label
39
+ )}
40
+ {account.plan ? ` · ${account.plan}` : null}
41
+ </>
42
+ );
43
+}
44
+
45
/** The /usage-limits result as a composer notice: it stacks under warnings and dismisses like one. */
46
export function usageLimitsBannerItem(
47
id: string,
@@ -29,9 +51,11 @@ export function usageLimitsBannerItem(
51
): ComposerBannerStackItem {
52
const [first] = report.accounts;
53
const single = report.accounts.length === 1 && first ? first : null;
32
- const summary = single
33
- ? [accountLabel(single), single.plan].filter(Boolean).join(" · ")
34
- : `${report.accounts.length} accounts`;
54
+ const summary = single ? (
55
+ <AccountSummary account={single} />
56
+ ) : (
57
+ `${report.accounts.length} accounts`
58
+ );
59
return {
60
id,
61
variant: "info",
@@ -65,7 +89,7 @@ function UsageLimitsBannerBody({
89
<div key={account.id} className="flex min-w-0 flex-col gap-1">
90
{report.accounts.length > 1 ? (
91
<span className="truncate text-xs text-muted-foreground">
68
- {[accountLabel(account), account.plan].filter(Boolean).join(" · ")}
92
+ <AccountSummary account={account} />
93
</span>
94
) : null}
95
{notice ? (