From 3524b0facbfeb0c90ab355a0b430485c75536dac Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 26 Nov 2025 17:39:07 +0100 Subject: [PATCH] Remove active host notion from UI --- packages/app/src/app/git-diff.tsx | 2 +- packages/app/src/app/settings.tsx | 32 +++++-------------------------- plan.md | 4 +++- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/packages/app/src/app/git-diff.tsx b/packages/app/src/app/git-diff.tsx index 4bbfddcb0..5dc4484b2 100644 --- a/packages/app/src/app/git-diff.tsx +++ b/packages/app/src/app/git-diff.tsx @@ -65,7 +65,7 @@ export default function GitDiffScreen() { const connectionServerId = resolvedServerId ?? null; const connection = connectionServerId ? connectionStates.get(connectionServerId) : null; - const serverLabel = connection?.daemon.label ?? connectionServerId ?? session?.serverId ?? "Active host"; + const serverLabel = connection?.daemon.label ?? connectionServerId ?? session?.serverId ?? "Current host"; const connectionStatus = connection?.status ?? "idle"; const connectionStatusLabel = formatConnectionStatus(connectionStatus); const lastError = connection?.lastError ?? null; diff --git a/packages/app/src/app/settings.tsx b/packages/app/src/app/settings.tsx index 0eeb260b2..bff2f68c9 100644 --- a/packages/app/src/app/settings.tsx +++ b/packages/app/src/app/settings.tsx @@ -125,10 +125,6 @@ const styles = StyleSheet.create((theme) => ({ daemonCard: { gap: theme.spacing[2], }, - daemonCardActive: { - borderWidth: theme.borderWidth[1], - borderColor: theme.colors.palette.blue[500], - }, settingRow: { flexDirection: "row", justifyContent: "space-between", @@ -357,7 +353,7 @@ export default function SettingsScreen() { ? `${activeDaemon.label}${activeDaemonStatusLabel ? ` - ${activeDaemonStatusLabel}` : ""}${ isServerConfigLocked ? " - Session unavailable" : "" }` - : "No active host selected."; + : "Add a host to configure its server URL."; const serverHelperText = isServerConfigLocked ? `Connect to ${activeDaemon?.label ?? "this host"} to edit its server URL.` : "Must be a valid WebSocket URL (ws:// or wss://)"; @@ -522,13 +518,6 @@ export default function SettingsScreen() { [setDefaultDaemon] ); - const handleSetActiveDaemon = useCallback( - (profile: DaemonProfile) => { - setActiveDaemonId(profile.id, { source: "settings_switch" }); - }, - [setActiveDaemonId] - ); - const updateDaemonTestState = useCallback((daemonId: string, state: { status: "idle" | "testing" | "success" | "error"; message?: string }) => { setDaemonTestStates((prev) => { const next = new Map(prev); @@ -821,11 +810,9 @@ export default function SettingsScreen() { void; onSetDefault: (daemon: DaemonProfile) => void; onTestConnection: (daemon: DaemonProfile) => void; onEdit: (daemon: DaemonProfile) => void; @@ -1018,11 +1003,9 @@ interface DaemonCardProps { function DaemonCard({ daemon, - isActive, connectionStatus, lastError, testState, - onSetActive, onSetDefault, onTestConnection, onEdit, @@ -1043,7 +1026,7 @@ function DaemonCard({ : statusTone === "error" ? theme.colors.destructive : theme.colors.mutedForeground; - const badgeText = isActive ? `Active · ${statusLabel}` : statusLabel; + const badgeText = statusLabel; const connectionError = typeof lastError === "string" && lastError.trim().length > 0 ? lastError.trim() : null; const daemonSession = useSessionForServer(daemon.id); const [isRestarting, setIsRestarting] = useState(false); @@ -1104,7 +1087,7 @@ function DaemonCard({ if (!daemonSession) { Alert.alert( "Host unavailable", - `${daemon.label} is not connected. Select it to connect before restarting.` + `${daemon.label} is not connected. Wait for it to come online before restarting.` ); return; } @@ -1134,7 +1117,7 @@ function DaemonCard({ if (!daemonSession) { Alert.alert( "Host unavailable", - `${daemon.label} is not connected. Select it to connect before restarting.` + `${daemon.label} is not connected. Wait for it to come online before restarting.` ); return; } @@ -1165,7 +1148,7 @@ function DaemonCard({ }, [beginServerRestart, daemon.label, daemonSession, restartConfirmationMessage]); return ( - + {daemon.label} @@ -1189,11 +1172,6 @@ function DaemonCard({ ) : null} - {!isActive ? ( - onSetActive(daemon)}> - Set Active - - ) : null} onSetDefault(daemon)}> {daemon.isDefault ? "Default" : "Make Default"} diff --git a/plan.md b/plan.md index eaf6cdd15..0c3fc5505 100644 --- a/plan.md +++ b/plan.md @@ -18,9 +18,11 @@ The multi-daemon infrastructure is in place: session directory with daemon-scope - Settings screen, connection banners, error messages, modals, etc. - Internal code can keep "daemon" terminology; this is UI-only. - 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`). ### 2. Remove Active/Primary/Auto-Connect Concepts -- [ ] Remove the concept of "active daemon" from the UI and simplify to just "hosts". +- [x] Remove the concept of "active daemon" from the UI and simplify to just "hosts". + - Removed the Settings "Set Active" controls/labels, scrubbed the copy that mentioned an active host (including git diff fallback text), and left the per-host cards focused on status/default/test actions; no automated tests were run. - [ ] Remove the concept of "primary daemon"—no default host for actions. - [ ] Remove the "auto-connect" toggle from host settings—hosts always auto-connect when added. - [ ] Clean up any related state/UI that exposes these concepts to users.