mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Cancel folder trust prompts when the app server disconnects (#63262)
## Why A daemon restart can invalidate the connection while a folder trust prompt is open. A queued confirmation can otherwise still be handled against that closed connection. ## What changed Dismiss the folder trust prompt when the connection closes, giving the disconnect priority over queued input. Leave the disconnect event for the Agents overview to handle. During startup, exit with a message asking the user to restart Codex. ## Testing Add tests for daemon restarts during folder consent in the Agents overview and at startup. Both check that the restart leaves the trust setting unset. A unit test checks that disconnect wins over queued Enter. GitOrigin-RevId: 21ee1ca625ed8bc2266a9a37a260254d4e87369d
This commit is contained in:
committed by
copyberry
parent
326bac6ce0
commit
794584993e
@@ -637,6 +637,16 @@ impl RemoteAppServerClient {
|
||||
}
|
||||
|
||||
impl RemoteAppServerRequestHandle {
|
||||
/// Whether this connection has stopped accepting requests.
|
||||
pub fn is_closed(&self) -> bool {
|
||||
self.command_tx.is_closed()
|
||||
}
|
||||
|
||||
/// Wait until this connection stops accepting requests without consuming client events.
|
||||
pub async fn closed(&self) {
|
||||
self.command_tx.closed().await;
|
||||
}
|
||||
|
||||
pub async fn resolve_server_request(
|
||||
&self,
|
||||
request_id: RequestId,
|
||||
|
||||
Reference in New Issue
Block a user