feat(mobile): pool usage limits across selected environments #10334
Mergedjuliusmarmingemerged 3 commits into
main fromrefs/pull/10334/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- apps/mobile/src/features/usage/UsageRouteScreen.tsx line 138Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -119,3 +133,5 @@119133 });120134 };121135136+ const showEnvironmentFilter = environments.length > 0 || selectedEnvironmentIds !== null;137+ const hasLoadingEnvironments = selectedEnvironments.some(isUsageLoading);apps/mobile/src/features/usage/UsageRouteScreen.tsx lines 178 to 178OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -121,0 +158,21 @@158+ selectedEnvironmentIds === null || selectedEnvironmentIds.has(environment.environmentId)159+ ? ("on" as const)160+ : ("off" as const),161+ })),162+ ],163+ [environments, selectedEnvironmentIds],164+ );165+ const selectEnvironment = useCallback(166+ (value: string) => {167+ if (value === "all") {168+ setSelectedEnvironmentIds(null);169+ return;170+ }171+ const id = EnvironmentId.make(value);172+ setSelectedEnvironmentIds((selected) => {173+ const next = new Set(174+ selected ?? environments.map((environment) => environment.environmentId),175+ );176+ if (next.has(id)) next.delete(id);177+ else next.add(id);178+ return next.size === environments.length ? null : next;apps/mobile/src/features/usage/UsageRouteScreen.tsx line 338Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -221,4 +341,4 @@221341 const compact = props.size === "compact";222342 return (223343 <View224- accessibilityRole={props.role === "tab" ? "tablist" : undefined}344+ accessible={false}
- apps/mobile/src/features/usage/UsageRouteScreen.tsx line 249Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -154,20 +255 @@154- <View className="flex-row items-center gap-3">155- <SegmentedControl156- options={WINDOW_OPTIONS}157- selected={windowDays}158- onSelect={selectWindow}159- size="compact"160- className="flex-1"161- />162- <SegmentedControl163- options={METRIC_OPTIONS}164- selected={metric}165- onSelect={setMetric}166- size="compact"167- className="w-36"168- />169- </View>170- <UsageCoverageNotice171- environments={environments}172- merged={merged}173- isPartial={isPartial}255+ <Animated.View
juliusmarminge merged thisb155c21
juliusmarminge closed this
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed