fix(appd): broadcast LaunchAck to all WebSocket clients on app launch

Previously LaunchAck was sent only as a direct response to the
requesting connection. The servo-shell appd_ws listener thread is a
separate WebSocket connection and would never receive LaunchAck for
UI-initiated launches, causing those sessions to have no WebView.

Now dispatch() broadcasts LaunchAck over the registry broadcast channel
immediately after returning the direct response, so all connected
WebSocket clients (including the shell listener) learn about every new
session regardless of which connection triggered the launch.
This commit is contained in:
Marco Allegretti 2026-03-11 18:27:56 +01:00
parent dde4a1dffb
commit 55b80ea2b3

View file

@ -302,6 +302,10 @@ pub(crate) async fn dispatch(req: Request, registry: &Registry) -> Response {
tracing::warn!(session_id, error = %e, "runtime supervisor error");
}
});
let _ = registry.lock().await.broadcast().send(Response::LaunchAck {
session_id,
app_id: app_id.clone(),
});
Response::LaunchAck { session_id, app_id }
}
Request::TerminateApp { session_id } => {