Skip to content

fix(cli): populate backend state before ActivateConnection#136

Merged
shazow merged 1 commit intoshazow:mainfrom
0xferrous:push-voxppywrrtkz
Feb 4, 2026
Merged

fix(cli): populate backend state before ActivateConnection#136
shazow merged 1 commit intoshazow:mainfrom
0xferrous:push-voxppywrrtkz

Conversation

@0xferrous
Copy link
Contributor

wifitui connect <ssid> (without a passphrase) calls ActivateConnection directly. On the NetworkManager backend this looks up the connection and access point in maps that are only populated by BuildNetworkList. The CLI path never called BuildNetworkList, so those maps were always empty and the command always failed with "connection not found".

Call BuildNetworkList(false) immediately before ActivateConnection in the CLI path. No scan is triggered — only the internal state is populated. The JoinNetwork path is left alone; it creates its own unsaved connection and already handles a missing AccessPoint gracefully.

`wifitui connect <ssid>` (without a passphrase) calls
ActivateConnection directly. On the NetworkManager backend this
looks up the connection and access point in maps that are only
populated by BuildNetworkList. The CLI path never called
BuildNetworkList, so those maps were always empty and the command
always failed with "connection not found".

Call BuildNetworkList(false) immediately before ActivateConnection
in the CLI path. No scan is triggered — only the internal state is
populated. The JoinNetwork path is left alone; it creates its own
unsaved connection and already handles a missing AccessPoint
gracefully.
Copy link
Owner

@shazow shazow left a comment

Choose a reason for hiding this comment

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

Good call, thanks!

IsSecure: isSecure,
IsVisible: true,
Security: security,
AutoConnect: false, // Can't autoconnect to a network we don't know
Copy link
Owner

Choose a reason for hiding this comment

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

Unrelated formatting change?

@shazow shazow merged commit edbd890 into shazow:main Feb 4, 2026
2 checks passed
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.

2 participants