@devries-cameron20 / t3code Mirror · read-only / commits / 3ea9c43e05
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 04:15 UTC

fix(mobile): resize quota bars when filtering environments (#19031)

Alex committed Oct 18, 2026 at 12:25 UTC 3ea9c43e055d7c473d1727e979091324f24dc93f
1 file changed +30 -15
apps/mobile/src/features/usage/UsageLimitsPooled.tsx
+30 -15
@@ -50,23 +50,38 @@ function AccountSegment({
50 readonly pending: boolean;
51 }) {
52 const patternId = useId().replace(/:/g, "");
53 + const [size, setSize] = useState({ width: 0, height: 0 });
54 return (
54 - <Svg width="100%" height="100%" accessible={false}>
55 - <Defs>
56 - <Pattern id={patternId} width={6} height={6} patternUnits="userSpaceOnUse">
57 - <Path d="M-1 1L1 -1M0 6L6 0M5 7L7 5" stroke={color} strokeWidth={1} opacity={0.22} />
58 - </Pattern>
59 - </Defs>
60 - {pending ? (
61 - <Rect
62 - x={`${remaining}%`}
63 - width={`${100 - remaining}%`}
64 - height="100%"
65 - fill={`url(#${patternId})`}
66 - />
55 + <View
56 + pointerEvents="none"
57 + className="absolute inset-0"
58 + onLayout={(event) => {
59 + const { width, height } = event.nativeEvent.layout;
60 + setSize((previous) =>
61 + previous.width === width && previous.height === height ? previous : { width, height },
62 + );
63 + }}
64 + >
65 + {size.width > 0 && size.height > 0 ? (
66 + // Numeric canvas dimensions clear Android SVG geometry cached before a segment resized.
67 + <Svg width={size.width} height={size.height} accessible={false}>
68 + <Defs>
69 + <Pattern id={patternId} width={6} height={6} patternUnits="userSpaceOnUse">
70 + <Path d="M-1 1L1 -1M0 6L6 0M5 7L7 5" stroke={color} strokeWidth={1} opacity={0.22} />
71 + </Pattern>
72 + </Defs>
73 + {pending ? (
74 + <Rect
75 + x={`${remaining}%`}
76 + width={`${100 - remaining}%`}
77 + height="100%"
78 + fill={`url(#${patternId})`}
79 + />
80 + ) : null}
81 + <Rect width={`${remaining}%`} height="100%" fill={color} opacity={0.35} />
82 + </Svg>
83 ) : null}
68 - <Rect width={`${remaining}%`} height="100%" fill={color} opacity={0.35} />
69 - </Svg>
84 + </View>
85 );
86 }
87