The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 08:00 UTC
perf(web): thread notifications compile with the React Compiler (#20454)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 18:46 UTC
68b47e71c057164b9ee40681a7a73681c39659cf
2 files changed
+7
-6
apps/web/reactCompiledFiles.ts
+1
@@ -29,4 +29,5 @@ export const REACT_COMPILED_FILES = [
29
"apps/web/src/browser/ServerBrowserSurface.tsx",
30
"apps/web/src/assets/assetUrls.ts",
31
"apps/web/src/components/ui/toggle-group.tsx",
32
+ "apps/web/src/components/ThreadNotificationCoordinator.tsx",
33
] as const;
apps/web/src/components/ThreadNotificationCoordinator.tsx
+6
-6
@@ -13,7 +13,7 @@ import {
13
MessageCircleQuestionIcon,
14
ShieldQuestionIcon,
15
} from "lucide-react";
16
-import { useCallback, useEffect, useRef } from "react";
16
+import { useEffect, useRef } from "react";
17
18
import { getClientSettings, useClientSettings } from "../hooks/useSettings";
19
import { useEnvironmentIds } from "../state/environments";
@@ -37,18 +37,18 @@ export function ThreadNotificationCoordinator() {
37
const pending = useRef(
38
new Map<string, { environmentId: EnvironmentId; notification: Notification }>(),
39
);
40
- const onNotification = useCallback((environmentId: EnvironmentId, notification: Notification) => {
40
+ const onNotification = (environmentId: EnvironmentId, notification: Notification) => {
41
pending.current.get(notification.tag)?.notification.close();
42
pending.current.set(notification.tag, { environmentId, notification });
43
setNotificationBadge(pending.current.size);
44
- }, []);
44
+ };
45
46
useEffect(() => {
47
const activeIds = new Set(environmentIds);
48
const count = pending.current.size;
49
- for (const [tag, { environmentId, notification }] of pending.current) {
50
- if (activeIds.has(environmentId)) continue;
51
- notification.close();
49
+ for (const [tag, entry] of pending.current) {
50
+ if (activeIds.has(entry.environmentId)) continue;
51
+ entry.notification.close();
52
pending.current.delete(tag);
53
}
54
if (count !== pending.current.size) setNotificationBadge(pending.current.size);