Skip to content

feat: improve Wi-Fi networks handling#2247

Merged
imobachgs merged 61 commits intomasterfrom
better-network
Apr 21, 2025
Merged

feat: improve Wi-Fi networks handling#2247
imobachgs merged 61 commits intomasterfrom
better-network

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Apr 6, 2025

Working with Wi-Fi networks is not as reliable as it should be (see #2210 as an example). Additionally, the current UI is somewhat different from the rest of Agama and we are not happy with the internals either.

Old network page

old-ui-connect

Old form to connect to a Wi-Fi network

old-ui-connect

Improved user interface

This PR introduces important changes to the user interface to make the network page similar to the rest of Agama:

  • The list of Wi-Fi networks is now visible in the network page.
  • Use a regular form to connect to a Wi-Fi network instead of that alien "drawer" component.
  • Drop the "disconnect" and "forget" actions. More about that in the following section.
List of Wi-Fi networks.

new-network-page

Form to connect to a network

new-ui-connect

Authentication error

new-ui-connect-error

Connection details page (with some bugs)

new-ui-connection-details

Simplifying the process

While improving the user interface, we decided to drop the "disconnect" and "forget" actions and the possibility to connect to a hidden network. Of course, it does not mean that they are gone forever.

In the case that you are using a Wi-Fi network for installing your system, we just expect you to connect to that single network and continue with the installation process. If you decide to connect to a different network, you will be disconnected from the previous one.

About "forgetting" a network, it means that the configuration will not be copied to the installed system. Is that reasonable for a network you just configured at installation time? Moreover, we have an open discussion about which part of the network configuration should be copied to the installed system. Let's solve that problem first.

Finally, it is not possible to connect to a hidden network anymore. Nobody asked for this feature and it needs some serious rework (AGM-148, internal link).

Better error reporting

Reporting a connection error is usually tricky: Agama asks NetworkManager to connect and listens for the proper events. The backend does now a better job on this area, making it slightly easier for the UI to detect authentication errors.

Additionally, the back-end does not emit duplicated events about changes in the network devices anymore.

State management

As a consequence of all this changes, we have simplified the state management of the network UI. We dropped some pieces of state and improved how device changes are handled.

@imobachgs imobachgs requested review from Copilot and removed request for Copilot April 6, 2025 09:29

This comment was marked as outdated.

@agama-project agama-project deleted a comment from Copilot AI Apr 6, 2025
imobachgs and others added 14 commits April 7, 2025 06:51
Improved visual presentation by reducing clutter and enhancing
accessibility (a11y).

This is a work in progress with no unit tests yet, but it's being sent
for presentation purposes.
Still work in progress, but sent for presentation purpose.
The utils#isEmpty function was incorrectly identifying non-empty arrays
as empty due to missing handling for arrays.
Although it is not perfect yet, specially because of how IPs for
connected network are displayed, it can be considered finished for the
current iteration
Mainly performing below changes

  - Improve wording
  - Sort available Wi-Fi networks by status and signal strength
  - Reorder details for small screens: device now appears first
  - Add prop to control display of IP address for connected network
  - Remove outdated FIXMEs
Add a new route for connection details, which is currently rendered
separately from wireless connections. In the future, these may be
rendered by the same component.

Additionally, a new component is introduced to display a list of wired
connections, similar to how Wi-Fi networks are presented.
For making use of new components and improving the wording a bit.
Adjust the layout of the IP settings form to display in a single column,
aligning it with the rest of the forms. This commit focuses only on the
layout change. Further improvements and bug fixes must be addressed in
future updates.
To make them looks like the rest of actions.
imobachgs and others added 14 commits April 10, 2025 23:52
A value returned by a network query was a plain object instead of a
Connection object, making a later mutation crash because of ".toApi" not
defined.
After adapting it to latest changes in the backend to know a conneciton
state. It still having room for improvements, though.
Although some examples has to be skipped by now to evaluate if they
actually belongs to the test.
By filtering it by the connection id instead of network ssid.
For changing where query the connection state, if any.
@dgdavid dgdavid marked this pull request as ready for review April 16, 2025 10:45
@teclator
Copy link
Contributor

As a first step for improving the handling of wireless configuration and also the device and connections events looks good to me although there are some changes that I was not sure about like not offering a way to remove connections at all, but keep it as it is by now.

The problem with the signal sorting is still there, with these two commits should be solved:

Copy link
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM: please update the changelog entry.

@imobachgs imobachgs merged commit 99e2828 into master Apr 21, 2025
17 checks passed
@imobachgs imobachgs deleted the better-network branch April 21, 2025 13:40
imobachgs added a commit that referenced this pull request Apr 22, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Apr 23, 2025
https://build.opensuse.org/request/show/1272124
by user IGonzalezSosa + anag_factory
- Version 14

- CLI: wait a bit between selecting the product to install and
  registering it so the Web UI has enough time to process all
  events (gh#agama-project/agama#2274)

- Allow to log in into multiple systems (gh#agama-project/agama#2261).
- Do not interactively ask for accepting insecure connections.

- Report and emit changes to the connections states. (gh#agama-project/agama#2247).
- Do not write wireless security settings when they are not used.

- Add missing help to finish command (gh#agama-project/agama#2272).

- Replace --api option by --host (gh#agama-project/agama#2271).

- Prevent agama-web-server from getting stuck in the POST
  /api/profile/autoyast calls (gh#agama-project/agama#2259).
- Temporarily disable AutoYaST profiles fetch errors.

- Allow to specify extra ker
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Apr 23, 2025
https://build.opensuse.org/request/show/1272125
by user IGonzalezSosa + anag_factory
- Version 14

- Process the product changed event so the UI can better react on
  registering the product shortly after that
  (gh#agama-project/agama#2274)

- Rework the network page to (gh#agama-project/agama#2247):
  - Fix several problems with Wi-Fi networks handling.
  - Improve error reporting when the connection failed.
  - Use a regular form to connect, instead of the old "drawer"
    component.
  - Drop the "disconnect" and "forget" actions by now.
  - Reduce the amount of requests to the backend.

- Shorten storage device names.
- Move LVM logical volumes to partitions, if possible.
- Add MenuButton component (gh#agama-project/agama#2241).

- Improve the interface to display and edit the iSCSI initiator
  (bsc#1239046, bsc#1231385, gh#agama-project/agama#2269).

- Fix flickering i
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.

4 participants