From 5db85ff19f9d020e3eae494ea4ec2412ce7a21fd Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 2 Nov 2026 19:49:19 +0100 Subject: [PATCH] fix(app): a failed account reload clears the own grant rows Delta verifier note: the catch kept earlier catalogGrants beside status failed, against the field's doc; now emptied, test extended. --- apps/app/src/state/authStore.ts | 4 +++- apps/app/tests/unit/state.authStore.test.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/app/src/state/authStore.ts b/apps/app/src/state/authStore.ts index 555db48b..affb66c4 100644 --- a/apps/app/src/state/authStore.ts +++ b/apps/app/src/state/authStore.ts @@ -210,7 +210,9 @@ function applyAuthEvent( profile: null, roles: [], workspace: { status: 'error', failure: classifyRecordError(error) }, - // The grant read never ran: no page waits on it forever. + // The grant read never ran: no page waits on it forever, and no + // earlier rows stay behind as a hint. + catalogGrants: [], catalogGrantsStatus: 'failed', }) }) diff --git a/apps/app/tests/unit/state.authStore.test.ts b/apps/app/tests/unit/state.authStore.test.ts index 81bc25aa..56d50f77 100644 --- a/apps/app/tests/unit/state.authStore.test.ts +++ b/apps/app/tests/unit/state.authStore.test.ts @@ -240,6 +240,7 @@ describe('authStore', () => { await flush() await flush() expect(useAuthStore.getState().catalogGrantsStatus).toBe('failed') + expect(useAuthStore.getState().catalogGrants).toEqual([]) }) it('reports a failed read as an error kind and reads again on refresh', async () => {