Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat(dictation): Signal glow processing state, smooth entrance, pill polish (#1826)

Gabriel Steine76ded162501
diff --git a/package-lock.json b/package-lock.json
index cb60715c6..d1a12578b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -48,7 +48,6 @@
"better-auth": "1.6.27",
"better-sqlite3": "12.9.0",
"canvas-confetti": "^1.9.4",
- "border-beam": "^1.3.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"dotenv": "^17.4.1",
@@ -6393,16 +6392,6 @@
"license": "MIT",
"optional": true
},
- "node_modules/border-beam": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/border-beam/-/border-beam-1.3.0.tgz",
- "integrity": "sha512-oZSISp3aQau4ASTmzm5pzxeBinO6Fh2HW0gyEixJgtpUZvRiU0vNpP+IwGRrNpIyqPjA7Rf5EBnVqDSJ49cm5w==",
- "license": "MIT",
- "peerDependencies": {
- "react": ">=18.0.0",
- "react-dom": ">=18.0.0"
- }
- },
"node_modules/bowser": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz",
diff --git a/package.json b/package.json
index 33a090251..cb57a38cf 100644
--- a/package.json
+++ b/package.json
@@ -158,7 +158,6 @@
"better-auth": "1.6.27",
"better-sqlite3": "12.9.0",
"canvas-confetti": "^1.9.4",
- "border-beam": "^1.3.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"dotenv": "^17.4.1",
diff --git a/preload.js b/preload.js
index 279dd8b5b..9924e1320 100644
--- a/preload.js
+++ b/preload.js
@@ -460,6 +460,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
"main-window-will-resize",
(callback) => (_event, resize) => callback(resize)
),
+ ackMainWindowResizeMask: (token) => ipcRenderer.send("main-window-resize-mask-ready", token),
setMainWindowInteractivity: (interactive) =>
ipcRenderer.invoke("set-main-window-interactivity", interactive),
setNotificationInteractivity: (interactive) =>
diff --git a/src/App.jsx b/src/App.jsx
index 6f282ca9a..1e566ab18 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -68,7 +68,6 @@ export default function App() {
// Floating icon auto-hide setting (read from store, synced via IPC)
const floatingIconAutoHide = useSettingsStore((s) => s.floatingIconAutoHide);
const panelStartPosition = useSettingsStore((s) => s.panelStartPosition);
- const beamTheme = useSettingsStore((s) => s.theme);
const prevAutoHideRef = useRef(floatingIconAutoHide);
const [voiceHorizontalDirection, setVoiceHorizontalDirection] = useState(() =>
resolveVoiceHorizontalDirection(panelStartPosition)
@@ -251,7 +250,10 @@ export default function App() {
const voiceActivity = resolveVoiceActivityPresentation({
isRecording,
- isProcessing: isVisuallyProcessing,
+ // Mic warm-up is an acknowledged press, not work on a transcript. Keeping
+ // isPreparing out of the thinking state leaves the press on the pulsing
+ // "processing" mic-state pill instead of lighting the glow at hotkey time.
+ isProcessing: isProcessing || isStopping,
isAssistantVoice,
assistantThinking: assistant.thinking || assistant.busy,
});
@@ -288,13 +290,18 @@ export default function App() {
phase: listeningEntrancePhase,
});
const isCompactPill = isRecording ? listeningEntrance.compactPill : voiceActivity.compactPill;
+ // The native window grows during the entrance's static thinking hold, not
+ // when the pill starts its width transition: a setBounds landing mid
+ // animation forces compositor work that visibly stutters the expansion, and
+ // the growing pill can clip against the old bounds if the resize IPC lags.
+ const windowFitsCompactPill = isRecording || voiceActivity.compactPill;
const { dictationErrorPillHandoffActive } = useMainWindowSizeOwner({
requestMainWindowSize,
dictationErrorActionCount,
toastCount,
isCommandMenuOpen,
- isCompactPill,
+ isCompactPill: windowFitsCompactPill,
assistantOpen: assistant.open,
assistantMounted: assistant.mounted,
assistantOpenRef,
@@ -580,12 +587,10 @@ export default function App() {
collapseToLogo={
listeningEntrance.collapseToLogo || assistantFooter.collapsePillToLogo
}
- beamActive={listeningEntrance.beamActive ?? undefined}
waveformVisible={listeningEntrance.waveformVisible}
waveformOnlyWhileRecording={anyPanelMounted}
integratedWithPanel={liveTranscript.open}
agentMode={agentModeActive}
- beamTheme={beamTheme}
showExpandChevron={canReopenLiveTranscript && isHovered}
getAudioLevel={getAudioLevel}
isDragging={isDragging}
diff --git a/src/components/dictation/PillWaveform.tsx b/src/components/dictation/PillWaveform.tsx
index 084d648c9..50e8bb49b 100644
--- a/src/components/dictation/PillWaveform.tsx
+++ b/src/components/dictation/PillWaveform.tsx
@@ -10,7 +10,11 @@ interface PillWaveformProps {
className?: string;
}
-const SAMPLE_INTERVAL_MS = 60;
+// Syllables run ~140-250ms; sampling much faster than that lands neighboring
+// bars inside the same syllable, which reads as a fluid ridge. 80ms spacing
+// lets adjacent bars straddle syllable onsets and gaps, so the real signal
+// itself supplies the bar-to-bar variance.
+const SAMPLE_INTERVAL_MS = 80;
/**
* Level-driven waveform: bars scroll right-to-left with the live input signal.
diff --git a/src/components/dictation/VoicePill.tsx b/src/components/dictation/VoicePill.tsx
index 8e894940c..eff7775d1 100644
--- a/src/components/dictation/VoicePill.tsx
+++ b/src/components/dictation/VoicePill.tsx
@@ -1,10 +1,9 @@
import { forwardRef, type HTMLAttributes } from "react";
-import { BorderBeam, type BorderBeamTheme } from "border-beam";
import { ChevronUp } from "lucide-react";
import { cn } from "../lib/utils";
import { PillWaveform } from "./PillWaveform";
import { VoiceIdentityIcon } from "./VoiceIdentityIcon";
-import { WAVEFORM_BAR_COUNT } from "./waveformMath";
+import { RESTING_WAVE_SILHOUETTE, WAVEFORM_BAR_COUNT } from "./waveformMath";
import {
LISTENING_ENTRANCE_TIMING,
VOICE_PILL_FOOTPRINT,
@@ -19,22 +18,16 @@ interface VoicePillProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"
getAudioLevel: () => number | null;
expanded?: boolean;
collapseToLogo?: boolean;
- beamActive?: boolean;
waveformVisible?: boolean;
waveformOnlyWhileRecording?: boolean;
integratedWithPanel?: boolean;
agentMode?: boolean;
- beamTheme?: BorderBeamTheme;
showExpandChevron?: boolean;
isDragging?: boolean;
horizontalDirection?: "left" | "right";
}
const GROW_TRANSITION = `${LISTENING_ENTRANCE_TIMING.expansionMs}ms cubic-bezier(0.2, 0, 0, 1)`;
-// A pronounced eleven-bar rhythm keeps rounded short bars readable while tall
-// peaks use nearly the full lane. The same silhouette and footprint is shared
-// by dictation, Agent Mode, and Live Transcript.
-const RESTING_WAVE_SILHOUETTE = [6, 12, 5, 9, 7, 22, 18, 5, 20, 12, 17];
// Sized from WAVEFORM_BAR_COUNT so a bar-count change can never silently
// desync the resting silhouette from the live waveform's footprint.
const RESTING_WAVE_HEIGHTS = Array.from(
@@ -59,12 +52,10 @@ export const VoicePill = forwardRef<HTMLDivElement, VoicePillProps>(function Voi
getAudioLevel,
expanded = false,
collapseToLogo = false,
- beamActive,
waveformVisible = true,
waveformOnlyWhileRecording = false,
integratedWithPanel = false,
agentMode = false,
- beamTheme = "auto",
showExpandChevron = false,
isDragging = false,
horizontalDirection = "right",
@@ -77,12 +68,12 @@ export const VoicePill = forwardRef<HTMLDivElement, VoicePillProps>(function Voi
const isRecording = state === "recording";
const isProcessing = state === "processing";
const isThinking = state === "thinking";
- const showThinkingBeam = beamActive ?? isThinking;
const isUnavailable = state === "unavailable";
- // An idle Agent pill is a resting control, not a progress indicator. Keep
- // its Beam for the active listening/thinking lifecycle only so reopening an
- // Agent surface never looks like work is already in flight.
- const showBorderBeam = !isUnavailable && (showThinkingBeam || (agentMode && isRecording));
+ // One Signal glow (comet orbit over a breathing halo) serves both
+ // identities; only the palette differs. It lights for the real thinking
+ // state alone — glowing during the entrance or while listening would read
+ // as work already in flight before any transcript exists.
+ const showSignalGlow = !isUnavailable && isThinking;
const isPanel = variant === "panel";
const collapseToIdentity = collapseToLogo || isThinking;
const showCompactPill =
@@ -117,7 +108,7 @@ export const VoicePill = forwardRef<HTMLDivElement, VoicePillProps>(function Voi
data-horizontal-direction={horizontalDirection}
data-integrated-with-panel={integratedWithPanel || undefined}
data-agent-mode={agentMode || undefined}
- data-agent-beam-active={(agentMode && showThinkingBeam) || undefined}
+ data-agent-beam-active={(agentMode && isThinking) || undefined}
data-expand-chevron={showExpandChevron || undefined}
{...props}
>
@@ -206,24 +197,16 @@ export const VoicePill = forwardRef<HTMLDivElement, VoicePillProps>(function Voi
);
return (
- <BorderBeam
- size="sm"
- theme={beamTheme}
- duration={1.6}
- colorVariant={agentMode ? "ocean" : "colorful"}
- brightness={agentMode ? 1.35 : 1.3}
- saturation={agentMode ? 1.35 : undefined}
- hueRange={agentMode ? 8 : undefined}
- strength={agentMode ? 0.9 : 0.85}
- active={showBorderBeam}
- borderRadius={20}
- className={cn(
- "agent-thinking-beam inline-flex rounded-full",
- isThinking && !agentMode && "plain-dictation-processing-glow"
- )}
- data-agent-mode={agentMode || undefined}
- >
+ <span className="voice-pill-glow-anchor">
+ <span
+ aria-hidden="true"
+ className="processing-signal-glow"
+ data-active={showSignalGlow ? "true" : undefined}
+ data-agent={agentMode || undefined}
+ >
+ <span className="processing-signal-ring" />
+ </span>
{pill}
- </BorderBeam>
+ </span>
);
});
diff --git a/src/components/dictation/waveformMath.ts b/src/components/dictation/waveformMath.ts
index 5c6cc5d19..1296e4ed3 100644
--- a/src/components/dictation/waveformMath.ts
+++ b/src/components/dictation/waveformMath.ts
@@ -2,10 +2,19 @@ export const WAVEFORM_BAR_COUNT = 11;
export const WAVEFORM_BAR_MIN_PX = 4;
export const WAVEFORM_BAR_MAX_PX = 22;
-// Conversational speech RMS sits around 0.02–0.15; a square-root curve lifts
-// quiet speech into the visible range while loud peaks still cap out.
-const LEVEL_GAIN = 6;
-const toBarLevel = (rms: number) => Math.min(1, Math.sqrt(Math.max(0, rms) * LEVEL_GAIN));
+// A pronounced eleven-bar rhythm keeps rounded short bars readable while tall
+// peaks use nearly the full lane. Only the resting wave draws this shape —
+// the live wave renders the measured signal, never a decorative profile.
+export const RESTING_WAVE_SILHOUETTE = [6, 12, 5, 9, 7, 22, 18, 5, 20, 12, 17];
+
+// Conversational speech RMS sits around 0.02–0.15. The gain puts loud voicing
+// at the top of the lane; the 0.75 exponent keeps quiet speech visible while
+// preserving contrast between neighboring samples — a square-root curve
+// compressed them into a fluid ridge with little bar-to-bar variance.
+const LEVEL_GAIN = 8;
+const LEVEL_EXPONENT = 0.75;
+const toBarLevel = (rms: number) =>
+ Math.min(1, Math.pow(Math.max(0, rms) * LEVEL_GAIN, LEVEL_EXPONENT));
export const resolveWaveformBarHeight = (rms: number) =>
WAVEFORM_BAR_MIN_PX + toBarLevel(rms) * (WAVEFORM_BAR_MAX_PX - WAVEFORM_BAR_MIN_PX);
diff --git a/src/helpers/voicePillPresentation.js b/src/helpers/voicePillPresentation.js
index 6534f74ea..fdef3b9de 100644
--- a/src/helpers/voicePillPresentation.js
+++ b/src/helpers/voicePillPresentation.js
@@ -168,7 +168,6 @@ export function resolveListeningEntrancePresentation({ isRecording, phase }) {
if (!isRecording) {
return {
activeState: null,
- beamActive: null,
collapseToLogo: false,
compactPill: false,
waveformVisible: true,
@@ -182,7 +181,6 @@ export function resolveListeningEntrancePresentation({ isRecording, phase }) {
// waveform can sample audio while hidden and its reveal changes opacity
// only; it never remounts or changes the pill's layout.
activeState: "recording",
- beamActive: true,
collapseToLogo: true,
compactPill: false,
waveformVisible: false,
@@ -195,7 +193,6 @@ export function resolveListeningEntrancePresentation({ isRecording, phase }) {
// reveal, so the presentation must not change between them.
return {
activeState: "recording",
- beamActive: false,
collapseToLogo: false,
compactPill: true,
waveformVisible: false,
@@ -204,7 +201,6 @@ export function resolveListeningEntrancePresentation({ isRecording, phase }) {
return {
activeState: "recording",
- beamActive: false,
collapseToLogo: false,
compactPill: true,
waveformVisible: true,
diff --git a/src/helpers/windowConfig.js b/src/helpers/windowConfig.js
index 1978dbacb..051e2bc02 100644
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@ -126,8 +126,12 @@ function fitDictationErrorWindowToWorkArea(requestedSize, workArea) {
}
const WINDOW_SIZES = {
- BASE: { width: 96, height: 96 },
- RECORDING: { width: 128, height: 96 },
+ // The pill docks 12px from the window's bottom corner (voice-pill-position
+ // classes); the remaining area is click-through headroom so the hover
+ // tooltip and the Signal glow's halo render without clipping at the window
+ // bounds. Sized with dictation-panel.css's dock insets — change together.
+ BASE: { width: 176, height: 120 },
+ RECORDING: { width: 208, height: 120 },
DICTATION_ERROR: { width: DICTATION_ERROR_WINDOW_LIMITS.width, height: 112 },
DICTATION_ERROR_WITH_TRANSCRIPT: {
width: DICTATION_ERROR_WINDOW_LIMITS.width,
diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.js
index 72fb4c29f..fa00ed44e 100644
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@ -1,4 +1,4 @@
-const { app, screen, BrowserWindow, shell, dialog } = require("electron");
+const { app, screen, BrowserWindow, shell, dialog, ipcMain } = require("electron");
const debugLogger = require("./debugLogger");
const HotkeyManager = require("./hotkeyManager");
const { isGlobeLikeHotkey } = HotkeyManager;
@@ -42,6 +42,7 @@ class WindowManager {
constructor() {
this.mainWindow = null;
this.controlPanelWindow = null;
+ this._resizeMaskTokenCounter = 0;
this._controlPanelVisibilityTimer = null;
this._onboardingRestoreBounds = null;
this._onboardingWindowMode = null;
@@ -291,13 +292,30 @@ class WindowManager {
async _prepareRendererForMainWindowResize(bounds, anchor) {
if (!this.mainWindow || this.mainWindow.isDestroyed()) return;
- this.mainWindow.webContents.send("main-window-will-resize", { bounds, anchor });
- // Give the renderer one frame to install screen-space anchor compensation
- // before setBounds reaches the OS compositor. Without this handshake,
- // Windows and macOS can paint the new viewport size one frame before the
+ // The renderer must install screen-space anchor compensation before
+ // setBounds reaches the OS compositor. Without this handshake, Windows
+ // and macOS can paint the new viewport size one frame before the
// corresponding window position, which visibly kicks the pill or panel.
- await new Promise((resolve) => setTimeout(resolve, 24));
+ // A fixed sleep loses that race whenever the renderer is mid-task (an
+ // entrance commit, mic warm-up), so wait for its explicit ack; the
+ // timeout only covers an unresponsive or torn-down renderer.
+ const token = ++this._resizeMaskTokenCounter;
+ const ackPromise = new Promise((resolve) => {
+ const listener = (_event, ackToken) => {
+ if (ackToken !== token) return;
+ ipcMain.removeListener("main-window-resize-mask-ready", listener);
+ clearTimeout(timeout);
+ resolve();
+ };
+ const timeout = setTimeout(() => {
+ ipcMain.removeListener("main-window-resize-mask-ready", listener);
+ resolve();
+ }, 60);
+ ipcMain.on("main-window-resize-mask-ready", listener);
+ });
+ this.mainWindow.webContents.send("main-window-will-resize", { bounds, anchor, token });
+ await ackPromise;
}
_enqueueMainWindowMutation(run) {
diff --git a/src/hooks/useAudioRecording.js b/src/hooks/useAudioRecording.js
index cc9241693..04eecf805 100644
--- a/src/hooks/useAudioRecording.js
+++ b/src/hooks/useAudioRecording.js
@@ -535,6 +535,13 @@ export const useAudioRecording = (toast, options = {}) => {
},
"streaming"
);
+ // The text has landed at the cursor; a preview lingering with the
+ // final transcript after the paste reads as a stray surface. A
+ // failed paste keeps the final flash so the transcript stays
+ // visible somewhere.
+ if (pasteSucceeded) {
+ window.electronAPI?.hideDictationPreview?.();
+ }
} else if (keepTranscriptionInClipboard && !result.assistantConversation) {
await navigator.clipboard.writeText(result.text);
}
diff --git a/src/hooks/useWindowResizeCompensation.js b/src/hooks/useWindowResizeCompensation.js
index 7f5f91570..b19dd1255 100644
--- a/src/hooks/useWindowResizeCompensation.js
+++ b/src/hooks/useWindowResizeCompensation.js
@@ -101,6 +101,11 @@ export function useWindowResizeCompensation() {
cancelAnimationFrame(frame);
clearCompensation();
frame = requestAnimationFrame(sample);
+ // The main process holds setBounds until the mask is armed; a fixed
+ // delay on its side loses the race whenever this renderer is busy.
+ if (resize.token !== undefined) {
+ window.electronAPI?.ackMainWindowResizeMask?.(resize.token);
+ }
});
window.addEventListener("resize", handleRendererResize);
diff --git a/src/styles/dictation-panel.css b/src/styles/dictation-panel.css
index ec56bd406..c2387bdf9 100644
--- a/src/styles/dictation-panel.css
+++ b/src/styles/dictation-panel.css
@@ -231,40 +231,141 @@
0 0 10px color-mix(in oklch, var(--color-agent-brand) 18%, transparent);
}
-/* The Beam package's compact light preset is deliberately faint. Keep its
- darker light-theme palette visible against our pale surfaces without
- changing the established dark-mode treatment. */
-:root:not(.dark) .agent-thinking-beam {
- --beam-stroke-opacity: 5;
- --beam-inner-opacity: 1.1;
- --beam-bloom-opacity: 0.8;
+/* The Signal glow: a comet orbiting a breathing ambient halo around the
+ pill. Both identities light it for the thinking state only — brand blue
+ for dictation processing, the agent's purple for agent thinking. */
+.voice-pill-glow-anchor {
+ position: relative;
+ display: inline-flex;
+ border-radius: 9999px;
+}
+
+/* The orbit animates the conic gradients' start angle instead of rotating
+ the layers, so the same glow tracks the circular thinking pill and the
+ expanded recording capsule alike. */
+@property --signal-angle {
+ syntax: "<angle>";
+ initial-value: 0deg;
+ inherits: true;
+}
+
+.processing-signal-glow {
+ --signal-bright: #38bdf8;
+ --signal-core: #2563eb;
+ --signal-deep: #6366f1;
+ --signal-head: #eaf6ff;
+ --signal-halo-opacity: 0.8;
+ --signal-comet-opacity: 0.95;
+ position: absolute;
+ inset: 0;
+ border-radius: 9999px;
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 220ms ease-out;
+}
+
+/* Agent Mode keeps the identical glow in its purple identity. */
+.processing-signal-glow[data-agent="true"] {
+ --signal-bright: #a78bfa;
+ --signal-core: #8787ff;
+ --signal-deep: #7c3aed;
+ --signal-head: #f2edff;
+}
+
+:root:not(.dark) .processing-signal-glow {
+ --signal-halo-opacity: 0.7;
+ --signal-comet-opacity: 0.85;
+}
+
+.processing-signal-glow[data-active="true"] {
+ opacity: 1;
+}
+
+/* Breathing ambient halo, sized to stay inside the pill's 12px dock inset
+ (see WINDOW_SIZES in windowConfig.js) so it never hard-clips at the native
+ window bounds. */
+.processing-signal-glow::before {
+ content: "";
+ position: absolute;
+ inset: -4px;
+ border-radius: 9999px;
+ background: radial-gradient(
+ closest-side,
+ color-mix(in srgb, var(--signal-core) 90%, transparent) 45%,
+ color-mix(in srgb, var(--signal-deep) 70%, transparent) 75%,
+ transparent
+ );
+ filter: blur(5px);
+ opacity: var(--signal-halo-opacity);
}
-/* Plain dictation contracts to the identity circle while processing. Match
- the radial bloom's perceived strength to dark mode without strengthening
- the listening entrance or Agent Mode beam. */
-:root:not(.dark) .agent-thinking-beam.plain-dictation-processing-glow {
- --beam-stroke-opacity: 6.25;
- --beam-bloom-opacity: 2.2;
+/* Soft bloom trailing the comet head. */
+.processing-signal-glow::after {
+ content: "";
+ position: absolute;
+ inset: -4px;
+ border-radius: 9999px;
+ background: conic-gradient(
+ from var(--signal-angle),
+ transparent 0 55%,
+ color-mix(in srgb, var(--signal-core) 70%, transparent) 82%,
+ var(--signal-bright) 100%
+ );
+ filter: blur(4px);
+ opacity: var(--signal-comet-opacity);
}
-:root:not(.dark) .agent-thinking-beam::before,
-:root:not(.dark) .agent-thinking-beam::after,
-:root:not(.dark) .agent-thinking-beam [data-beam-bloom] {
- mix-blend-mode: multiply;
+/* Gradient ring whose white-hot head cools through the bright hue into the
+ deep tail. */
+.processing-signal-ring {
+ position: absolute;
+ inset: -2px;
+ border-radius: 9999px;
+ padding: 2.5px;
+ background: conic-gradient(
+ from var(--signal-angle),
+ color-mix(in srgb, var(--signal-core) 25%, transparent) 0%,
+ color-mix(in srgb, var(--signal-deep) 55%, transparent) 45%,
+ var(--signal-core) 75%,
+ var(--signal-bright) 94%,
+ var(--signal-head) 100%
+ );
+ -webkit-mask:
+ linear-gradient(#fff 0 0) content-box,
+ linear-gradient(#fff 0 0);
+ -webkit-mask-composite: xor;
+ mask:
+ linear-gradient(#fff 0 0) content-box,
+ linear-gradient(#fff 0 0);
+ mask-composite: exclude;
}
-:root:not(.dark) .agent-thinking-beam[data-agent-mode="true"] {
- --beam-stroke-opacity: 5.25;
- --beam-inner-opacity: 0;
- --beam-bloom-opacity: 0;
+/* Animations only run while active so the always-visible idle pill costs
+ nothing; the 220ms fade covers the frozen final frame on exit. */
+.processing-signal-glow[data-active="true"]::before {
+ animation: processing-signal-breathe 1.9s ease-in-out infinite;
}
-.agent-thinking-beam[data-agent-mode="true"] {
- --beam-hue-base: 18deg;
- --beam-stroke-opacity: 1.18;
- --beam-inner-opacity: 0;
- --beam-bloom-opacity: 0;
+.processing-signal-glow[data-active="true"] {
+ animation: processing-signal-spin 1.6s linear infinite;
+}
+
+@keyframes processing-signal-spin {
+ to {
+ --signal-angle: 360deg;
+ }
+}
+
+@keyframes processing-signal-breathe {
+ 0%,
+ 100% {
+ opacity: calc(var(--signal-halo-opacity) * 0.55);
+ transform: scale(0.96);
+ }
+ 50% {
+ opacity: var(--signal-halo-opacity);
+ transform: scale(1.05);
+ }
}
.expanding-panel-surface[data-panel-mode="live-transcript"][data-panel-stage="encapsulated"] {
@@ -304,20 +405,24 @@
will-change: left, bottom, transform;
}
+/* Floating docks keep the pill 12px inside the window so the Signal glow's
+ halo and the hover tooltip have click-through headroom instead of clipping
+ at the window bounds. Sized with WINDOW_SIZES in windowConfig.js — change
+ together. */
.voice-pill-position-bottom-right {
- bottom: 0.25rem;
- left: calc(100% - 0.25rem);
+ bottom: 0.75rem;
+ left: calc(100% - 0.75rem);
transform: translateX(-100%);
}
.voice-pill-position-bottom-left {
- bottom: 0.25rem;
- left: 0.25rem;
+ bottom: 0.75rem;
+ left: 0.75rem;
transform: none;
}
.voice-pill-position-center {
- bottom: 0.25rem;
+ bottom: 0.75rem;
left: 50%;
transform: translateX(-50%);
}
@@ -496,9 +601,9 @@
animation-duration: 1ms !important;
}
- .agent-thinking-beam[data-active] {
- animation-duration: 1ms, 1ms !important;
- animation-iteration-count: 1, 1 !important;
+ .processing-signal-glow[data-active="true"],
+ .processing-signal-glow[data-active="true"]::before {
+ animation: none;
}
.inline-response-shimmer {
diff --git a/test/helpers/voicePillPresentation.test.js b/test/helpers/voicePillPresentation.test.js
index aab73adc7..e1fc6b305 100644
--- a/test/helpers/voicePillPresentation.test.js
+++ b/test/helpers/voicePillPresentation.test.js
@@ -278,7 +278,6 @@ test("listening entrance starts in the thinking circle before expanding", async
const { resolveListeningEntrancePresentation } = await load();
assert.deepEqual(resolveListeningEntrancePresentation({ isRecording: true, phase: "idle" }), {
activeState: "recording",
- beamActive: true,
collapseToLogo: true,
compactPill: false,
waveformVisible: false,
@@ -291,7 +290,6 @@ test("listening entrance expands before revealing the waveform", async () => {
resolveListeningEntrancePresentation({ isRecording: true, phase: "expanding" }),
{
activeState: "recording",
- beamActive: false,
collapseToLogo: false,
compactPill: true,
waveformVisible: false,
@@ -312,7 +310,6 @@ test("listening entrance settles at full width before revealing the waveform", a
assert.deepEqual(settled, {
activeState: "recording",
- beamActive: false,
collapseToLogo: false,
compactPill: true,
waveformVisible: false,
@@ -412,7 +409,6 @@ test("stopping during the entrance cancels the staged recording presentation", a
resolveListeningEntrancePresentation({ isRecording: false, phase: "expanding" }),
{
activeState: null,
- beamActive: null,
collapseToLogo: false,
compactPill: false,
waveformVisible: true,
diff --git a/test/helpers/voicePillStructure.test.js b/test/helpers/voicePillStructure.test.js
index ef86d605a..8533485ae 100644
--- a/test/helpers/voicePillStructure.test.js
+++ b/test/helpers/voicePillStructure.test.js
@@ -32,7 +32,7 @@ const pillFootprints = async () => {
const renderPill = async (state, expanded, horizontalDirection = "right", overrides = {}) => {
const { VoicePill } = await import("../../src/components/dictation/VoicePill.tsx");
- const markup = renderStatic(VoicePill, {
+ return renderStatic(VoicePill, {
variant: "floating",
state,
expanded,
@@ -40,43 +40,38 @@ const renderPill = async (state, expanded, horizontalDirection = "right", overri
getAudioLevel: () => 0,
...overrides,
});
- // BorderBeam may emit <style> blocks anywhere in its output; strip them all
- // so assertions target only the rendered DOM structure. Re-run until stable:
- // a removal can splice the surrounding text into a new <style ...> match.
- let stripped = markup;
- for (let previous = ""; previous !== stripped;) {
- previous = stripped;
- stripped = stripped.replace(/<style[^>]*>[\s\S]*?<\/style>/g, "");
- }
- return stripped;
};
-test("thinking and recording keep the same persistent Beam and pill roots", async () => {
+test("thinking and recording keep the same persistent glow and pill roots", async () => {
const thinking = await renderPill("thinking", false);
const recording = await renderPill("recording", true);
for (const markup of [thinking, recording]) {
- assert.match(markup, /^<div [^>]*data-beam="[^"]+"/);
- assert.match(markup, /^<div [^>]*class="agent-thinking-beam/);
+ assert.match(markup, /^<span class="voice-pill-glow-anchor"/);
+ assert.match(markup, /class="processing-signal-glow"/);
+ assert.match(markup, /voice-pill-control/);
}
- assert.match(thinking, /^<div [^>]*data-active=""/);
- assert.match(thinking, /plain-dictation-processing-glow/);
- assert.doesNotMatch(recording, /data-active=""/);
- assert.doesNotMatch(recording, /plain-dictation-processing-glow/);
+ assert.match(thinking, /class="processing-signal-glow" data-active="true"/);
+ assert.doesNotMatch(recording, /data-active/);
const expectedBars = await totalWaveBars();
assert.equal((thinking.match(/rounded-full bg-current/g) || []).length, expectedBars);
assert.equal((recording.match(/rounded-full bg-current/g) || []).length, expectedBars);
});
-test("plain dictation processing strengthens only the light-theme radial bloom", async () => {
+test("one Signal glow serves both identities: blue processing, purple agent", async () => {
const styles = readDictationStyles();
const agentThinking = await renderPill("thinking", false, "right", { agentMode: true });
+ // Listening must not glow in either identity: a glow before any transcript
+ // exists reads as work already in flight.
+ const agentListening = await renderPill("recording", false, "right", { agentMode: true });
+ assert.match(styles, /\.processing-signal-glow\s*\{/);
+ assert.match(styles, /:root:not\(\.dark\) \.processing-signal-glow\s*\{/);
assert.match(
- styles,
- /:root:not\(\.dark\) \.agent-thinking-beam\.plain-dictation-processing-glow\s*\{/
+ agentThinking,
+ /class="processing-signal-glow" data-active="true" data-agent="true"/
);
- assert.doesNotMatch(agentThinking, /plain-dictation-processing-glow/);
+ assert.doesNotMatch(agentListening, /data-active/);
});
test("the pill renders exactly the footprints the native window ladder is sized around", async () => {
@@ -117,9 +112,9 @@ test("an idle Agent panel starts with the normal pill and expands only while lis
assert.match(idleAgent, footprint.idle);
assert.doesNotMatch(idleAgent, footprint.recording);
- assert.doesNotMatch(idleAgent, /data-active=""/);
+ assert.doesNotMatch(idleAgent, /data-active/);
assert.match(listeningAgent, footprint.recording);
- assert.match(listeningAgent, /data-active=""/);
+ assert.doesNotMatch(listeningAgent, /data-active/);
});
test("the waveform stays to the right of the identity across docks and voice modes", async () => {
@@ -239,7 +234,7 @@ test("Live Transcript hands visual border ownership to the shared panel", async
assert.doesNotMatch(standalone, /data-integrated-with-panel/);
});
-test("Agent Mode uses the supplied mark, a purple perimeter beam, and a neutral waveform", async () => {
+test("Agent Mode uses the supplied mark, a purple perimeter glow, and a neutral waveform", async () => {
const agentRecording = await renderPill("recording", true, "right", {
agentMode: true,
});
@@ -250,13 +245,15 @@ test("Agent Mode uses the supplied mark, a purple perimeter beam, and a neutral
assert.match(AGENT_MODE_PATH, /^M6\.14226 /);
assert.match(styles, /--color-agent-brand:/);
assert.doesNotMatch(styles, /\.voice-pill-control\[data-agent-mode="true"\]\s*\{/);
- assert.match(styles, /--beam-hue-base:/);
- assert.match(styles, /--beam-inner-opacity: 0/);
- assert.match(styles, /--beam-bloom-opacity: 0/);
+ // The agent glow is the same Signal treatment re-palettes to the agent's
+ // purple around the brand color.
+ assert.match(styles, /\.processing-signal-glow\[data-agent="true"\]\s*\{/);
+ assert.match(styles, /--signal-core: #8787ff/);
assert.doesNotMatch(styles, /agent-waveform-background|agent-waveform-highlight/);
- assert.match(agentRecording, /^<div [^>]*class="agent-thinking-beam/);
- assert.match(agentRecording, /^<div [^>]*data-beam="[^"]+"/);
- assert.match(agentRecording, /^<div [^>]*data-active=""/);
+ // Listening stays glow-free; the purple Signal glow is reserved for the
+ // post-recording thinking state so "hearing you" and "working" read apart.
+ assert.match(agentRecording, /class="processing-signal-glow" data-agent="true"/);
+ assert.doesNotMatch(agentRecording, /data-active/);
assert.match(agentRecording, /data-agent-mode="true"/);
assert.match(agentRecording, /voice-identity-final-agent/);
assert.ok(agentRecording.includes(`d="${AGENT_MODE_PATH}"`));
@@ -268,15 +265,16 @@ test("Agent Mode uses the supplied mark, a purple perimeter beam, and a neutral
assert.doesNotMatch(normalRecording, /agent-waveform-background/);
});
-test("Agent thinking keeps the purple beam on the same persistent pill root", async () => {
+test("Agent thinking keeps the purple glow on the same persistent pill root", async () => {
const agentThinking = await renderPill("thinking", false, "right", {
agentMode: true,
});
- assert.match(agentThinking, /^<div [^>]*class="agent-thinking-beam/);
- assert.match(agentThinking, /^<div [^>]*data-beam="[^"]+"/);
- assert.match(agentThinking, /^<div [^>]*data-active=""/);
- assert.match(agentThinking, /^<div [^>]*data-agent-mode="true"/);
+ assert.match(
+ agentThinking,
+ /class="processing-signal-glow" data-active="true" data-agent="true"/
+ );
+ assert.match(agentThinking, /<div [^>]*data-agent-mode="true"/);
assert.match(agentThinking, /data-agent-beam-active="true"/);
});
diff --git a/test/helpers/windowPositionClamp.test.js b/test/helpers/windowPositionClamp.test.js
index 87d0a1805..fae50b498 100644
--- a/test/helpers/windowPositionClamp.test.js
+++ b/test/helpers/windowPositionClamp.test.js
@@ -54,7 +54,7 @@ const MONITOR_ABOVE = { workArea: { x: -451, y: -1440, width: 2560, height: 1440
test("the panel lands on a monitor mounted above the primary display", () => {
const position = WindowPositionUtil.getMainWindowPosition(MONITOR_ABOVE, null, "bottom-right");
- assert.deepEqual(position, { x: 2009, y: -100, width: 96, height: 96 });
+ assert.deepEqual(position, { x: 1929, y: -124, width: 176, height: 120 });
assert.ok(position.y < 0, "a display above the primary one needs a negative y");
});