Skip to content

feat(ui): block on external storage changes#2640

Merged
joseivanlopez merged 43 commits intomasterfrom
ui-sync
Aug 7, 2025
Merged

feat(ui): block on external storage changes#2640
joseivanlopez merged 43 commits intomasterfrom
ui-sync

Conversation

@joseivanlopez
Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez commented Aug 6, 2025

imobachgs and others added 30 commits July 30, 2025 14:01
* Just for demonstration purposes. This commit should be reverted.
Introduce a reusable component that listens for change events on a given
scope and displays a toast alert when the change comes from a different
client.

This helps notify users when the interface may be out of sync due to
external changes, without forcing a reload or disrupting their workflow.

Its usage is straightforward and consists of mounting one instance per
watched scope in the desired pages. In future iterations, the component
may support accepting multiple scopes if a real need for that arises.
By making sentence shorter and not using "Please".
Listen for the event that provides the ID assigned by the server and
store it internally. This allows the client to use its ID when needed,
for example, to determine when to show an out-of-sync alert triggered by
events from other clients.
Allow using the `replace` prop in core/Link to support replacing the
current history entry during navigation. This enables using core/Link
instead of react-router-dom/Link to maintain consistent look and feel
across the app, as core/Link is built on top of PF/Button.
To avoid real execution of react-router-dom/useLinkClickHandler, now
used at core/Link
## Problem

This PR adds a client ID that can be used in signals, making it easy to
find out who originated a change.

## Solution

Add an UUID as a client ID to the JWT. Any handler can access the client
ID using the [Axum's Extension
extractor](https://docs.rs/axum/latest/axum/struct.Extension.html).
Accessing the client ID is easy (see 018478c).

## Testing

- *Tested manually*
By using the locationReload util instead of just "navigating to the same
place", since this does not work for storage.
Introduce a reusable component that listens for change events on a given
scope and displays a toast alert when the change was originated from a
different client.

This helps notify users when the interface may be out of sync due to
external changes, without forcing a reload and disrupting their workflow
abruptly.

Its usage is straightforward, consisting on mounting one instance per
watched scope in the desired pages. In future iterations, the component
may support accepting multiple scopes if a real need for that arises.
- For example, when there are several attempts to calculate a valid
  proposal.
- Includes the client_id as part of the event.
Prevent errors when a device no longer exists, whether due to a mistyped
URL or changes in the underlying system.

It does so by introducing a new core component as a first step toward
unifying how Agama handles forms and pages that rely on URL parameters.
While this is an initial implementation, further refinement will be
needed as adoption grows and ergonomic improvements are identified to
make it fully adaptable and developer-friendly.
To show the out-of-sync alert when proceed.
This reverts commit 2bbc686.
I.e., only if changes in storage were originated by an action of the
same client.

It also drops some dead code and an unwanted hasResult condition.
Using the StorageChanged signal and the clientId prop to determine if
the lasd changes are valid or not.
But still needing test since it is not fully working as expected.
- The out-of-sync alert is shown in all pages.
### Problem

The storage UI does not automatically refresh when other clients perform
changes (e.g., after loadig a config using the CLI). This happens to
both the storage page and the storage section in the overview page.

### Solution

Shows a blocking popup when there are storage changes performed by other
clients. The user must click on reload in order to continue.
@coveralls
Copy link
Copy Markdown

coveralls commented Aug 6, 2025

Coverage Status

coverage: 64.089% (-0.008%) from 64.097%
when pulling 8cc6ebc on ui-sync
into 22dee96 on master.

@joseivanlopez joseivanlopez marked this pull request as ready for review August 6, 2025 13:00
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

I'm approving this because all the changes have already been reviewed as part of previous pull requests into ui-sync

- EFI partition does not require 1 GiB by default (only if BLS
  was explicit selected in the control file).
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

Re-approved with the fixed mocking.

@joseivanlopez joseivanlopez merged commit 3b4bb57 into master Aug 7, 2025
21 checks passed
@joseivanlopez joseivanlopez deleted the ui-sync branch August 7, 2025 07:24
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Aug 13, 2025
…ia SR 1299041

https://build.opensuse.org/request/show/1299041
by user IGonzalezSosa + dimstar_suse
- Do not use 'retry' as default answer for questions (bsc#1247436).

- Emit D-Bus signal when storage is configured, including the
  client id (gh#agama-project/agama#2640).

- Fix MD RAID config checker to avoid generating a list of issues
  including a false value (bsc#1247557, bsc#1247585).

- Do not set selinux policy during installation and lets keep
  defaults provided by packages
  (bsc#1247046)
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Aug 13, 2025
https://build.opensuse.org/request/show/1299043
by user IGonzalezSosa + dimstar_suse
- Split progress details into two lines for better readability
  (gh#agama-project/agama#2647).

- Improve layout and accuracy of wired connection details view
  (bsc#1247430, gh#agama-project/agama#2639).

- Block UI if storage is configured by any other client
  (gh#agama-project/agama#2640).
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Aug 13, 2025
https://build.opensuse.org/request/show/1299101
by user IGonzalezSosa + dimstar_suse
- Allow to "add" or "remove" patterns from the current or defined
  user selection patterns list (bsc#1247456).

- Automatically retry registration when a network error happens
  during autoinstallation (bsc#1246990)

- Emit HTTP event when storage is configured, including the client
  id (gh#agama-project/agama#2640).

- Do not return an Err when a connection is not activated or
  deactivated when adding or updating it but just log the error
  and write the connections profiles (bsc#1245548).

- Fixed "agama config edit" when used with a remote --host option
  (gh#agama-project/agama#2628).

- Add support for a "questions" section in the Agama configuration
  that allows defining how to answer questions (bsc#1246997).

- Do not complain about missing a selected product when it is not
  re
teclator added a commit that referenced this pull request Mar 24, 2026
## Problem

There is a Net::HTTP timeout when running the post scripts.

- [https://bugzilla.suse.com/show_bug.cgi?id=1259745](bsc#1259745)

## Solution

- Increase the Net::HTTP read_timeout to **300 seconds** to mitigate
timeouts during installation tasks (e.g., running scripts or writing
files). In the bug the post script fails because it takes longer than
the default timeout which is 60 seconds. In master the write and run of
the scripts is done asynchronously.
- Cherry pick test fix for the **AutoYaST** legacy proposal  (#2640).
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.

5 participants