[eric] models pill: poll while the no-model error shows; a router-side recovery emits no reachability edge so the pill stuck until reload (ENG-294 drill find)

This commit is contained in:
ciregenz
2026-08-18 14:25:12 -07:00
parent c33473a419
commit fd8dca2b72
@@ -71,6 +71,16 @@ const ModelErrorPill: React.FC = () => {
};
}, [dispatch]);
// A router bounce restores models while the backend stays reachable, so no recovery event fires; poll gently while the error owns the corner.
useEffect(() => {
if (state !== 'no-model') return;
const t = setInterval(() => {
dispatch(fetchSettings());
dispatch(fetchModels());
}, 30000);
return () => clearInterval(t);
}, [state, dispatch]);
const clickable = state === 'no-model';
const title =
state === 'offline' ? 'No internet connection'