From 3e9053946f58ae4e94d2a5c53a9470a5135ccec8 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Mon, 13 Apr 2026 05:58:29 -0700 Subject: [PATCH] Add styled hover tooltip to STT button showing Ctrl+Shift+M shortcut Replaces the native title attribute with a custom tooltip that appears instantly on hover, displaying the shortcut in a styled kbd element. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/src/components/terminal/SttButton.tsx | 55 ++++++++++++----------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/app/src/components/terminal/SttButton.tsx b/app/src/components/terminal/SttButton.tsx index 56f99ab..9ab40be 100644 --- a/app/src/components/terminal/SttButton.tsx +++ b/app/src/components/terminal/SttButton.tsx @@ -11,6 +11,7 @@ interface Props { export default function SttButton({ state, error, onToggle, onCancel }: Props) { const [elapsed, setElapsed] = useState(0); + const [hovered, setHovered] = useState(false); const timerRef = useRef | null>(null); // Track recording duration @@ -62,38 +63,42 @@ export default function SttButton({ state, error, onToggle, onCancel }: Props) { return (
- + {hovered && state !== "recording" && ( +
+ {state === "transcribing" ? "Transcribing..." : ( + <>Speech to text Ctrl+Shift+M + )} +
)} - +
{state === "recording" && ( {formatTime(elapsed)}