Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Dictation: dismissing a call's note keeps Try microphone

milind-soni6a427a14287b
diff --git a/src/components/CallView.tsx b/src/components/CallView.tsx
index 61e0517c24..e9116b77cc 100644
--- a/src/components/CallView.tsx
+++ b/src/components/CallView.tsx
@@ -504,6 +504,8 @@ function Call({ bot }: { bot: Bot }) {
const [phase, setPhase] = useState<Phase>(initialPhase);
const [heard, setHeard] = useState("");
const [note, setNote] = useState<string | null>(null);
+ // The × hides this note's words only; "Try microphone" stays, since the call has stopped listening.
+ const [dismissedNote, setDismissedNote] = useState<string | null>(null);
const pushToTalk = usePushToTalk(bot.id, bridge, phase === "listening", () => {
setNote(t("call.turns.pushToTalkFailed"));
});
@@ -834,7 +836,7 @@ function Call({ bot }: { bot: Bot }) {
{note && (
<div className="flex max-w-[460px] flex-col items-center gap-2 text-center text-[13px] text-warning">
- <span className="flex items-start gap-1.5"><span className="min-w-0 break-words">{note}</span><DismissWarning onDismiss={() => setNote(null)} /></span>
+ {note !== dismissedNote && <span className="flex items-start gap-1.5"><span className="min-w-0 break-words">{note}</span><DismissWarning onDismiss={() => setDismissedNote(note)} /></span>}
<button
onClick={listen}
className="rounded-full border border-warning/40 px-3 py-1.5 text-[12px] hover:bg-warning/10"
diff --git a/src/components/GroupCallView.tsx b/src/components/GroupCallView.tsx
index 9065e2aa4b..604d399561 100644
--- a/src/components/GroupCallView.tsx
+++ b/src/components/GroupCallView.tsx
@@ -77,6 +77,8 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {
const [phase, setPhase] = useState<Phase>(initialPhase);
const [heard, setHeard] = useState("");
const [note, setNote] = useState<string | null>(null);
+ // The × hides this note's words only; "Try microphone" stays, since the call has stopped listening.
+ const [dismissedNote, setDismissedNote] = useState<string | null>(null);
const [speakingMemberId, setSpeakingMemberId] = useState<string | null>(null);
const pushToTalk = usePushToTalk(group.id, bridge, phase === "listening", () => {
setNote(t("call.turns.pushToTalkFailed"));
@@ -536,7 +538,7 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {
{note && (
<div className="flex max-w-[520px] flex-col items-center gap-2 text-center text-[13px] text-warning">
- <span className="flex items-start gap-1.5"><span className="min-w-0 break-words">{note}</span><DismissWarning onDismiss={() => setNote(null)} /></span>
+ {note !== dismissedNote && <span className="flex items-start gap-1.5"><span className="min-w-0 break-words">{note}</span><DismissWarning onDismiss={() => setDismissedNote(note)} /></span>}
<button
onClick={listen}
className="rounded-full border border-warning/40 px-3 py-1.5 text-[12px] hover:bg-warning/10"