Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(mobile): explain iOS-only settings on Android (#4981)

Daniel Vernon4db50757c0b6
diff --git a/apps/mobile/src/features/settings/SettingsRouteScreen.logic.test.ts b/apps/mobile/src/features/settings/SettingsRouteScreen.logic.test.ts
new file mode 100644
index 000000000..aec583d67
--- /dev/null
+++ b/apps/mobile/src/features/settings/SettingsRouteScreen.logic.test.ts
@@ -0,0 +1,19 @@
+import { describe, expect, it } from "vite-plus/test";
+
+import { resolveAgentAwarenessPlatformPresentation } from "./SettingsRouteScreen.logic";
+
+describe("resolveAgentAwarenessPlatformPresentation", () => {
+ it("explains that agent awareness settings are unavailable on Android", () => {
+ expect(resolveAgentAwarenessPlatformPresentation("android")).toEqual({
+ supported: false,
+ subtitle: "iOS only",
+ });
+ });
+
+ it("leaves supported iOS settings unchanged", () => {
+ expect(resolveAgentAwarenessPlatformPresentation("ios")).toEqual({
+ supported: true,
+ subtitle: undefined,
+ });
+ });
+});
diff --git a/apps/mobile/src/features/settings/SettingsRouteScreen.logic.ts b/apps/mobile/src/features/settings/SettingsRouteScreen.logic.ts
new file mode 100644
index 000000000..94fa5965e
--- /dev/null
+++ b/apps/mobile/src/features/settings/SettingsRouteScreen.logic.ts
@@ -0,0 +1,8 @@
+export function resolveAgentAwarenessPlatformPresentation(platform: string): {
+ readonly supported: boolean;
+ readonly subtitle: string | undefined;
+} {
+ return platform === "ios"
+ ? { supported: true, subtitle: undefined }
+ : { supported: false, subtitle: "iOS only" };
+}
diff --git a/apps/mobile/src/features/settings/SettingsRouteScreen.tsx b/apps/mobile/src/features/settings/SettingsRouteScreen.tsx
index bcf2ce386..b0e851b59 100644
--- a/apps/mobile/src/features/settings/SettingsRouteScreen.tsx
+++ b/apps/mobile/src/features/settings/SettingsRouteScreen.tsx
@@ -46,6 +46,7 @@ import { useSavedRemoteConnections } from "../../state/use-remote-environment-re
import { SettingsRow } from "./components/SettingsRow";
import { SettingsSection } from "./components/SettingsSection";
import { SettingsSwitchRow } from "./components/SettingsSwitchRow";
+import { resolveAgentAwarenessPlatformPresentation } from "./SettingsRouteScreen.logic";
type NotificationStatus = "checking" | "enabled" | "disabled" | "unsupported";
type LiveActivityStatus = "checking" | "enabled" | "disabled" | "signed-out" | "linking";
@@ -144,6 +145,7 @@ function ConfiguredSettingsRouteScreen() {
const preferencesResult = useAtomValue(mobilePreferencesAtom);
const savePreferences = useAtomSet(updateMobilePreferencesAtom);
const agentAwarenessPushAvailable = supportsAgentAwarenessPush();
+ const agentAwarenessPlatform = resolveAgentAwarenessPlatformPresentation(Platform.OS);
const insets = useSafeAreaInsets();
const navigation = useNavigation();
const { getToken, isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false });
@@ -473,10 +475,12 @@ function ConfiguredSettingsRouteScreen() {
icon="bell.badge"
label="Device Notifications"
disabled={
+ !agentAwarenessPlatform.supported ||
!agentAwarenessPushAvailable ||
notificationStatus === "checking" ||
notificationStatus === "unsupported"
}
+ subtitle={agentAwarenessPlatform.subtitle}
// Only reads as on when this device is actually registered with the
// relay; otherwise notifications cannot be delivered regardless of
// the local iOS permission.
@@ -487,6 +491,7 @@ function ConfiguredSettingsRouteScreen() {
/>
<SettingsSwitchRow
disabled={
+ !agentAwarenessPlatform.supported ||
!agentAwarenessPushAvailable ||
!isLoaded ||
liveActivityStatus === "checking" ||
@@ -494,6 +499,7 @@ function ConfiguredSettingsRouteScreen() {
}
icon="bolt.circle"
label="Live Activity Updates"
+ subtitle={agentAwarenessPlatform.subtitle}
// Same gate: a saved preference is meaningless until the device
// registration the relay needs to push updates has succeeded.
value={
diff --git a/apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx b/apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx
index 38d707e23..c6c835f11 100644
--- a/apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx
+++ b/apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx
@@ -11,6 +11,7 @@ export function SettingsSwitchRow(props: {
readonly disabled?: boolean;
readonly icon: SymbolName;
readonly label: string;
+ readonly subtitle?: string;
readonly value: boolean;
readonly onValueChange: (value: boolean) => void;
}) {
@@ -27,7 +28,12 @@ export function SettingsSwitchRow(props: {
}
>
<SymbolView name={props.icon} size={22} tintColor={icon} type="monochrome" weight="regular" />
- <Text className="flex-1 text-lg text-foreground">{props.label}</Text>
+ <View className="min-w-0 flex-1">
+ <Text className="text-lg text-foreground">{props.label}</Text>
+ {props.subtitle ? (
+ <Text className="text-sm text-foreground-muted">{props.subtitle}</Text>
+ ) : null}
+ </View>
<Switch
disabled={props.disabled}
ios_backgroundColor={track}