Repository navigation
Improve disconnected server recovery copy - #11827
Conversation
📝 WalkthroughWalkthroughUpdated runtime disconnect toasts to identify unreachable environments and provide server and network troubleshooting guidance. Added translations for named-host errors, generic server errors, and the “Try again” action. Updated the related test expectation. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR replaces the passive "disconnected" toast wording with actionable recovery guidance and more accurate "Can't reach" framing, and renames the action button from "Retry" to "Try again".
Confidence Score: 4/5Safe to merge; all changes are UI copy and i18n keys with no logic modifications. The toast and sidebar tooltip now use different language for the same disconnected state — 'Can't reach' in the toast vs. 'disconnected' in the WorktreeCard tooltip — which may surface as a minor UX inconsistency for users who see both surfaces. Everything else is straightforward copy and key updates backed by focused tests. Files Needing Attention: WorktreeCard.tsx (not in this diff) still renders the old 'disconnected' wording for the same state; worth a follow-up if the 'Can't reach' framing is intended to be adopted app-wide.
|
| Filename | Overview |
|---|---|
| src/renderer/src/store/slices/runtime-status.ts | Toast title and action label updated from 'disconnected/Retry' to 'Can't reach/Try again'; description made actionable. Logic and retry flow are unchanged. New i18n keys are correctly scoped to the runtime-status namespace. |
| src/renderer/src/store/slices/runtime-status.test.ts | Test expectations updated to match the new toast title, description, and action label. Coverage is unchanged and all assertions remain accurate. |
| src/renderer/src/i18n/locales/en.json | Three new keys added under auto.store.slices.runtime.status and the existing runtimeHostDisconnectedDescription updated; old WorktreeCard keys remain intact and are still consumed by WorktreeCard.tsx. |
Sequence Diagram
sequenceDiagram
participant P as Status Poller
participant S as runtime-status slice
participant T as Sonner Toast
P->>S: setRuntimeEnvironmentStatus(env, null)
note over S: previous status was non-null
S->>T: "toast.warning("Can't reach Dev Box", {description, action:"Try again"})"
T-->>User: Toast visible (4 s)
User->>T: clicks "Try again"
T->>S: onClick → refreshRuntimeEnvironmentStatus(env)
S->>T: "toast.warning(..., {duration: Infinity})"
note over T: Toast stays open during retry
alt Server recovers
S->>S: setRuntimeEnvironmentStatus(env, status≠null)
S->>T: toast.dismiss(toastId)
else Still unreachable
S->>T: "toast.warning(..., {duration: 4000})"
note over T: Toast resets to 4 s timeout
end
Reviews (1): Last reviewed commit: "Improve disconnected server recovery cop..." | Re-trigger Greptile
| ? translate( | ||
| 'auto.components.sidebar.WorktreeCard.runtimeHostDisconnectedNamed', | ||
| '{{hostName}} disconnected', | ||
| 'auto.store.slices.runtime.status.runtimeHostUnreachableNamed', | ||
| "Can't reach {{hostName}}", | ||
| { hostName: environment.name } | ||
| ) | ||
| : translate( | ||
| 'auto.components.sidebar.WorktreeCard.runtimeHostDisconnected', | ||
| 'Server disconnected' | ||
| 'auto.store.slices.runtime.status.runtimeHostUnreachable', | ||
| "Can't reach Orca server" | ||
| ) |
There was a problem hiding this comment.
Toast and sidebar tooltip use inconsistent wording for the same state
The toast now reads "Can't reach {{hostName}}" while WorktreeCard.tsx (lines 1469–1477) still renders "{{hostName}} disconnected" in the sidebar tooltip for the same isRuntimeDisconnected condition. A user who sees the sidebar tooltip first and then the toast will encounter two different framings of the same event. If the intent is to ship the "Can't reach" copy app-wide, the corresponding fallback strings and translation keys in WorktreeCard.tsx should be updated to match.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Electron QAValidated the named-server outage toast in the intended PR worktree instance. Triggered a connected → unavailable transition for “QA Server” through the runtime-status store and confirmed the rendered title, recovery guidance, and “Try again” action. The backing store recorded the server as unreachable. |

Summary
User-facing copy
Title: “Can’t reach QA Server”
Message: “Check that Orca is running on this server and that your network connection is working, then try again.”
Action: “Try again”
Validation