rstudio / rstudio/rstudio

Moving chat pane between windows cancels in-progress AI response

Open
#17,216 0 comments 0 reactions 0 assignees View on GitHub
bug posit-ai
Dominant language
Java
Stars
5.1k
Forks
1.2k
PR merge metrics
PR metrics pending

Description

## Problem

When the Posit Assistant chat pane is moved between the main RStudio window and a satellite (pop-out) window while the AI backend is actively streaming a response, the in-progress operation is cancelled or left in a broken state. This can happen in several ways:

- Clicking the **pop-out** button while a response is streaming
- Clicking the **return to main** button in the satellite window while a response is streaming
- Closing the satellite window via the OS close button (X) while a response is streaming

The underlying issue is that moving the chat UI between windows tears down and recreates the iframe hosting the chat frontend, which severs the active WebSocket connection to the backend.

## Possible approaches

- **Disable the pop-out and return-to-main commands** while the backend is busy, preventing the user from triggering the move until streaming completes
- **Show a confirmation dialog** warning the user that moving the pane will cancel the in-progress response, letting them choose to proceed or wait
- **Show a toast or notification** explaining why the action was blocked

The satellite window close button (X) is a special case — the OS close event cannot be prevented, so the application must handle the state cleanup gracefully even if a response is in progress. This path should not be blocked, but the resulting state (commands, UI) must be consistent.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.