Add mock AI provider and AI integration tests; fix sign-in transition and card flip

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-11 13:30:27 -07:00
parent 74a98ac1f1
commit 75158c4449
8 changed files with 720 additions and 33 deletions

View file

@ -46,8 +46,9 @@ export function LoginPage() {
setError('');
try {
await api.post('/api/auth/login', { password });
qc.clear();
await qc.invalidateQueries({ queryKey: qk.auth });
// Drop anything cached from a previous session, then let the gate through.
qc.removeQueries({ predicate: (q) => q.queryKey[0] !== 'auth' });
qc.setQueryData(qk.auth, { configured: true, authenticated: true });
} catch (err) {
setError(errorMessage(err));
setPassword('');
@ -88,7 +89,7 @@ export function SetupPage() {
setError('');
try {
await api.post('/api/auth/setup', { code, password });
await qc.invalidateQueries({ queryKey: qk.auth });
qc.setQueryData(qk.auth, { configured: true, authenticated: true });
} catch (err) {
setError(errorMessage(err));
} finally {