Clarify automatic host reconnection
This commit is contained in:
@@ -146,7 +146,7 @@ export function AgentList({ agentGroups }: AgentListProps) {
|
||||
</Text>
|
||||
<Text style={styles.sheetSubtitle}>
|
||||
{isActionDaemonUnavailable
|
||||
? "Connect this host before managing its agents."
|
||||
? "This host is offline—actions will be available once it reconnects automatically."
|
||||
: "Removing this agent only deletes it from Paseo. Claude/Codex keeps the original project."}
|
||||
</Text>
|
||||
<Pressable
|
||||
|
||||
@@ -336,7 +336,7 @@ function AgentFlowModal({
|
||||
const daemonAvailabilityError = !hasSelectedDaemon
|
||||
? "Select a host before creating or importing agents."
|
||||
: selectedDaemonIsUnavailable
|
||||
? `${selectedDaemonLabel} is ${selectedDaemonStatusLabel}. Connect to it before creating or importing agents.${
|
||||
? `${selectedDaemonLabel} is ${selectedDaemonStatusLabel}. We'll reconnect automatically and enable actions once it's online.${
|
||||
selectedDaemonLastError ? ` ${selectedDaemonLastError}` : ""
|
||||
}`
|
||||
: null;
|
||||
@@ -963,7 +963,7 @@ function AgentFlowModal({
|
||||
logOfflineDaemonAction("dictation");
|
||||
setErrorMessage(
|
||||
daemonAvailabilityError ??
|
||||
"Connect to the selected host before using dictation."
|
||||
"Dictation is unavailable until the selected host is online. Paseo reconnects automatically—try again once it comes back."
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -1035,8 +1035,8 @@ function AgentFlowModal({
|
||||
setIsImportLoading(false);
|
||||
logOfflineDaemonAction("import_list");
|
||||
setImportError(
|
||||
daemonAvailabilityError ??
|
||||
"Connect to the selected host to load import candidates."
|
||||
daemonAvailabilityError ??
|
||||
"Import candidates load automatically once the selected host is back online."
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -1288,7 +1288,8 @@ function AgentFlowModal({
|
||||
const trimmedWorkingDir = workingDir.trim();
|
||||
const shouldInspectRepo = isCreateFlow && isVisible && trimmedWorkingDir.length > 0;
|
||||
const repoAvailabilityError = shouldInspectRepo && (!isTargetDaemonReady || !isWsConnected)
|
||||
? daemonAvailabilityError ?? "Connect to the selected host to inspect the repository."
|
||||
? daemonAvailabilityError ??
|
||||
"Repository details will load automatically once the selected host is back online."
|
||||
: null;
|
||||
const repoInfoStatus: "idle" | "loading" | "ready" | "error" = !shouldInspectRepo
|
||||
? "idle"
|
||||
@@ -1367,7 +1368,7 @@ function AgentFlowModal({
|
||||
logOfflineDaemonAction("create");
|
||||
setErrorMessage(
|
||||
daemonAvailabilityError ??
|
||||
"Connect to the selected host before creating an agent."
|
||||
"Creating agents is temporarily unavailable while the selected host is offline. Paseo reconnects automatically—try again once it's online."
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -1463,8 +1464,8 @@ function AgentFlowModal({
|
||||
if (!resumeAgent || !isTargetDaemonReady) {
|
||||
logOfflineDaemonAction("resume");
|
||||
setImportError(
|
||||
daemonAvailabilityError ??
|
||||
"Connect to the selected host before importing an agent."
|
||||
daemonAvailabilityError ??
|
||||
"Importing agents will resume automatically once the selected host is online."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,10 +57,21 @@ export function GlobalFooter() {
|
||||
const realtimeEligibleHosts = useMemo(() => {
|
||||
return Array.from(connectionStates.values()).filter((entry) => entry.status === "online");
|
||||
}, [connectionStates]);
|
||||
const hasAnyConfiguredHosts = connectionStates.size > 0;
|
||||
|
||||
const handleStartRealtime = useCallback(() => {
|
||||
if (realtimeEligibleHosts.length === 0) {
|
||||
Alert.alert("No connected hosts", "Connect a host before starting realtime mode.");
|
||||
if (!hasAnyConfiguredHosts) {
|
||||
Alert.alert(
|
||||
"No hosts available",
|
||||
"Add a host in Settings before starting realtime mode."
|
||||
);
|
||||
return;
|
||||
}
|
||||
Alert.alert(
|
||||
"Hosts reconnecting",
|
||||
"Every host is offline right now. Paseo reconnects automatically—try realtime again once one comes online."
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (realtimeEligibleHosts.length === 1) {
|
||||
@@ -71,7 +82,7 @@ export function GlobalFooter() {
|
||||
return;
|
||||
}
|
||||
setShowRealtimeHostPicker(true);
|
||||
}, [realtimeEligibleHosts, startRealtime]);
|
||||
}, [hasAnyConfiguredHosts, realtimeEligibleHosts, startRealtime]);
|
||||
|
||||
const handleSelectRealtimeHost = useCallback(
|
||||
(daemonId: string) => {
|
||||
|
||||
Reference in New Issue
Block a user