mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 12:07:28 +01:00
Production held ZERO subscribed push devices (the messaging doctor, 2026-10-15): the server could send a push, the VAPID keys and the service worker were in place, and no screen anywhere offered a phone the choice — usePushSubscription was imported by nothing. A new report on a site reached no device, and said so only in a log line. - Settings → Notifications gets an "On this phone" card: Turn on, Send a test, Turn off, with a plain sentence for every state (not asked, working, on, blocked by the browser, unsupported — with the iPhone Add-to-Home-Screen fix — error with retry, server has no key). Pure view logic (lib/push-card.ts) is pinned by scripts/test/push-card.ts; copy is SSOT in config/comms.ts. - GET /api/push/public-key hands out the server's own VAPID_PUBLIC_KEY, so a phone no longer subscribes against a key inlined at build time that a build can lose or leave stale; POST /api/push/test sends one test push and names the failed precondition instead of a bare zero. - The page-render harness is now a shared core (render-harness.mjs) with a thin script per page; the push card has one, and rendering it is how a filled button 8px shorter than its neighbour, and under 44px, was caught and fixed. Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3 Co-authored-by: Claude <noreply@anthropic.com>
11 lines
323 B
JavaScript
11 lines
323 B
JavaScript
// Render every state of the "notifications on this phone" card. Run:
|
|
// node scripts/preview/build-push-preview.mjs [outDir]
|
|
// Core: render-harness.mjs.
|
|
import { renderPreview } from "./render-harness.mjs";
|
|
|
|
await renderPreview({
|
|
entry: "push-card.preview.tsx",
|
|
name: "push-preview",
|
|
outDir: process.argv[2],
|
|
});
|