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:
@@ -41,6 +41,12 @@ type chatHub struct {
|
||||
// userSeq is a monotonic source of ids for the user turns the server echoes
|
||||
// to the other clients, so each retained user message has a stable id.
|
||||
userSeq int
|
||||
// attentionSeen/attentionOrder are the bounded hub-wide record of forms and
|
||||
// approval requests already considered for an ntfy attention notification;
|
||||
// attentionWG tracks in-flight publications.
|
||||
attentionSeen map[string]struct{}
|
||||
attentionOrder []string
|
||||
attentionWG sync.WaitGroup
|
||||
}
|
||||
|
||||
// chatPart is the retained form of one part. Text and reasoning deltas append to
|
||||
|
||||
Reference in New Issue
Block a user