Skip to content
TypeScript

fix(mobile): project picker cards match the settings card color (#14756)

Julius Marmingece96e4c3de19
diff --git a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
index 374d17ac476..f0cebef2cee 100644
--- a/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
+++ b/apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
@@ -190,7 +190,7 @@ function ArchivedThreadRow(props: {
readonly thread: EnvironmentThreadShell;
}) {
const { width: windowWidth } = useWindowDimensions();
- const cardColor = useUniwindTheme()["--color-card"];
+ const cardColor = useUniwindTheme()["--color-grouped-card"];
const timestamp = relativeTime(props.thread.archivedAt ?? props.thread.updatedAt);
const subtitle = [props.environmentLabel, props.thread.branch].filter((part): part is string =>
Boolean(part),
@@ -224,7 +224,7 @@ function ArchivedThreadRow(props: {
>
{() => (
<View
- className={`flex-row items-center gap-3 bg-card px-4 py-3 ${props.isLast ? "" : "border-b border-separator"}`}
+ className={`flex-row items-center gap-3 bg-grouped-card px-4 py-3 ${props.isLast ? "" : "border-b border-separator"}`}
>
<View className="h-[34px] w-[34px] items-center justify-center rounded-[11px] bg-subtle">
<SymbolView
diff --git a/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx b/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
index df6f1983559..b0e25c6dcdb 100644
--- a/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
+++ b/apps/mobile/src/features/cloud/ConnectOnboardingRouteScreen.tsx
@@ -117,7 +117,7 @@ function ConfiguredConnectOnboardingRouteScreen() {
showHeader={false}
/>
) : (
- <View collapsable={false} className="rounded-[24px] bg-card p-5">
+ <View collapsable={false} className="rounded-[24px] bg-grouped-card p-5">
<Text className="text-sm leading-normal text-foreground-muted">
Sign in to your T3 account to set up T3 Connect.
</Text>
diff --git a/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx b/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
index bfcaf4013ab..1cf2dfd6b69 100644
--- a/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
+++ b/apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx
@@ -226,7 +226,7 @@ export function ConnectionsNewRouteScreen({
/>
</View>
) : (
- <View className="items-center gap-3 rounded-[24px] border-continuous bg-card px-5 py-8">
+ <View className="items-center gap-3 rounded-[24px] border-continuous bg-grouped-card px-5 py-8">
<Text className="text-center text-sm leading-normal text-foreground-muted">
Camera permission is required to scan a QR code.
</Text>
@@ -242,7 +242,7 @@ export function ConnectionsNewRouteScreen({
</View>
)
) : (
- <View collapsable={false} className="gap-4 rounded-[24px] bg-card p-4">
+ <View collapsable={false} className="gap-4 rounded-[24px] bg-grouped-card p-4">
<ConnectionFormField
label="Host"
autoCapitalize="none"
diff --git a/apps/mobile/src/features/projects/AddProjectScreen.tsx b/apps/mobile/src/features/projects/AddProjectScreen.tsx
index 7cdcd0d3349..cb4d0d415a7 100644
--- a/apps/mobile/src/features/projects/AddProjectScreen.tsx
+++ b/apps/mobile/src/features/projects/AddProjectScreen.tsx
@@ -175,8 +175,8 @@ function ListSection(props: { readonly children: ReactNode }) {
<View
className={
Platform.OS === "android"
- ? "overflow-hidden rounded-[28px] bg-card"
- : "overflow-hidden rounded-[24px] bg-card"
+ ? "overflow-hidden rounded-[28px] bg-grouped-card"
+ : "overflow-hidden rounded-[24px] bg-grouped-card"
}
>
{props.children}
@@ -197,6 +197,7 @@ function ListRow(props: {
if (Platform.OS === "android") {
return (
<MaterialListRow
+ className="bg-grouped-card"
title={props.title}
subtitle={props.subtitle}
leading={props.icon}
@@ -213,7 +214,7 @@ function ListRow(props: {
disabled={props.disabled}
onPress={props.onPress}
className={cn(
- "bg-card px-3.5 py-2.5 active:opacity-70",
+ "bg-grouped-card px-3.5 py-2.5 active:opacity-70",
!props.isFirst && "border-t border-border-subtle",
props.disabled && "opacity-[0.45]",
)}
@@ -448,7 +449,7 @@ function EmptyEnvironmentState() {
const navigation = useNavigation();
return (
- <View className="items-center gap-3 rounded-2xl bg-card px-5 py-8">
+ <View className="items-center gap-3 rounded-2xl bg-grouped-card px-5 py-8">
<Text className="text-center text-lg font-t3-bold">Environment unavailable</Text>
<Text className="text-center text-sm leading-normal text-foreground-muted">
Start or reconnect an environment before adding a project.
@@ -1333,7 +1334,7 @@ export function AddProjectDestinationScreen(props: {
<AddProjectShell title="Clone destination">
{error ? <ErrorBanner message={error} /> : null}
{repositoryTitle ? (
- <View className="rounded-[24px] bg-card px-4 py-3">
+ <View className="rounded-[24px] bg-grouped-card px-4 py-3">
<Text className="text-base font-t3-bold">{repositoryTitle}</Text>
<Text className="mt-0.5 text-xs text-foreground-muted" numberOfLines={2}>
{remoteUrl}
diff --git a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
index 28e49cbdb5b..930e6c1ec83 100644
--- a/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
+++ b/apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
@@ -54,6 +54,7 @@ function SelectionRow(props: {
if (Platform.OS === "android") {
return (
<MaterialListRow
+ className="bg-grouped-card"
title={props.title}
subtitle={props.subtitle}
leading={
@@ -85,7 +86,7 @@ function SelectionRow(props: {
accessibilityRole="radio"
accessibilityState={{ checked: props.selected }}
className={cn(
- "min-h-14 flex-row items-center gap-3 bg-card px-4 py-3 active:bg-subtle",
+ "min-h-14 flex-row items-center gap-3 bg-grouped-card px-4 py-3 active:bg-subtle",
!props.isLast && "border-b border-border-subtle",
)}
disabled={props.disabled}
@@ -131,7 +132,7 @@ function ToggleRow(props: {
readonly onValueChange: (value: boolean) => void;
}) {
return (
- <View className="min-h-14 flex-row items-center gap-3 bg-card px-4 py-3">
+ <View className="min-h-14 flex-row items-center gap-3 bg-grouped-card px-4 py-3">
<Text
className={cn(
"min-w-0 flex-1 text-base text-foreground",
@@ -192,8 +193,8 @@ function PickerSurface(props: { readonly children: ReactNode }) {
<View
className={
Platform.OS === "android"
- ? "overflow-hidden rounded-[28px] bg-card"
- : "overflow-hidden rounded-2xl bg-card"
+ ? "overflow-hidden rounded-[28px] bg-grouped-card"
+ : "overflow-hidden rounded-2xl bg-grouped-card"
}
>
{props.children}
diff --git a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
index 80a35eabd1c..1ba1409d797 100644
--- a/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
+++ b/apps/mobile/src/features/threads/NewTaskRouteScreen.tsx
@@ -314,8 +314,9 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
>
{canStartScratch && listScopes.length > 0 ? (
Platform.OS === "android" ? (
- <View collapsable={false} className="overflow-hidden rounded-[28px] bg-card">
+ <View collapsable={false} className="overflow-hidden rounded-[28px] bg-grouped-card">
<MaterialListRow
+ className="bg-grouped-card"
title="No project"
subtitle="Start a task without a project"
onPress={() => void startScratch()}
@@ -330,12 +331,12 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
/>
</View>
) : (
- <View collapsable={false} className="overflow-hidden rounded-[24px] bg-card">
+ <View collapsable={false} className="overflow-hidden rounded-[24px] bg-grouped-card">
<Pressable
accessibilityRole="button"
accessibilityLabel="No project"
onPress={() => void startScratch()}
- className="flex-row items-center gap-3 bg-card px-4 py-3.5"
+ className="flex-row items-center gap-3 bg-grouped-card px-4 py-3.5"
>
<View className="h-7 w-7 items-center justify-center">
<SymbolView
@@ -366,7 +367,7 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
collapsable={false}
className={cn(
"items-center gap-3 px-6 py-8",
- Platform.OS !== "android" && "rounded-[24px] bg-card",
+ Platform.OS !== "android" && "rounded-[24px] bg-grouped-card",
)}
>
{projectEmptyState.loading ? (
@@ -443,8 +444,8 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
collapsable={false}
className={
Platform.OS === "android"
- ? "overflow-hidden rounded-[28px] bg-card"
- : "overflow-hidden rounded-[24px] bg-card"
+ ? "overflow-hidden rounded-[28px] bg-grouped-card"
+ : "overflow-hidden rounded-[24px] bg-grouped-card"
}
>
{visibleScopes.map((scope, scopeIndex) => {
@@ -456,6 +457,7 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
if (Platform.OS === "android") {
return (
<MaterialListRow
+ className="bg-grouped-card"
key={scope.key}
title={scope.title}
subtitle={
@@ -488,7 +490,7 @@ export function NewTaskRouteScreen({ route }: StaticScreenProps<NewTaskRoutePara
accessibilityLabel={scope.title}
disabled={reservedDestinationProject !== null}
onPress={() => void selectProject(selectionTarget)}
- className="flex-row items-center gap-3 bg-card px-4 py-3.5"
+ className="flex-row items-center gap-3 bg-grouped-card px-4 py-3.5"
>
<View className="h-7 w-7 items-center justify-center">
<ProjectFavicon
diff --git a/apps/mobile/src/features/threads/ThreadSettingsRows.shared.tsx b/apps/mobile/src/features/threads/ThreadSettingsRows.shared.tsx
index 70a66704cdd..e9625e2f155 100644
--- a/apps/mobile/src/features/threads/ThreadSettingsRows.shared.tsx
+++ b/apps/mobile/src/features/threads/ThreadSettingsRows.shared.tsx
@@ -41,7 +41,7 @@ export function ModelRowContent(
<View
style={props.minimumHeight === undefined ? undefined : { minHeight: props.minimumHeight }}
className={cn(
- "mx-4 min-h-11 flex-row items-center gap-2 bg-card px-4",
+ "mx-4 min-h-11 flex-row items-center gap-2 bg-grouped-card px-4",
props.selectedClassName,
props.isFirst && "rounded-t-2xl",
props.isLast ? "rounded-b-2xl" : "border-b border-border-subtle",
@@ -123,7 +123,7 @@ export function ChoiceRowContent(props: ChoiceRowProps & RowSelectionProps) {
onPress={props.onPress}
style={props.minimumHeight === undefined ? undefined : { minHeight: props.minimumHeight }}
className={cn(
- "min-h-14 flex-row items-center gap-3 bg-card px-4 py-3 active:bg-subtle",
+ "min-h-14 flex-row items-center gap-3 bg-grouped-card px-4 py-3 active:bg-subtle",
!props.isLast && "border-b border-border-subtle",
)}
>
diff --git a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
index aedf415d02d..235d6c1e0f2 100644
--- a/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
+++ b/apps/mobile/src/features/threads/ThreadSettingsSheet.tsx
@@ -186,7 +186,7 @@ function DisclosureRow(props: {
accessibilityRole="button"
onPress={props.onPress}
className={cn(
- "min-h-11 flex-row items-center gap-2 bg-card px-4 py-2 active:bg-subtle android:min-h-14",
+ "min-h-11 flex-row items-center gap-2 bg-grouped-card px-4 py-2 active:bg-subtle android:min-h-14",
!props.isLast && "border-b border-border-subtle",
)}
>
@@ -216,7 +216,7 @@ function SwitchRow(props: {
return (
<View
className={cn(
- "min-h-11 flex-row items-center justify-between bg-card px-4 py-1",
+ "min-h-11 flex-row items-center justify-between bg-grouped-card px-4 py-1",
!props.isLast && "border-b border-border-subtle",
)}
>
@@ -700,7 +700,7 @@ function ThreadSettingsOptionsItem(props: {
<ChatGptSharingStatus provider={selectedProvider} />
<Text className="px-5 pb-2 pt-2 text-sm font-t3-medium text-foreground-muted">Options</Text>
<Animated.View
- className="mx-4 overflow-hidden rounded-2xl bg-card"
+ className="mx-4 overflow-hidden rounded-2xl bg-grouped-card"
layout={THREAD_SETTINGS_OPTIONS_LAYOUT_TRANSITION}
>
{session.displayedDescriptors.map((descriptor) => {
@@ -754,7 +754,7 @@ function ThreadSettingsOptionsItem(props: {
<Text className="px-5 pb-2 pt-7 text-sm font-t3-medium text-foreground-muted">
Catalog
</Text>
- <View className="mx-4 overflow-hidden rounded-2xl bg-card">
+ <View className="mx-4 overflow-hidden rounded-2xl bg-grouped-card">
<SwitchRow
isLast
label="Legacy models"
@@ -999,7 +999,7 @@ function ThreadSettingsChoiceContent(props: {
contentInsetAdjustmentBehavior="automatic"
showsVerticalScrollIndicator={false}
>
- <View className="overflow-hidden rounded-2xl bg-card">
+ <View className="overflow-hidden rounded-2xl bg-grouped-card">
{submenuContent.rows.map((row, index) => (
<ChoiceRow
key={row.id}
diff --git a/apps/mobile/src/features/usage/UsageLimitsPooled.tsx b/apps/mobile/src/features/usage/UsageLimitsPooled.tsx
index 36d01838b0e..713b9ffd160 100644
--- a/apps/mobile/src/features/usage/UsageLimitsPooled.tsx
+++ b/apps/mobile/src/features/usage/UsageLimitsPooled.tsx
@@ -100,7 +100,7 @@ function PoolWindowCard({
},
});
return (
- <View className="gap-3 rounded-[24px] border-continuous bg-card p-4">
+ <View className="gap-3 rounded-[24px] border-continuous bg-grouped-card p-4">
<View className="flex-row items-start justify-between gap-3">
<View className="gap-1">
<Text className="text-sm font-t3-medium text-foreground">{label ?? pool.label}</Text>
@@ -383,7 +383,7 @@ export function UsageLimitAccountScreen({ route }: AccountScreenProps) {
</Text>
) : null}
</View>
- <View className="gap-3 rounded-[24px] border-continuous bg-card p-4">
+ <View className="gap-3 rounded-[24px] border-continuous bg-grouped-card p-4">
<Text className="text-sm font-t3-medium text-foreground">{window.label}</Text>
<Text className="text-3xl font-t3-bold tabular-nums text-foreground">
{remainingPercent(window)}% left
@@ -403,7 +403,7 @@ export function UsageLimitAccountScreen({ route }: AccountScreenProps) {
</Text>
) : null}
</View>
- <View className="gap-2 rounded-[24px] border-continuous bg-card p-4">
+ <View className="gap-2 rounded-[24px] border-continuous bg-grouped-card p-4">
<Text className="text-sm font-t3-medium text-foreground">
{account.environments.length ? "Signed in" : "Source"}
</Text>
@@ -418,7 +418,7 @@ export function UsageLimitAccountScreen({ route }: AccountScreenProps) {
)}
</View>
{account.redeem && account.limits.resetCredits ? (
- <View className="gap-3 rounded-[24px] border-continuous bg-card p-4">
+ <View className="gap-3 rounded-[24px] border-continuous bg-grouped-card p-4">
<Text className="text-sm font-t3-medium text-foreground">Reset credits</Text>
<ResetCredits
key={account.key}
diff --git a/apps/mobile/src/features/usage/UsageRouteScreen.tsx b/apps/mobile/src/features/usage/UsageRouteScreen.tsx
index e846425af6f..5bb2713d6c8 100644
--- a/apps/mobile/src/features/usage/UsageRouteScreen.tsx
+++ b/apps/mobile/src/features/usage/UsageRouteScreen.tsx
@@ -457,7 +457,7 @@ function CursorEnableLimits({
<ProviderIcon provider="cursor" size={18} />
<Text className="text-base font-t3-medium text-foreground">Cursor</Text>
</View>
- <View className="items-start gap-3 rounded-[24px] border-continuous bg-card p-4">
+ <View className="items-start gap-3 rounded-[24px] border-continuous bg-grouped-card p-4">
<Text className="text-xs text-foreground-muted">{CURSOR_KEYCHAIN_COPY}</Text>
<View className="flex-row flex-wrap gap-2">
{environments.map((environment) => (
@@ -491,7 +491,7 @@ function ChartCard(props: {
const hasActivity = props.daily.some((period) => period.totalTokens > 0);
return (
- <View className="gap-4 rounded-[24px] border-continuous bg-card p-4">
+ <View className="gap-4 rounded-[24px] border-continuous bg-grouped-card p-4">
<View className="gap-0.5">
<Text className="text-sm text-foreground-muted">
{metric === "cost" ? "Raw token cost" : "Processed tokens"}