You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(admin/spa): wire AbortSignal through every read API + minor polish
Two converging review findings (Claude bot + Gemini Code Assist):
1. AbortSignal not plumbed through listTables / describeTable /
listBuckets / describeBucket. useApiQuery created an
AbortController and passed signal to the loader, but those four
methods discarded it - so requests ran to completion after a
component unmounted, wasting network and server connections. Now
every read method mirrors cluster's signature (`signal?: AbortSignal`)
and every page-level useApiQuery callsite passes it through.
2. The safe() wrapper in Dashboard.tsx was a no-op that received
`signal` and never passed it on. The "404 doesn't cancel render"
suppression it claimed to provide is already handled by SummaryCard
testing `error?.status === 404 && pendingMessage`. Removed.
Drive-by polish from the same reviews:
- useApiQuery's effect deps no longer include `markUnauthorized`.
Read it through markUnauthorizedRef so an AuthProvider remount
(React Fast Refresh in dev, or any future wrapping change) does
not invalidate every active query and trigger a fresh round-trip
on every page. Mirrors the existing loaderRef pattern.
- Login.tsx now trims `secretKey` in addition to `accessKey`. SigV4
secrets never contain whitespace, so trimming is safe and saves
an operator from a cryptic 401 after pasting a key with a
trailing newline.
Modal accessibility (no focus trap, missing aria-modal / role=dialog)
was flagged as low-priority polish for an internal operator tool.
Tracked as a follow-up; not addressed here to keep this change
focused on the functional bugs.
Verified with `npm run build` and `npm run lint` (tsc --strict
--noUnusedLocals --noUncheckedSideEffectImports), and `go build ./...`.
0 commit comments