Replace workspace reconnect banner with persistent agent panel toast

The workspace reconnect banner ignored safe-area insets on Android,
overlapping the system status bar. The agent panel already shows a
"Reconnecting..." toast on disconnect, so consolidate on that and drop
the banner entirely. Add persistent toast support (durationMs: null)
and dismiss the toast when the connection returns to online instead of
auto-dismissing after 2.2s.
This commit is contained in:
Mohamed Boudra
2026-05-03 17:17:02 +07:00
parent f33a5191df
commit 1daa131480
5 changed files with 21 additions and 91 deletions
+6 -3
View File
@@ -708,7 +708,10 @@ function ChatAgentContent({
useEffect(() => {
if (connectionStatus === "online") {
reconnectToastArmedRef.current = false;
if (reconnectToastArmedRef.current) {
reconnectToastArmedRef.current = false;
panelToast.dismiss();
}
return;
}
if (connectionStatus === "idle") {
@@ -717,11 +720,11 @@ function ChatAgentContent({
if (!reconnectToastArmedRef.current) {
reconnectToastArmedRef.current = true;
panelToast.api.show("Reconnecting...", {
durationMs: 2200,
durationMs: null,
testID: "agent-reconnecting-toast",
});
}
}, [connectionStatus, panelToast.api]);
}, [connectionStatus, panelToast]);
useEffect(() => {
if (!isPaneFocused || !agentId || !isConnected || !hasSession) {