Skip to content

network: fix VPN retry while a browser login is still waiting - #4464

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:vpn-saml-cancel-pending
Nov 28, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:vpn-saml-cancel-pending

Conversation

@Conava

@Conava Conava commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Description

A VPN that logs in through the browser (Fortinet SAML or GlobalProtect) kept waiting for that login for 5 minutes, while the row stopped showing Connecting... after 30 seconds. A retry then failed because the first login still held the redirect port but there was no way to cancel it anymore.

Now connecting any VPN replaces the waiting login, the row shows Connecting... for the whole login and clicking it cancels the login. Other VPNs stay usable while a login waits.

Cancelling ends it without a "Failed to connect VPN" toast, which also applies to cancelling the password prompt or a plugin's login dialog.

Other changes I made on the way that I noticed during testing:

  • VPNs can now be started from Settings -> Network -> Connections. Before, the connect failed right away without an error for every VPN type.
  • Credential prompts close when their request ends without an answer (cancelled or replaced login, timeout, or NetworkManager cancelling it). Before, they stayed open and could not be answered anymore. This adds a network.credentials.closed event (older shells ignore it), so the API had to be bumped.
  • The name and Connecting... label of a VPN or Wi-Fi row in the Control Center no longer move to the right once the row starts connecting.

No new terms to translate.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Fixes #4366

Screenshots / video

UI bugs fixed here, before:
screenshot_2026-11-28_15-25-27

After:
screenshot_2026-11-28_15-25-44

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

A Fortinet SAML or GlobalProtect login waited up to five minutes for
the browser while nothing tracked it: a retry started a second login
that could not bind the redirect port, and the Control Center row went
idle after 30 seconds with no way to cancel.

Browser logins from ConnectVPN and from the secret agent now share one
slot in the backend. Any new connect cancels the waiting login and
waits until it has closed its listener or ended gp-saml-gui (now run in
its own process group). Disconnect, disconnect all and deleting the
profile cancel it too, and NetworkManager's CancelGetSecrets ends a
login the agent started. A cancelled connect answers success:false
instead of an error, so no cancel shows a toast.

The network state carries vpnBrowserLoginUuid while a login waits. The
shell keeps that row on Connecting..., ends its busy state so other
VPNs stay usable, and turns a click on the row into a cancel when the
backend can act on it. Settings -> Network -> Connections now starts
VPN and WireGuard rows through the same connect path; before, those
activations got no secrets and failed silently.

Credential prompts that end without an answer from the shell (timeout,
CancelGetSecrets, a cancelled or replaced login) are announced on a new
network.credentials.closed event, and the shell closes the matching
prompt. API version 46.

The icon slot in SettingsRow is now sized on the Loader, since a
Loader keeps its last item's width after unloading; connecting rows in
the Control Center no longer shift their text.

Fixes duxlabs-dev#4366
@github-actions github-actions Bot added core Go daemon and CLI under core/ fix ui Quickshell UI under quickshell/ labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Docs pending: new network.credentials.closed subscription event (API v46), and network.vpn.connect now answering success: false for a cancelled login instead of an error
Checked: browser login replace/cancel lifecycle and locking, the agent CancelGetSecrets path, DisconnectVPN/DisconnectAllVPN connecting-state handling, the GP process-group kill, the broker closed-event cases, QML busy/request-sequence logic, the toggle/cancel paths in CC, bar and Settings, credential prompt closing, SettingsRow/spinner sizing, and deprecated shims. Model: claude-opus-5-5.

@bbedward
bbedward merged commit f23d5ad into duxlabs-dev:master Nov 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VPN retry fails while an earlier browser login is still waiting

2 participants