matrix-accounts dashboard: live status + homeserver from daemon snapshot (be-4)

This commit is contained in:
damocles 2026-06-22 12:42:56 +02:00 committed by mara
commit f38bc13293
5 changed files with 286 additions and 14 deletions

View file

@ -103,6 +103,15 @@ async fn main() -> Result<()> {
return Ok(());
}
// Publish the live-account snapshot (BE-4) for the dashboard: the
// accounts that restored, with effective homeserver + user id. Lands
// in the host-visible state dir so hive-c0re reads it to show live
// up/down + backfill homeserver. Best-effort — a failed write must
// not stop the daemon from serving.
if let Err(e) = registry.write_snapshot(&paths::accounts_file()) {
tracing::warn!(error = %format!("{e:#}"), "failed to write matrix-accounts snapshot");
}
// Serve the socket against the registry. Spawned before driving the
// sync loops so the MCP bridge can connect as soon as the first
// claude turn fires.