From 1129ea44bcd9e571e4c42409e4b772600c5ac3f8 Mon Sep 17 00:00:00 2001 From: Wasim Yousef Said Date: Tue, 24 Mar 2026 07:04:00 +0100 Subject: [PATCH] fix(studio): show Windows-specific reset-password command on login error (#4529) --- .../src/features/auth/components/auth-form.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/studio/frontend/src/features/auth/components/auth-form.tsx b/studio/frontend/src/features/auth/components/auth-form.tsx index 7d4363c1bf..d9190429bd 100644 --- a/studio/frontend/src/features/auth/components/auth-form.tsx +++ b/studio/frontend/src/features/auth/components/auth-form.tsx @@ -9,6 +9,7 @@ import { Eye, EyeOff } from "lucide-react"; import { useEffect, useState } from "react"; import type { ReactElement } from "react"; import type { SyntheticEvent } from "react"; +import { usePlatformStore } from "@/config/env"; import { refreshSession } from "../api"; // Bootstrap credentials injected into index.html by the backend @@ -278,7 +279,14 @@ export function AuthForm({ mode }: AuthFormProps): ReactElement | null { ); navigate({ to: getPostAuthRoute() }); } catch (err: unknown) { - setError(err instanceof Error ? err.message : "Auth failed."); + let msg = err instanceof Error ? err.message : "Auth failed."; + if (msg.includes("unsloth studio reset-password") && usePlatformStore.getState().deviceType === "windows") { + msg = msg.replace( + "unsloth studio reset-password", + ".\\unsloth_studio\\Scripts\\unsloth.exe studio reset-password", + ); + } + setError(msg); } finally { setLoading(false); }