Replace Web Push and its service worker with page notifications over SSE

This commit is contained in:
Ian Gulliver
2026-10-15 18:34:53 -07:00
parent c7f19f2537
commit a1615693ef
32 changed files with 429 additions and 1175 deletions
+2 -47
View File
@@ -30,7 +30,7 @@ paths:
/api/me/notifications:
put:
operationId: updateNotificationPrefs
description: Sets which inbox items the calling user is sent push notifications for.
description: Sets which new inbox items notify the calling user in their open byre pages.
requestBody:
required: true
content:
@@ -44,27 +44,6 @@ paths:
schema: { $ref: "#/components/schemas/User" }
"400": { $ref: "#/components/responses/Error" }
/api/me/push-subscriptions:
post:
operationId: addPushSubscription
description: Registers a browser's push subscription for the calling user. Registering an endpoint again replaces it.
requestBody:
required: true
content:
application/json:
schema: { $ref: "#/components/schemas/PushSubscription" }
responses:
"204":
description: Registered.
"400": { $ref: "#/components/responses/Error" }
delete:
operationId: removePushSubscription
parameters:
- { name: endpoint, in: query, required: true, schema: { type: string } }
responses:
"204":
description: Removed, or was not registered.
/api/me/lead/sessions:
get:
operationId: listLeadSessions
@@ -137,16 +116,6 @@ paths:
description: Recorded.
"400": { $ref: "#/components/responses/Error" }
/api/push/key:
get:
operationId: getPushKey
responses:
"200":
description: The server's VAPID public key, the applicationServerKey for PushManager.subscribe.
content:
application/json:
schema: { $ref: "#/components/schemas/PushKey" }
/api/projects:
get:
operationId: listProjects
@@ -828,7 +797,7 @@ components:
NotificationPrefs:
type: object
description: Which new inbox items send this user a push notification.
description: Which new inbox items notify this user in their open byre pages.
required: [blocking_questions, questions, reports, errors, rate_limits]
properties:
blocking_questions: { type: boolean, description: "Questions asked with blocking: true. On by default." }
@@ -837,20 +806,6 @@ components:
errors: { type: boolean, description: session_error items. }
rate_limits: { type: boolean, description: rate_limited items. }
PushSubscription:
type: object
required: [endpoint, p256dh, auth]
properties:
endpoint: { type: string }
p256dh: { type: string, description: The subscription's p256dh key, base64url. }
auth: { type: string, description: The subscription's auth secret, base64url. }
PushKey:
type: object
required: [public_key]
properties:
public_key: { type: string, description: Base64url, uncompressed P-256 point. }
UserUpdate:
type: object
required: [git_name, git_email]