refactor(startup): ensure entities always use the latest configuration format (#173)

* refactor(startup): ensure entities always use the latest configuration schema

* refactor: await config updates to avoid race condition on later mount
This commit is contained in:
Nico authored and GitHub committed 2025-12-18 18:11:39 +01:00
1 parent 7a507354ad
commit a17da2562f
10 files changed
+81 -17

No files matched your search

@@ -18,7 +18,7 @@ import {
} from "../../../components/ui/form";
import { Input } from "../../../components/ui/input";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select";
import { volumeConfigSchema } from "~/schemas/volumes";
import { volumeConfigSchemaBase } from "~/schemas/volumes";
import { testConnectionMutation } from "../../../api-client/@tanstack/react-query.gen";
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip";
import { useSystemInfo } from "~/client/hooks/use-system-info";
@@ -26,7 +26,7 @@ import { DirectoryForm, NFSForm, SMBForm, WebDAVForm, RcloneForm } from "./volum
export const formSchema = type({
name: "2<=string<=32",
}).and(volumeConfigSchema);
}).and(volumeConfigSchemaBase);
const cleanSchema = type.pipe((d) => formSchema(deepClean(d)));
export type FormValues = typeof formSchema.inferIn;