Author: Andy Green Date: Mon Sep 28 16:17:28 2026 +0100 server: tell sai-web about events that notifications create Ad-hoc events are announced to sai-web with an eventchange as soon as they are created, but events created by a hook notification were not: sai-web only heard of them when their state first changed, once their tasks started building. Announce them the same way, so browsers see a new event straight away, and anything waiting on changes to the event list in sai-web is woken for it. Co-Authored-By: Claude Opus 5.5 diff --git a/src/server/s-notification.c b/src/server/s-notification.c index 4977830..ed54b2e 100644 --- a/src/server/s-notification.c +++ b/src/server/s-notification.c @@ -1140,6 +1140,14 @@ sai_notification_file_upload_cb(void *data, const char *name, lwsl_notice("%s: notification inserted into db\n", __func__); /* + * Let sai-web know the event exists now, the same as for an + * ad-hoc event: otherwise it only hears about it once its + * state first changes, when the tasks start building. + */ + sais_eventchange(pss->vhd->h_ss_websrv, pss->sn.e.uuid, + SAIES_WAITING); + + /* * The tasks are all in there but set to state * NOT_READY_FOR_BUILD, the periodic central scan * switch them over to WAITING when they have been like that