fix(webui): refine browser notifications (NAN-227)

Reconcile the original notification fix with the integrated main snapshot.

Group notification settings and simplify localized copy and documentation.
Preserve permission opt-out and notification click routing across app transitions.
Suppress late completion notifications for discarded temporary chats and align
notification settings skeletons with the loaded layout.
This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-20 13:45:04 +08:00
1 parent 7b2af031c0
commit 11152626f8
34 files changed
+728 -289

No files matched your search

@@ -47,6 +47,10 @@ const previewSettings: SettingsPayload = {
let detailState = "loaded";
export function installSkeletonPreviewApi() {
// Windows headless Chromium can report denied even after a context permission grant.
if (new URLSearchParams(location.search).get("notificationPermission") === "granted") {
Object.defineProperty(Notification, "permission", { configurable: true, value: "granted" });
}
const fetch = window.fetch.bind(window);
window.fetch = async (input, init) => {
const url = new URL(input instanceof Request ? input.url : String(input), location.href);