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.
This commit is contained in:
bchanot committed 2026-11-02 19:49:19 +01:00
1 parent cea0f1cfec
commit 5db85ff19f
2 files changed
+4 -1

No files matched your search

+3 -1
View File
@@ -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',
})
})
@@ -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 () => {