feat : ask for noti
CI / Verify (push) Successful in 1m50s
CI / Build immutable images and deploy (push) Successful in 2m59s

This commit is contained in:
2026-10-08 02:23:59 +07:00 Unverified
parent 5812d99715
commit 9bc710c94b
34 changed files with 10913 additions and 201 deletions
+13 -2
View File
@@ -172,11 +172,22 @@ Replies expand inline with connector lines; replies to replies identify their re
The Thai comment UI supports image paste (Ctrl+V) with previews and loading skeletons.
Comment boards and the admin inbox receive Redis-backed SSE change events;
reads after each event recheck authorization. Reconnecting refreshes missed updates.
Signed-in authors can enable browser notifications after posting. New replies notify
only the direct parent author, excluding self-replies. Notification clicks open the
One site-entry prompt enables browser notifications for comments, Commission,
and future notification features. “ไม่ต้องถามอีก” remembers dismissal in this
browser; the header bell settings can reopen the prompt. Permission granted before
sign-in is connected to the account after sign-in. New replies notify
only the direct parent author, excluding self-replies. Subscribed, verified admins
also receive new top-level comments from other authors, with a link that opens the
comment in an admin conversation dialog. Admins can enable this from the inbox
using “แจ้งเตือนความคิดเห็นใหม่”. Reply notification clicks open the
root thread, load the relevant reply page, and highlight/focus the exact reply.
This uses the existing `WEB_PUSH_PUBLIC_KEY`, `WEB_PUSH_PRIVATE_KEY`, and
`WEB_PUSH_SUBJECT` configuration, with subscriptions in `comments.push_subscription`.
The header bell lists comments and Commission notifications from `public.notification`,
updates through one user-scoped SSE stream, and caps its red unread badge at `9+`.
Clicking an item marks it read; “อ่านทั้งหมด” marks the account's history read.
Read state persists across visits, admin notifications recheck current permissions,
and source deletion removes its notifications through cascading foreign keys.
Likes, dislikes, and admin hearts update optimistically and save in the background;
a failed save rolls the reaction back and shows an error.