GeezerVison is showing github.com — fix(web): a dismissed SSH connection no longer closes the reopened Add Environment dialog by only21mil · Pull Request #28867 · pingdotgg/t3code
Conversation
Problem
In the desktop app, if you start an SSH connection from Add Environment, dismiss the dialog while it says "Adding…", and open it again, the old connection's success closes the dialog you just reopened. #26160 already ignores a failure from a dismissed attempt, but a success still closed whatever dialog was open.
To reproduce: Settings → Environments → Add environment → SSH, enter a host, click Add environment, press Escape while it connects, click Add environment again, and wait for the connection to finish.
Change
The SSH success path now closes the dialog only if it still belongs to the session that started the request, using the same savedBackendSessionRef check the failure path already uses. The environment is still saved and the "Environment connected" toast still shows, because the connection really happened. #26160's reset on close is unchanged, and the busy flag still clears when the old request settles, as it does on failure.
Scope and approval
A one-line fix for an obvious bug, under CONTRIBUTING's exception for a very small, focused fix; there is no issue. It changes only the SSH path. The Remote link and T3 Connect paths are left as they are.
Verification
- Extended the existing
clears the form after dismissing it on SSH case in AddEnvironmentDialog.browser.test.tsx: dismiss a pending SSH attempt, reopen the dialog, let the attempt succeed, then check that the toast shows and the reopened form still takes input. On main this case fails, because the reopened form unmounts and the typing step never finds its field. With the fix, both tests in the file pass.
vp run check:changed against the base passes: format, lint, knip, typecheck, the changed test file and the React compiler check.
- Drove the Linux desktop dev build (Electron 44) through the UI against a real SSH host: add over SSH, press Escape while it connects, reopen, wait for success.
Host names, SSH targets and usernames are covered in all three captures.
The old connection is still connecting when the dialog is reopened (same on both builds):

Before: when the old connection succeeds, the reopened dialog closes.

After: the reopened dialog stays open and still takes input, and the toast still shows.

Not checked:
- macOS and Windows desktop builds.
- Remote link and T3 Connect flows, which this does not change.
- Web and mobile, which have no SSH option.
Prior PRs
Generated with Claude Opus 5.5 and GPT-6.1 Terra and GPT-6.1 Sol in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at 27a0f42
Macroscope's review found this PR approvable — An older SSH connection completion can no longer close and clear a reopened Add Environment dialog. The change only guards the dialog-close action; connection behavior and success notifications remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 1db31d0 and 27a0f42.
Files selected for processing: 2
-
apps/web/src/components/settings/AddEnvironmentDialog.browser.test.tsx
apps/web/src/components/settings/AddEnvironmentDialog.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Walkthrough
-
After a saved-backend SSH connection succeeds, the dialog closes only if the session captured before connecting still matches the current session. A browser test covers success after dismissal and reopening.
Changes: SSH connection and dialog session
| Layer / File(s) |
Summary |
Guard dialog closure by session apps/web/src/components/settings/AddEnvironmentDialog.tsx, apps/web/src/components/settings/AddEnvironmentDialog.browser.test.tsx |
The dialog closes after SSH success only when the captured session matches the current session. The browser test verifies that a late success shows the SSH-ready toast and preserves text in the reopened form. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#26160: Changes dialog mode and form fields on close; this PR addresses a late SSH success affecting the reopened dialog.
Suggested labels: bugfix, size:S
Suggested reviewers: mnigos
Merge Risk: Minimal · up to 27a0f
-
No concrete merge-blocking risk was identified; the change is mergeable with normal checks.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the main fix: a dismissed SSH connection no longer closes a reopened Add Environment dialog. |
| Description check |
 |
The description includes the problem, reproduction steps, implementation details, scope justification, focused test results, manual verification, screenshots, and known limitations. It satisfies the r… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description includes the problem, reproduction steps, implementation details, scope justification, focused test results, manual verification, screenshots, and known limitations. It satisfies the required template.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Opus 5.5 replying on behalf of Victor.
Closing this to bring my open PRs down under the new limit. The branch stays on my fork if it is useful.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|