Skip to content

Improve disconnected server recovery copy - #11827

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/improve-server-disconnected-copy
Jul 31, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/improve-server-disconnected-copy

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Change the outage toast to say “Can’t reach ” without overclaiming the cause.
  • Tell users to check that Orca is running on the server and that their network connection works.
  • Rename the action from “Retry” to “Try again.”

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

  • 25 focused runtime-status tests passed
  • Web typecheck passed
  • Focused lint and formatting passed
  • Localization catalog and extraction checks passed
  • Whitespace validation passed

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated 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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the user-visible change and validation, but it omits required screenshots, testing checklist, AI review, security audit, and notes sections. Add the required template sections and document screenshots or no visual change, full test status, AI review coverage, security review, and platform-specific notes.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: improving recovery copy for disconnected servers.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

This 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".

  • runtime-status.ts: toast title changed to "Can't reach {{hostName}}" / "Can't reach Orca server", description updated to include diagnostic steps, action label renamed; new i18n keys are correctly scoped to auto.store.slices.runtime.status instead of the previous WorktreeCard namespace.
  • en.json: three new localization keys added for the toast title variants and action label; the existing runtimeHostDisconnectedDescription key is updated in place.
  • runtime-status.test.ts: 25 tests updated to assert the new copy; retry / debounce / dismissal logic is verified unchanged.

Confidence Score: 4/5

Safe 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.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "Improve disconnected server recovery cop..." | Re-trigger Greptile

Comment on lines 78 to 86
? 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"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron QA

Validated 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.

pr-11827-runtime-outage-toast.png

@brennanb2025
brennanb2025 merged commit e493795 into main Jul 31, 2026
43 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant