Open ntfy notifications in the app and notify chats that need the operator

Run notifications now always click through to pipelines://run/<id>; a valid
PIPELINES_WEB_PUBLIC_URL adds an "Open in browser" ntfy view action instead
of replacing the click. Queued rows derive links from the run id at delivery,
so legacy rows holding a web URL still open the app.

Unresolved chat questions/forms and permission requests publish one async,
bounded notification to the system destination (pipelines://chat/<id> plus the
browser action), deduplicated per form/request id across reconnects and
replays. stage.PublishNtfy gains optional, strictly validated view actions.
Server tests now clear the operator's real ntfy environment.
This commit is contained in:
2026-10-30 20:40:06 +00:00
parent 44b2cff347
commit 40ba2ac117
11 changed files with 586 additions and 36 deletions
+2
View File
@@ -408,6 +408,7 @@ func (h *chatHub) emitRoom(source *chatRoom, frame protocol.ChatEventFrame) {
h.clearCompactionLocked(room)
}
h.applyLocked(frame)
h.noteFormAttentionLocked(frame)
buffered := false
var targets []*chatSub
if room != nil {
@@ -652,6 +653,7 @@ func (h *chatHub) pushPermission(sessionID string, frame protocol.ChatPermission
}
}
room.pending = append(room.pending, frame)
h.notePermissionAttentionLocked(frame)
if len(room.pending) > chatRoomPendingLimit {
room.pending = room.pending[len(room.pending)-chatRoomPendingLimit:]
}