YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(chat): avoid assigning cloud connection failures to outages (#7243)
Ezra Ellette2a2476fe9400
diff --git a/apps/screenpipe-app-tauri/lib/chat/__tests__/provider-errors.test.ts b/apps/screenpipe-app-tauri/lib/chat/__tests__/provider-errors.test.tsindex 349d8dc4c..f4680f66c 100644--- a/apps/screenpipe-app-tauri/lib/chat/__tests__/provider-errors.test.ts+++ b/apps/screenpipe-app-tauri/lib/chat/__tests__/provider-errors.test.ts@@ -108,7 +108,7 @@ describe("provider error copy", () => {).toBeNull();});- it("maps screenpipe cloud connection errors to a transient-outage message", () => {+ it("maps screenpipe cloud connection errors to retry guidance without assigning a cause", () => {const msg = buildProviderErrorMessage("Connection error.", {provider: "screenpipe-cloud",model: "auto",@@ -116,6 +116,8 @@ describe("provider error copy", () => {expect(msg).toContain("screenpipe cloud");expect(msg?.toLowerCase()).toContain("try again");+ expect(msg).not.toContain("outage on our end");+ expect(msg).not.toContain("not your setup");// does not blame the user's own machine/setupexpect(msg?.toLowerCase()).not.toContain("ollama");});@@ -190,7 +192,7 @@ describe("provider error copy", () => {});expect(msg).toContain("screenpipe cloud");- expect(msg).toContain("outage on our end");+ expect(msg).toContain("try again");expect(msg).not.toContain("rate-limited");expect(msg).not.toContain("upgrade");});diff --git a/apps/screenpipe-app-tauri/lib/chat/provider-errors.ts b/apps/screenpipe-app-tauri/lib/chat/provider-errors.tsindex c3d2dde9d..8cf13aaa5 100644--- a/apps/screenpipe-app-tauri/lib/chat/provider-errors.ts+++ b/apps/screenpipe-app-tauri/lib/chat/provider-errors.ts@@ -121,13 +121,13 @@ function isConnectionLikeError(errorStr: string): boolean {export function isHostedScreenpipeProvider(provider?: string | null): boolean {// screenpipe's own hosted gateway (default chat preset + the Pi agent both- // route through api.screenpipe.com). A connection failure here is on us,- // not the user's machine.+ // route through api.screenpipe.com). This identifies the destination, not+ // whether a connection failure originated at the service or on the network.return provider === "screenpipe-cloud" || provider === "pi";}export function buildCloudConnectionMessage(): string {- return "Can't reach screenpipe cloud right now — this is usually a brief outage on our end, not your setup. Wait a few seconds and try again.";+ return "Can't reach screenpipe cloud right now. Wait a few seconds and try again. If it keeps happening, check your internet connection and send feedback so we can investigate.";}export function buildRemoteConnectionMessage(provider?: string | null): string {diff --git a/docs/evidence/cloud-connection-copy/before-after.png b/docs/evidence/cloud-connection-copy/before-after.pngnew file mode 100644index 000000000..cfe2cc926Binary files /dev/null and b/docs/evidence/cloud-connection-copy/before-after.png differ