Skip to content

Commit efc68b6

Browse files
fix(mobile): place offline preference inside Zack settings
1 parent 080cb94 commit efc68b6

4 files changed

Lines changed: 19 additions & 16 deletions

File tree

‎apps/mobile/src/features/home/HomeScreen.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ export function HomeScreen(props: HomeScreenProps) {
758758
) : props.hideOfflineEnvironments ? (
759759
<EmptyState
760760
title="No visible threads"
761-
detail="Turn off Hide offline environments in Settings → Labs → Zack, or choose another filter."
761+
detail="Turn off Hide offline environments in Settings → Labs → Zack settings, or choose another filter."
762762
variant={Platform.OS === "android" ? "plain" : undefined}
763763
/>
764764
) : v2ScopedProjectGroup !== null ? (

‎apps/mobile/src/features/settings/SettingsServerControlsRouteScreen.tsx‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import { ModelEvaluationSettings } from "./ModelEvaluationSettings";
4545
import { SkillsLibrarySettings } from "./SkillsLibrarySettings";
4646
import { AutoSettleSettingsRows, ThreadSplitSettingsSection } from "./ThreadSettingsSections";
4747
import { supportsSharedSettingsSync } from "@t3tools/client-runtime/state/shared-settings";
48+
import { useHomeListOptions } from "../home/home-list-options";
49+
import { useEnvironments } from "../../state/environments";
4850

4951
type SettingsPage = "threads" | "source-control" | "worktrees" | "maintenance" | "zack";
5052

@@ -182,6 +184,10 @@ export function SettingsZackRouteScreen() {
182184
}
183185

184186
function ServerSettingsDetail(props: { readonly page: SettingsPage }) {
187+
const { environments } = useEnvironments();
188+
const { options, setHideOfflineEnvironments } = useHomeListOptions(
189+
new Set(environments.map((environment) => environment.environmentId)),
190+
);
185191
const environmentMenu = useSettingsEnvironmentMenu();
186192
const insets = useSafeAreaInsets();
187193
const navigation = useNavigation();
@@ -310,6 +316,17 @@ function ServerSettingsDetail(props: { readonly page: SettingsPage }) {
310316
contentContainerClassName="gap-6 px-5 pt-4"
311317
contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
312318
>
319+
{props.page === "zack" ? (
320+
<SettingsSection title="Threads">
321+
<SettingsSwitchRow
322+
icon="wifi.slash"
323+
label="Hide offline environments"
324+
subtitle="Hide threads from offline environments on this device."
325+
value={options.hideOfflineEnvironments}
326+
onValueChange={setHideOfflineEnvironments}
327+
/>
328+
</SettingsSection>
329+
) : null}
313330
{!hasConnectedSelection || reference === null ? (
314331
<Text className="px-2 text-base text-foreground-muted">
315332
{projectSelected

‎apps/mobile/src/features/settings/ThreadSettingsSections.tsx‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useHomeListOptions } from "../home/home-list-options";
21
import { Button } from "../../components/ui/Button";
32
import {
43
AuthSettingsWriteScope,
@@ -36,10 +35,6 @@ import {
3635
} from "./settings-scoped-server";
3736

3837
export function SettingsLabsRouteScreen() {
39-
const { environments } = useEnvironments();
40-
const { options, setHideOfflineEnvironments } = useHomeListOptions(
41-
new Set(environments.map((environment) => environment.environmentId)),
42-
);
4338
const insets = useSafeAreaInsets();
4439
const navigation = useNavigation();
4540

@@ -59,15 +54,6 @@ export function SettingsLabsRouteScreen() {
5954
value="Memory, summaries, skills, thread suggestions, evaluations"
6055
onPress={() => navigation.navigate("SettingsZack")}
6156
/>
62-
<View className="border-t border-border-subtle">
63-
<SettingsSwitchRow
64-
icon="wifi.slash"
65-
label="Hide offline environments"
66-
subtitle="Hide threads from offline environments on this device."
67-
value={options.hideOfflineEnvironments}
68-
onValueChange={setHideOfflineEnvironments}
69-
/>
70-
</View>
7157
</SettingsSection>
7258
<ToolCallVisibilitySection />
7359
<BetaSettingsSection />

‎apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ function ThreadNavigationSidebarPane(props: ThreadNavigationSidebarProps) {
570570
? "Searching thread messages…"
571571
: "No matching threads"
572572
: options.hideOfflineEnvironments
573-
? "No visible threads. Turn off Hide offline environments in Settings → Labs → Zack, or choose another filter."
573+
? "No visible threads. Turn off Hide offline environments in Settings → Labs → Zack settings, or choose another filter."
574574
: selectedProjectScope !== null
575575
? `No threads in ${selectedProjectScope.title}`
576576
: "No threads yet"}

0 commit comments

Comments
 (0)