Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions rust/agama-lib/src/product/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use crate::{
base_http_client::BaseHTTPClient,
manager::http_client::{ManagerHTTPClient, ManagerHTTPClientError},
};
use std::{thread, time};

#[derive(Debug, thiserror::Error)]
pub enum ProductStoreError {
Expand Down Expand Up @@ -93,16 +92,6 @@ impl ProductStore {
if let Some(reg_code) = &settings.registration_code {
let email = settings.registration_email.as_deref().unwrap_or("");

if probe {
// give the UI a short time for processing the events related to changing the
// product before starting registration because it triggers another pile of events
// in the Web UI as well (workaround for gh#agama-project#2274)
// even 1 second should be enough, but rather be safe and use 5s for slow networks,
// in autoinstallation it does not hurt
let delay = time::Duration::from_secs(5);
thread::sleep(delay);
}

self.product_client.register(reg_code, email).await?;
// TODO: avoid reprobing if the system has been already registered with the same code?
probe = true;
Expand Down
7 changes: 7 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 12 12:55:40 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

- Remove the delay between selecting the product and registering it,
the problem has been fixed in the web UI
(removed workaround for gh#agama-project/agama#2274)

-------------------------------------------------------------------
Wed May 7 21:04:24 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
8 changes: 8 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon May 12 12:47:46 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

- Fixed navigation to avoid quickly switching between two paths
in a loop causing "Too many calls to Location or History APIs
within a short timeframe" error in Firefox and crashing the UI
(the proper fix for gh#agama-project/agama#2274)

-------------------------------------------------------------------
Thu May 8 13:43:53 UTC 2025 - David Diaz <dgonzalez@suse.com>

Expand Down
3 changes: 2 additions & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function App() {
return <Navigate to={ROOT.installationFinished} />;
}

if (!products || !connected) return <Loading listenQuestions />;
if (!products || !connected || (selectedProduct === undefined && isBusy))
return <Loading listenQuestions />;

if (phase === InstallationPhase.Startup && isBusy) {
return <Loading listenQuestions />;
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/product/ProductSelectionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function ProductSelectionPage() {
const [showLicense, setShowLicense] = useState(false);
const [isLoading, setIsLoading] = useState(false);

if (!isEmpty(registration?.key)) return <Navigate to={PATHS.root} />;
if (!isEmpty(registration?.key) && selectedProduct) return <Navigate to={PATHS.root} />;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weird to have the registration key set but the product not selected yet.

Copy link
Copy Markdown
Contributor Author

@lslezak lslezak May 12, 2025

Choose a reason for hiding this comment

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

That's because the product has been asynchronously selected from CLI in background. When using UI only this cannot happen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the explanation. Make sense.


const onSubmit = async (e: React.FormEvent) => {
e.preventDefault();
Expand Down
Loading