Skip to content

[codex] Allow removing stale remote backends while reconnecting#3247

Open
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:fix/reconnecting-backend-disconnect
Open

[codex] Allow removing stale remote backends while reconnecting#3247
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:fix/reconnecting-backend-disconnect

Conversation

@StiensWout

@StiensWout StiensWout commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow saved backend rows to disconnect while they are connecting or reconnecting
  • keep the existing connect action for available, offline, and error states
  • reuse the existing environment removal path instead of adding backend behavior
  • no tests were added; existing runtime coverage validates the removal path

Root cause

The saved backend row disabled its only action while the connection phase was connecting or reconnecting, so a stale backend could keep retrying without exposing the existing remove action.

Impact

Users can remove stale remote or SSH backends even while the client is retrying the connection. Connected and disconnected backend behavior is otherwise unchanged.

Validation

  • vp test run packages/client-runtime/src/connection/supervisor.test.ts -t "explicit disconnect"
  • vp test run packages/client-runtime/src/connection/registry.test.ts -t "remove"
  • vp test run packages/client-runtime/src/platform/storageDocument.test.ts
  • vp check
  • vp run typecheck

vp check reports the repository's existing 20 unrelated warnings and no errors.

Closes #3214

Note

Allow disconnecting backends that are in a connecting or reconnecting state

Updates SavedBackendListRow in ConnectionsSettings.tsx so the Disconnect button is active during connecting and reconnecting phases. Previously, the button was disabled and showed "Connecting…" during these phases; now it shows "Disconnect" and calls onRemove instead of onConnect.

Macroscope summarized 3f22b3c.


Note

Low Risk
Single-component UX change in Connections settings; disconnect still uses the established environment removal path with no auth or connection-layer edits in this diff.

Overview
Saved backend rows in Connections settings no longer lock the action button while the client is in connecting or reconnecting. The row treats those phases like a live session via canDisconnect, so the button stays enabled and shows Disconnect (or Disconnecting… while removal runs) instead of a disabled Connecting… state.

Connect is unchanged for disconnected, offline, and error phases; disconnect still goes through the existing onRemove / environment removal path—no new backend behavior.

Reviewed by Cursor Bugbot for commit 3f22b3c. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fb2a1b6e-659d-4d64-b380-769b305f18a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 20, 2026
@StiensWout StiensWout marked this pull request as ready for review June 20, 2026 09:28
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Simple UI change allowing the Disconnect button to be clickable during connection attempts, not just after connected. The change is self-contained to button state logic in a single settings component with no backend impact.

You can customize Macroscope's approvability policy. Learn more.

@StiensWout StiensWout changed the title [codex] Allow disconnecting reconnecting backends [codex] Allow removing stale remote backends while reconnecting Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Delete old remote environtment

1 participant