Skip to content

fix(tabs): stop new connections from opening without a tab - #34

Merged
WolffTech merged 1 commit into
mainfrom
t3code/fix-connection-tab-opening
Sep 28, 2026
Merged

WolffTech merged 1 commit into
mainfrom
t3code/fix-connection-tab-opening

Conversation

@WolffTech

Copy link
Copy Markdown
Owner

Connecting to a machine sometimes started the session (the sidebar showed its badge) without opening a tab. The only way out was to restart the app.

The machine-details view is the app's main window. When sessions are open it appears as an extra tab, and its SwiftUI view is what turns new sessions into native tabs. Closing that tab (its close button, ⇧⌘W or the red window button) destroyed the window. From then on, every new session started without a tab until the app was restarted. The SSH host-key prompt that appeared at the same time was a coincidence.

The machine-details window now can't be closed while any session is open. Its close button is disabled and ⇧⌘W does nothing. You can still leave it by clicking another tab. Once the last session closes, the window can be closed again as before.

Testing

  • Reproduced the bug in a Debug build with a scratch library: showed machine details, closed that tab with ⇧⌘W, then used right-click → Connect. The session started and the host-key prompt appeared, but no tab opened.
  • With the fix, ⇧⌘W leaves the machine-details tab open, and right-click → Connect opens a new tab with the host-key prompt on top of it.
  • After closing every session, the window's close button works again.
  • The app test target passes (117 tests).
  • Not covered by automated tests: this path needs the full app and its SwiftUI windows running.

- Disable closing the browser window while sessions are open
- Prevent new sessions from starting without a tab
- Restore closing once the last session closes
@WolffTech
WolffTech merged commit 034d2e5 into main Sep 28, 2026
2 checks passed
@WolffTech
WolffTech deleted the t3code/fix-connection-tab-opening branch November 10, 2026 20:20
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