Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(speech): recording pill matches the mobile capsule — live VU dots · Dictating… · red pause

enes32cd55783792
diff --git a/src/renderer/components/DictationOverlay.tsx b/src/renderer/components/DictationOverlay.tsx
index d03ff3fdd..7440bd9e5 100644
--- a/src/renderer/components/DictationOverlay.tsx
+++ b/src/renderer/components/DictationOverlay.tsx
@@ -15,7 +15,7 @@
// No target selected at press time never records at all — see the warning-pill render branch.
import { useCallback, useEffect, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
-import { equalizerBars } from '../lib/dictation-equalizer'
+import { scaleLevel } from '../lib/dictation-equalizer'
import { PcmCapture } from '../lib/pcm-capture'
import { useSession } from '../session/session'
import { useChatSessions } from '../state/chatSessions'
@@ -356,20 +356,28 @@ export function DictationOverlay({ target, stopSignal, onClose, onOpenLicense }:
<div className="dictation dictation--pill nodrag nowheel" onMouseDown={(e) => e.stopPropagation()}>
{phase === 'recording' && (
<div className="dictation__pill">
+ {/* Five dots as a live VU meter (mobile's capsule look, but driven
+ by the real mic level — dot i lights when the scaled level
+ crosses i/5; silence keeps one dim breathing dot). */}
+ <div className="dictation__dots" aria-hidden="true">
+ {[0, 1, 2, 3, 4].map((i) => (
+ <span
+ key={i}
+ className={`dictation__dot${scaleLevel(levelHistory[levelHistory.length - 1] ?? 0) * 5 > i ? ' lit' : ''}${i === 0 ? ' base' : ''}`}
+ />
+ ))}
+ </div>
+ <span className="dictation__label">Dictating...</span>
+ <span className="dictation__elapsed">{formatElapsed(elapsedMs)}</span>
+ <span className="dictation__spacer" />
<button
type="button"
- className="dictation__stop"
+ className="dictation__pause"
onClick={() => void stopRecording()}
title="Stop recording — transcribes & inserts"
>
- <StopIcon />
+ <PauseIcon />
</button>
- <div className="dictation__bars" aria-hidden="true">
- {equalizerBars(levelHistory).map((h, i) => (
- <span key={i} className="dictation__bar" style={{ height: `${Math.round(h * 100)}%` }} />
- ))}
- </div>
- <span className="dictation__elapsed">{formatElapsed(elapsedMs)}</span>
</div>
)}
@@ -456,10 +464,11 @@ function MicIcon() {
)
}
-function StopIcon() {
+function PauseIcon() {
return (
- <svg width={14} height={14} viewBox="0 0 24 24" fill="currentColor">
- <rect x="5" y="5" width="14" height="14" rx="2" />
+ <svg width={16} height={16} viewBox="0 0 24 24" fill="currentColor">
+ <rect x="6" y="4" width="4" height="16" rx="1.5" />
+ <rect x="14" y="4" width="4" height="16" rx="1.5" />
</svg>
)
}
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index d5476bfbd..e5d237246 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -754,44 +754,57 @@ body,
width: 100%;
}
-.dictation__stop {
+/* Mobile-matched capsule: dots · "Dictating..." · elapsed · red round pause. */
+.dictation__dots {
flex-shrink: 0;
- width: 30px;
- height: 30px;
- display: inline-flex;
+ display: flex;
align-items: center;
- justify-content: center;
- background: rgba(255, 69, 58, 0.18);
- border: 1px solid rgba(255, 69, 58, 0.5);
+ gap: 5px;
+}
+
+.dictation__dot {
+ width: 7px;
+ height: 7px;
border-radius: 50%;
- color: #ff453a;
- cursor: pointer;
+ background: #ff453a;
+ opacity: 0.22;
+ transition: opacity 80ms ease-out;
+}
+
+.dictation__dot.lit {
+ opacity: 1;
+}
+
+/* Silence still shows life: the first dot breathes on its own. */
+.dictation__dot.base:not(.lit) {
animation: dictation-pulse 1.4s ease-in-out infinite;
}
-.dictation__stop:hover {
- background: rgba(255, 69, 58, 0.28);
+.dictation__label {
+ color: var(--text);
+ font-size: 14px;
}
-.dictation__bars {
+.dictation__spacer {
flex: 1 1 auto;
- display: flex;
- align-items: flex-end;
+}
+
+.dictation__pause {
+ flex-shrink: 0;
+ width: 40px;
+ height: 40px;
+ display: inline-flex;
+ align-items: center;
justify-content: center;
- gap: 3px;
- height: 22px;
+ background: #ff453a;
+ border: none;
+ border-radius: 50%;
+ color: #fff;
+ cursor: pointer;
}
-.dictation__bar {
- flex: 1 1 0;
- max-width: 4px;
- min-height: 3px;
- /* Rounded tops, flat bottoms — reads as a bar rising off a baseline rather than a floating
- pill, and the flat bottom keeps the idle-floor row looking like a deliberate baseline
- (not a row of dots) when the take is quiet. */
- border-radius: 3px 3px 1px 1px;
- background: var(--accent);
- transition: height 70ms ease-out;
+.dictation__pause:hover {
+ background: #ff5f55;
}
/* ---- Terminal node ---- */