Skip to content

Commit 489ac64

Browse files
PR Batch Testerclaude
andcommitted
revert: background announcements speak even with in-app notifications on
Muting the region whenever toasts were on dropped announcements no toast covers: "Stopped", a second request in the same run, and anything while the window isn't focused. Hearing a completion twice with an opt-in setting on is the smaller problem. This reverts commit e0de7ef. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 2cf37ee commit 489ac64

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎apps/web/src/components/BackgroundThreadAnnouncer.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { effectiveSnoozed } from "@t3tools/client-runtime/state/thread-settled";
44
import { useEffect, useRef } from "react";
55

66
import { useComposerDraftStore } from "../composerDraftStore";
7-
import { useClientSettings } from "../hooks/useSettings";
87
import { useThreadRouteTarget } from "../hooks/useThreadRouteTarget";
98
import { useQuietThreadShells } from "../state/entities";
109
import { liveShellEnvironmentIdsAtom } from "../state/shell";
@@ -23,8 +22,6 @@ import {
2322
export function BackgroundThreadAnnouncer() {
2423
const threads = useQuietThreadShells();
2524
const liveEnvironmentIds = useAtomValue(liveShellEnvironmentIdsAtom);
26-
// In-app notification toasts land in a polite live region that already speaks these.
27-
const toastsSpeak = useClientSettings((settings) => settings.inAppNotificationsEnabled);
2825
const routeTarget = useThreadRouteTarget();
2926
const routeDraftThread = useComposerDraftStore((store) =>
3027
routeTarget?.kind === "draft" ? store.getDraftSession(routeTarget.draftId) : null,
@@ -59,11 +56,11 @@ export function BackgroundThreadAnnouncer() {
5956
);
6057
memoryRef.current = memory;
6158
const region = regionRef.current;
62-
if (region === null || announcement === null || toastsSpeak) return;
59+
if (region === null || announcement === null) return;
6360
// Screen readers ignore a write that leaves the text unchanged, so a repeat
6461
// gets a trailing non-breaking space to count as new.
6562
region.textContent = region.textContent === announcement ? `${announcement} ` : announcement;
66-
}, [threads, liveEnvironmentIds, openThreadKey, toastsSpeak]);
63+
}, [threads, liveEnvironmentIds, openThreadKey]);
6764

6865
// No role="status": Orca 50 maps it to a status bar in Chromium and drops its updates.
6966
return <div ref={regionRef} aria-live="polite" className="sr-only" />;

0 commit comments

Comments
 (0)