fix: clear resolveFailed on retry so the FAB recovers

resolveAgents() throwing once (e.g. tenant id not ready on the first
render) latched resolveFailed=true, and nothing ever cleared it — so
the FAB stayed hidden permanently even after a later retry succeeded.
Reset the flag at the start of each resolution attempt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jules
2026-05-21 08:17:20 +10:00
parent 7fd81f14a9
commit 777951ca9c

View File

@@ -126,6 +126,10 @@ export function AgentDock({
useEffect(() => { useEffect(() => {
let cancelled = false let cancelled = false
// Clear any prior failure so a retry (e.g. tenant id arrives after
// the first render) gets a clean slate — otherwise the flag latches
// and the FAB stays hidden forever even once resolution succeeds.
setResolveFailed(false)
resolveAgents() resolveAgents()
.then((list) => { .then((list) => {
if (cancelled) return if (cancelled) return