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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user