fix(account-settings): clear stale pw error on input + live header avatar update
Tessera CI/CD / Lint & Type Check (push) Successful in 44s
Tessera CI/CD / Tests (push) Successful in 37s
Tessera CI/CD / Build & Publish Images (push) Successful in 1m34s

- Password form errors (wrong pw, mismatch) now clear on first keystroke
  in any password field instead of persisting until next submit.
- Avatar upload now bumps avatarVersion in auth store and sets hasAvatar=true,
  so the header avatar switches to the uploaded image immediately without reload.
- Header img src uses ?v={avatarVersion} as cache-buster to force browser to
  fetch the new avatar when version increments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 15:29:21 +02:00
parent 85cd17452c
commit 88db54fa7d
3 changed files with 14 additions and 3 deletions
+4
View File
@@ -11,8 +11,10 @@ export interface AuthUser {
interface AuthState {
user: AuthUser | null;
avatarVersion: number;
setUser: (user: AuthUser) => void;
clearUser: () => void;
bumpAvatarVersion: () => void;
}
/**
@@ -22,6 +24,8 @@ interface AuthState {
*/
export const useAuthStore = create<AuthState>()((set) => ({
user: null,
avatarVersion: 0,
setUser: (user) => set({ user }),
clearUser: () => set({ user: null }),
bumpAvatarVersion: () => set((s) => ({ avatarVersion: s.avatarVersion + 1 })),
}));