From c2d11cc95db7a916e18c34608906ef2696d68e52 Mon Sep 17 00:00:00 2001 From: AhmetArif0 <147827411+AhmetArif0@users.noreply.github.com> Date: Wed, 3 Jun 2026 18:14:10 +0300 Subject: [PATCH] fix(dashboard): surface model-write failure when creating a profile POST /api/profiles returns model_set: false when the model assignment step fails (e.g. filesystem error) while the profile itself was created successfully. handleCreate discarded the response, so the user received a "Profile created" success toast with no indication that their chosen model was not persisted. Capture the response and show an error toast when a model was selected but model_set is explicitly false, directing the user to set it from the profile editor. --- web/src/pages/ProfilesPage.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/pages/ProfilesPage.tsx b/web/src/pages/ProfilesPage.tsx index 7afddfad11f..9a1795cc914 100644 --- a/web/src/pages/ProfilesPage.tsx +++ b/web/src/pages/ProfilesPage.tsx @@ -414,7 +414,7 @@ export default function ProfilesPage() { (c) => `${c.provider}\u0000${c.model}` === modelChoice, ) : undefined; - await api.createProfile({ + const res = await api.createProfile({ name, clone_from_default: cloneAll ? false : cloneFromDefault, clone_all: cloneAll, @@ -424,6 +424,12 @@ export default function ProfilesPage() { model: picked?.model, }); showToast(`${t.profiles.created}: ${name}`, "success"); + if (picked && res.model_set === false) { + showToast( + `Profile created, but the model could not be saved — set it from the profile editor.`, + "error", + ); + } setNewName(""); setNewDescription(""); setNoSkills(false);