Remove auto-connect toggle from host settings

This commit is contained in:
Mohamed Boudra
2025-11-26 18:42:36 +01:00
parent db87f331fb
commit 737e8904be
2 changed files with 6 additions and 22 deletions

View File

@@ -372,9 +372,7 @@ export default function SettingsScreen() {
message: string;
} | null>(null);
const [isDaemonFormVisible, setIsDaemonFormVisible] = useState(false);
const [daemonForm, setDaemonForm] = useState<{ id: string | null; label: string; wsUrl: string; autoConnect: boolean }>(
{ id: null, label: "", wsUrl: "", autoConnect: true }
);
const [daemonForm, setDaemonForm] = useState<{ id: string | null; label: string; wsUrl: string }>({ id: null, label: "", wsUrl: "" });
const [isSavingDaemon, setIsSavingDaemon] = useState(false);
const [daemonTestStates, setDaemonTestStates] = useState<Map<string, DaemonTestState>>(() => new Map());
const isLoading = settingsLoading || daemonLoading;
@@ -482,17 +480,16 @@ export default function SettingsScreen() {
id: profile.id,
label: profile.label,
wsUrl: profile.wsUrl,
autoConnect: profile.autoConnect,
});
} else {
setDaemonForm({ id: null, label: "", wsUrl: "", autoConnect: true });
setDaemonForm({ id: null, label: "", wsUrl: "" });
}
setIsDaemonFormVisible(true);
}, []);
const handleCloseDaemonForm = useCallback(() => {
setIsDaemonFormVisible(false);
setDaemonForm({ id: null, label: "", wsUrl: "", autoConnect: true });
setDaemonForm({ id: null, label: "", wsUrl: "" });
}, []);
const handleSubmitDaemonForm = useCallback(async () => {
@@ -510,7 +507,6 @@ export default function SettingsScreen() {
const payload = {
label: daemonForm.label.trim(),
wsUrl: daemonForm.wsUrl.trim(),
autoConnect: daemonForm.autoConnect,
};
if (daemonForm.id) {
await updateDaemon(daemonForm.id, payload);
@@ -905,20 +901,6 @@ export default function SettingsScreen() {
autoCorrect={false}
keyboardType="url"
/>
<View style={styles.settingRow}>
<View style={styles.settingContent}>
<Text style={styles.settingTitle}>Auto-connect</Text>
<Text style={styles.settingDescription}>Connect automatically when Paseo launches.</Text>
</View>
<Switch
value={daemonForm.autoConnect}
onValueChange={(value) => setDaemonForm((prev) => ({ ...prev, autoConnect: value }))}
trackColor={{ false: defaultTheme.colors.palette.gray[700], true: defaultTheme.colors.palette.blue[500] }}
thumbColor={daemonForm.autoConnect ? defaultTheme.colors.palette.blue[400] : defaultTheme.colors.palette.gray[300]}
/>
</View>
<View style={styles.daemonFormActionsRow}>
<Pressable style={[styles.daemonActionButton, styles.daemonActionDestructive]} onPress={handleCloseDaemonForm}>
<Text style={[styles.daemonActionText, styles.daemonActionDestructiveText]}>Cancel</Text>

View File

@@ -20,6 +20,7 @@ The multi-daemon infrastructure is in place: session directory with daemon-scope
- Updated every user-facing string (settings, modals, placeholders, defaults) to say "host" and spot-checked via targeted searches; no automated tests were run.
- Context: Remaining "daemon" labels in git diff, file explorer, and agent detail screens now say "host" (updated `packages/app/src/app/git-diff.tsx`, `file-explorer.tsx`, `agent/[id].tsx`, and `agent/[serverId]/[agentId].tsx`).
- Review: Confirmed the agent redirect, file explorer, and git diff screens reflect the updated host wording with no lingering user-facing "daemon" strings.
- Review follow-up: Git Diff screen still showed the selected host as "Server"; updated the meta labels to "Host" to keep UI text consistent (`packages/app/src/app/git-diff.tsx`).
### 2. Remove Active/Primary/Auto-Connect Concepts
- [x] Remove the concept of "active daemon" from the UI and simplify to just "hosts".
@@ -27,7 +28,8 @@ The multi-daemon infrastructure is in place: session directory with daemon-scope
- Context: `GlobalFooter`, the create/import modals, the agent screen, and the agent list previously read/write `activeDaemonId`, forcing a global active host before routing; they now rely on explicit host IDs instead.
- [x] Remove the concept of "primary daemon"—no default host for actions.
- Eliminated the persisted `activeDaemonId`, flattened the session directory, and refactored `_layout`, realtime, settings, and agent UI to always resolve hosts explicitly so every host gets its own `SessionProvider`; verified via `npm run typecheck --workspace=@paseo/app`.
- [ ] Remove the "auto-connect" toggle from host settings—hosts always auto-connect when added.
- [x] Remove the "auto-connect" toggle from host settings—hosts always auto-connect when added.
- Removed the toggle from the host form so entries always auto-connect and verified with `npm run typecheck --workspace=@paseo/app`.
- [ ] Clean up any related state/UI that exposes these concepts to users.
### Review: No Silent Defaults