mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-03 05:08:42 +02:00
[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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user