feat(appd): include app_id in AppReady broadcast

ipc.rs: AppReady { session_id, app_id: String }.

runtime.rs: supervise() passes app_id (already in scope as parameter)
when building the AppReady broadcast message.

main.rs: supervisor integration test updated to use .. to ignore
app_id in the AppReady pattern match.
This commit is contained in:
Marco Allegretti 2026-03-11 10:50:41 +01:00
parent 35db7c2ccc
commit dbe44bd0e0
3 changed files with 6 additions and 6 deletions

View file

@ -25,6 +25,7 @@ pub enum Response {
},
AppReady {
session_id: u64,
app_id: String,
},
RunningApps {
sessions: Vec<SessionInfo>,

View file

@ -449,7 +449,7 @@ mod tests {
let notification = rx.try_recv();
assert!(matches!(
notification,
Ok(Response::AppReady { session_id: sid }) if sid == session_id
Ok(Response::AppReady { session_id: sid, .. }) if sid == session_id
));
let _ = std::fs::remove_file(&script);

View file

@ -42,11 +42,10 @@ pub(crate) async fn supervise(
.lock()
.await
.set_state(session_id, AppStateKind::Running);
let _ = registry
.lock()
.await
.broadcast()
.send(Response::AppReady { session_id });
let _ = registry.lock().await.broadcast().send(Response::AppReady {
session_id,
app_id: app_id.to_owned(),
});
tracing::info!(session_id, %app_id, "app ready");
}
Ok(Err(e)) => {