From 9134a62a2049de5be12ca06961eaef856b99a550 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Wed, 26 Nov 2025 16:16:14 +0000 Subject: [PATCH 1/2] service: Remove incorrect comment --- service/lib/agama/dbus/storage/manager.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/service/lib/agama/dbus/storage/manager.rb b/service/lib/agama/dbus/storage/manager.rb index ad39ce3373..fed9c0b396 100644 --- a/service/lib/agama/dbus/storage/manager.rb +++ b/service/lib/agama/dbus/storage/manager.rb @@ -206,10 +206,6 @@ def configure(serialized_product, serialized_config) next_progress_step(CONFIGURING_STEP) config_json = JSON.parse(serialized_config, symbolize_names: true) - # If config_json is nil, calculate_proposal re-calculates the proposal with the current - # config. We could skip that re-calculation if system_changed is false, but that's a - # pretty theoretical case (the method was called with an unchanged product configuration - # and with no storage configuration). calculate_proposal(config_json) finish_progress From 0693e3c0b1ace4b8ad389c92999ced03a05f7362 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Wed, 26 Nov 2025 16:16:36 +0000 Subject: [PATCH 2/2] web: Fix storage reset to defaults --- web/src/hooks/api/config.ts | 9 +++++++-- web/src/hooks/api/config/storage.ts | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/web/src/hooks/api/config.ts b/web/src/hooks/api/config.ts index 88093d6414..a78aee8d0c 100644 --- a/web/src/hooks/api/config.ts +++ b/web/src/hooks/api/config.ts @@ -22,7 +22,7 @@ import { useCallback } from "react"; import { useSuspenseQuery } from "@tanstack/react-query"; -import { getExtendedConfig } from "~/api"; +import { getConfig, getExtendedConfig } from "~/api"; import { useSystem } from "~/hooks/api/system"; import type { system } from "~/api"; import type { Config } from "~/api/config"; @@ -32,6 +32,11 @@ const extendedConfigQuery = { queryFn: getExtendedConfig, }; +const configQuery = { + queryKey: ["config"], + queryFn: getConfig, +}; + function useExtendedConfig(): Config | null { return useSuspenseQuery(extendedConfigQuery)?.data; } @@ -52,5 +57,5 @@ function useProduct(): system.Product | null { return data; } -export { extendedConfigQuery, useExtendedConfig, useProduct }; +export { configQuery, extendedConfigQuery, useExtendedConfig, useProduct }; export * as storage from "~/hooks/api/config/storage"; diff --git a/web/src/hooks/api/config/storage.ts b/web/src/hooks/api/config/storage.ts index 9280409b38..520a02fb42 100644 --- a/web/src/hooks/api/config/storage.ts +++ b/web/src/hooks/api/config/storage.ts @@ -21,18 +21,18 @@ */ import { useSuspenseQuery } from "@tanstack/react-query"; -import { extendedConfigQuery } from "~/hooks/api/config"; +import { configQuery } from "~/hooks/api/config"; import { putConfig, Response } from "~/api"; import type { Config } from "~/api/config"; const removeStorageConfig = (data: Config | null): Config => - data ? { ...data, storage: null } : {}; + data ? { ...data, storage: undefined } : {}; type ResetFn = () => Response; function useReset(): ResetFn { const { data } = useSuspenseQuery({ - ...extendedConfigQuery, + ...configQuery, select: removeStorageConfig, }); return () => putConfig(data);