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:
1 parent
7b2af031c0
commit
11152626f8
34 files changed
+728
-289
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { acceptsCompactionPhase } from "../../../packages/client-events/notifications";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useThreadVisibility } from "@/hooks/useThreadVisibility";
|
||||
|
||||
import { useClient } from "@/providers/ClientProvider";
|
||||
@@ -173,6 +174,7 @@ export function useNanobotStream(
|
||||
const threadVisible = useThreadVisibility();
|
||||
const threadVisibleRef = useRef(threadVisible);
|
||||
threadVisibleRef.current = threadVisible;
|
||||
const { t } = useTranslation();
|
||||
const initialRunStartedAt = chatId ? client.getRunStartedAt(chatId) : null;
|
||||
const [messages, setRenderedMessages] = useState<UIMessage[]>(initialMessages);
|
||||
const messagesRef = useRef(messages);
|
||||
@@ -903,6 +905,7 @@ export function useNanobotStream(
|
||||
onStreamDetach,
|
||||
schedulePendingStreamFlush,
|
||||
setMessages,
|
||||
t,
|
||||
]);
|
||||
|
||||
const send = useCallback(
|
||||
|
||||
Reference in new issue
Block a user