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 -109
View File
@@ -28,7 +28,7 @@ export interface paths {
cookie?: never;
};
get?: never;
/** @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. */
put: operations["updateNotificationPrefs"];
post?: never;
delete?: never;
@@ -37,23 +37,6 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/me/push-subscriptions": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** @description Registers a browser's push subscription for the calling user. Registering an endpoint again replaces it. */
post: operations["addPushSubscription"];
delete: operations["removePushSubscription"];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/me/lead/sessions": {
parameters: {
query?: never;
@@ -122,22 +105,6 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/push/key": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get: operations["getPushKey"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/projects": {
parameters: {
query?: never;
@@ -780,7 +747,7 @@ export interface components {
git_email: string;
notification_prefs: components["schemas"]["NotificationPrefs"];
};
/** @description Which new inbox items send this user a push notification. */
/** @description Which new inbox items notify this user in their open byre pages. */
NotificationPrefs: {
/** @description Questions asked with blocking: true. On by default. */
blocking_questions: boolean;
@@ -793,17 +760,6 @@ export interface components {
/** @description rate_limited items. */
rate_limits: boolean;
};
PushSubscription: {
endpoint: string;
/** @description The subscription's p256dh key */
p256dh: string;
/** @description The subscription's auth secret */
auth: string;
};
PushKey: {
/** @description Base64url */
public_key: string;
};
UserUpdate: {
git_name: string;
git_email: string;
@@ -1320,49 +1276,6 @@ export interface operations {
400: components["responses"]["Error"];
};
};
addPushSubscription: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["PushSubscription"];
};
};
responses: {
/** @description Registered. */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
400: components["responses"]["Error"];
};
};
removePushSubscription: {
parameters: {
query: {
endpoint: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Removed, or was not registered. */
204: {
headers: {
[name: string]: unknown;
};
content?: never;
};
};
};
listLeadSessions: {
parameters: {
query?: never;
@@ -1477,26 +1390,6 @@ export interface operations {
400: components["responses"]["Error"];
};
};
getPushKey: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description The server's VAPID public key, the applicationServerKey for PushManager.subscribe. */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["PushKey"];
};
};
};
};
listProjects: {
parameters: {
query?: never;