π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
chore: drop comments from the pause path and its tests
davbioaca11b30f04b
diff --git a/src/core/blur/__tests__/manager.test.ts b/src/core/blur/__tests__/manager.test.tsindex 5bbeed3..867853f 100644--- a/src/core/blur/__tests__/manager.test.ts+++ b/src/core/blur/__tests__/manager.test.ts@@ -21,12 +21,10 @@ vi.mock('@/lib/messaging', () => ({ sendMessage: vi.fn().mockResolvedValue(undefimport { BlurManager } from '../manager';-/** The panel mounts a host on <html>, so its presence is the visible overlay. */function overlayHosts(): number {return document.documentElement.querySelectorAll(':scope > [data-mimik-ignore]').length;}-/** Drains the microtask queue regardless of how deep start()'s chain gets. */async function settle() {resolvePresets?.({ blurPresets: { email: true } });await new Promise((resolve) => setTimeout(resolve, 0));@@ -49,9 +47,6 @@ describe('BlurManager start/stop races', () => {expect(overlayHosts()).toBe(1);});- // Discarding a recording right after entering blur mode used to leave the- // panel on the page forever: teardown ran before the panel existed, then the- // pending start() mounted it with active already false.it('does not mount the overlay when stop lands while the presets load', async () => {const manager = new BlurManager();manager.start();@@ -82,9 +77,6 @@ describe('BlurManager start/stop races', () => {expect(overlayHosts()).toBe(1);});- // The whole point of having both: Done keeps the masks so later screenshots- // stay redacted, and only the end of a recording takes them away. Mutating- // dismiss() into stop() used to pass the entire suite.it('dismiss closes the overlay but leaves the masks and styles in place', async () => {document.body.innerHTML = '<p>[email protected]</p>';const manager = new BlurManager();@@ -113,8 +105,6 @@ describe('BlurManager start/stop races', () => {expect(document.getElementById('mimik-blur-style')).toBeNull();});- // The CLEAR_BLUR path: Done already tore the panel down, so a stop() gated on- // `active` would leave the page blurred until the user reloaded it.it('stop still clears the masks after a dismiss has already run', async () => {document.body.innerHTML = '<p>[email protected]</p>';const manager = new BlurManager();diff --git a/src/core/blur/__tests__/restore.test.ts b/src/core/blur/__tests__/restore.test.tsindex 2ceeab9..919f121 100644--- a/src/core/blur/__tests__/restore.test.ts+++ b/src/core/blur/__tests__/restore.test.ts@@ -16,8 +16,6 @@ describe('shouldReopenBlur', () => {expect(shouldReopenBlur(state(), true)).toBe(true);});- // The overlay is a top-frame singleton; without this every iframe on the- // page would mount its own panel.it('never re-opens in a subframe', () => {expect(shouldReopenBlur(state(), false)).toBe(false);});@@ -36,7 +34,6 @@ describe('shouldReopenBlur', () => {);});- // A snapshot persisted before PAUSED existed restores with no reason at all.it('does not re-open when the reason is missing', () => {expect(shouldReopenBlur(state({ pauseReason: null }), true)).toBe(false);});diff --git a/src/core/blur/__tests__/scanner.test.ts b/src/core/blur/__tests__/scanner.test.tsindex de94c00..c95fd14 100644--- a/src/core/blur/__tests__/scanner.test.ts+++ b/src/core/blur/__tests__/scanner.test.ts@@ -54,9 +54,6 @@ describe('text node filtering', () => {});});-// These lock in the limits documented under "What Smart Blur does not cover"-// in the README. A change here is a change to a documented privacy boundary,-// so the README has to move with it.describe('documented coverage limits', () => {it('does not reach into a shadow root', () => {document.body.innerHTML = '<div id="host"></div><p>[email protected]</p>';diff --git a/src/core/blur/manager.ts b/src/core/blur/manager.tsindex 4864c0a..f701994 100644--- a/src/core/blur/manager.ts+++ b/src/core/blur/manager.ts@@ -28,10 +28,6 @@ export class BlurManager {if (this.active) return;this.active = true;- // A stop or dismiss can land while the presets load, and so can a second- // start() after one. `active` alone cannot tell "still the same start" from- // "stopped and started again", and a stale continuation that mounts a panel- // drops the reference to the live one, leaving it in the DOM unclosable.const generation = ++this.generation;injectBlurStyles();@@ -48,26 +44,12 @@ export class BlurManager {for (const event of EVENTS) document.addEventListener(event, this.handleEvent);}- /**- * Closes the overlay and removes every mask. For the end of a recording.- *- * Only the teardown is conditional on `active`: "Done" already tore the panel- * down and left the masks in place, so gating the whole method would make this- * a no-op on the one path that matters β the page would keep its injected- * style, its mask spans and its blurred inputs until the user reloaded, and- * the surviving attributes would keep withholding input values from the next- * recording. Both calls below are idempotent on a page that never blurred.- */stop() {if (this.active) this.teardown();this.scanner.stop();removeBlurStyles();}- /**- * Closes the overlay but leaves the masks in place, which is what "Done"- * does: the point of picking them is that later screenshots keep them.- */dismiss() {if (!this.active) return;this.teardown();diff --git a/src/core/blur/restore.ts b/src/core/blur/restore.tsindex 7737c68..866410f 100644--- a/src/core/blur/restore.ts+++ b/src/core/blur/restore.ts@@ -1,15 +1,6 @@import { CaptureState } from '@/core/capture/machine';import type { GetStateResponse } from '@/lib/messaging';-/**- * Whether a frame booting mid-recording should re-open the blur overlay.- *- * Only the top frame ever hosts it, and only while the recording is paused- * *for blur* β a manual pause has no overlay to restore, and a live recording- * must not have one dropped on top of it. Without this the page that loads- * after a navigation mid-blur would have no Done button, leaving the user- * paused with no way back from the page itself.- */export function shouldReopenBlur(state: GetStateResponse, isTopFrame: boolean): boolean {return isTopFrame && state.state === CaptureState.PAUSED && state.pauseReason === 'blur';}diff --git a/src/core/capture/__tests__/session-sync.test.ts b/src/core/capture/__tests__/session-sync.test.tsindex 02d3277..8aac914 100644--- a/src/core/capture/__tests__/session-sync.test.ts+++ b/src/core/capture/__tests__/session-sync.test.ts@@ -47,8 +47,6 @@ describe('CaptureSession boot sync', () => {expect(session.isActive).toBe(true);});- // The bug in issue 58: a frame that loads during blur mode used to hear- // RECORDING and start capturing behind a "capture paused" label.it('does not start capturing when the background is PAUSED', async () => {const session = await bootFrame(pausedForBlur);diff --git a/src/core/capture/events/handlers.ts b/src/core/capture/events/handlers.tsindex a9c1f0c..33d5552 100644--- a/src/core/capture/events/handlers.ts+++ b/src/core/capture/events/handlers.ts@@ -50,8 +50,6 @@ let lastClickTarget: Element | null = null;let lastClickTime = 0;export interface CaptureHandle {- /** Resolves once queued work has drained, so a caller can wait for the- * final input screenshot to land before pausing. */stop: () => Promise<void>;}diff --git a/src/core/capture/machine.ts b/src/core/capture/machine.tsindex 1521c2a..1dfafff 100644--- a/src/core/capture/machine.ts+++ b/src/core/capture/machine.ts@@ -8,7 +8,6 @@ export const CaptureState = {export type CaptureStateValue = (typeof CaptureState)[keyof typeof CaptureState];-/** Why capture is paused: the blur overlay is open, or the user pressed pause. */export type PauseReason = 'blur' | 'manual';type CaptureEvent =@@ -85,9 +84,6 @@ export const captureMachine = createMachine({},},},- // No USER_ACTION here on purpose: while paused, nothing can advance the- // step count, so the "capture paused" label cannot be contradicted by a- // frame that missed the stop broadcast.[CaptureState.PAUSED]: {on: {RESUME_CAPTURE: {diff --git a/src/core/capture/session.ts b/src/core/capture/session.tsindex ae5b481..4e20ff9 100644--- a/src/core/capture/session.ts+++ b/src/core/capture/session.ts@@ -8,11 +8,6 @@ export class CaptureSession {private activeGuideId: string | null = null;private disabled = false;- /**- * @param onSynced Called once with whatever the background reports when this- * frame boots, so a caller can react to states this session ignores β- * notably PAUSED, which must re-open the blur overlay rather than capture.- */constructor(private readonly onSynced?: (state: GetStateResponse) => void) {this.syncWithBackground();}@@ -41,8 +36,6 @@ export class CaptureSession {this.capture = startCapture(guideId, isTopFrame);}- /** Resolves once in-flight capture work has drained. Callers that pause a- * recording await this so a typing session's final screenshot still lands. */stop(): Promise<void> {if (!this.isActive) return Promise.resolve();diff --git a/src/entrypoints/background/__tests__/navigation.test.ts b/src/entrypoints/background/__tests__/navigation.test.tsindex f7644b3..6d6359a 100644--- a/src/entrypoints/background/__tests__/navigation.test.ts+++ b/src/entrypoints/background/__tests__/navigation.test.ts@@ -52,9 +52,6 @@ describe('URL tracking', () => {expect(url()).toBe('https://app.test/b');});- // A paused recording is still a recording. Without this the first step after- // the resume is stamped with the page the user was on before pausing, which- // Guide Me then replays to.it('follows a navigation while paused', async () => {actor.send({ type: 'PAUSE_CAPTURE', reason: 'blur' });@@ -86,8 +83,6 @@ describe('URL tracking', () => {});describe('content script injection', () => {- // A tab activated or loaded mid-pause would otherwise have no content script- // to answer the resume broadcast, so its clicks are never captured.it('injects into a tab activated while paused', async () => {actor.send({ type: 'PAUSE_CAPTURE', reason: 'manual' });sendMessageToTab.mockRejectedValue(new Error('no receiving end'));diff --git a/src/entrypoints/background/__tests__/pause.test.ts b/src/entrypoints/background/__tests__/pause.test.tsindex 1f150a0..757f2ad 100644--- a/src/entrypoints/background/__tests__/pause.test.ts+++ b/src/entrypoints/background/__tests__/pause.test.ts@@ -6,7 +6,6 @@ let actor: ReturnType<typeof createActor<typeof captureMachine>>;let voicePhase = 'idle';let activeTab: { id?: number; url?: string } | undefined;-/** Ordering matters more than call counts here, so record a sequence. */const { calls, record } = vi.hoisted(() => {const seq: string[] = [];return {@@ -72,8 +71,6 @@ describe('pauseCapture', () => {expect(calls).toEqual([]);});- // Speech during a pause would otherwise be transcribed and attributed to the- // step captured after the resume.it('stops narration when it was live', async () => {voicePhase = 'recording';@@ -88,8 +85,6 @@ describe('pauseCapture', () => {expect(calls).not.toContain('stopNarration');});- // The flush is what lets a typing session's final screenshot land, so it must- // finish before the caller opens the blur overlay over the page.it('flushes before returning', async () => {await pauseCapture('blur');@@ -122,8 +117,6 @@ describe('resumeCapture', () => {expect(actor.getSnapshot().context.currentGuideId).toBe(guideId);});- // A tab opened during the pause was skipped by the navigation listeners, so- // it has no content script to answer START_CAPTURE.it('injects the active tab before restarting capture', async () => {await pauseCapture('manual');calls.length = 0;@@ -179,8 +172,6 @@ describe('resumeCapture', () => {});describe('resumeFromPause', () => {- // Clearing here instead of dismissing would wipe the masks the user just- // picked, leaving every screenshot after the resume unredacted.it('dismisses the overlay and never clears the masks', async () => {await pauseCapture('blur');calls.length = 0;diff --git a/src/entrypoints/background/__tests__/paused-steps.test.ts b/src/entrypoints/background/__tests__/paused-steps.test.tsindex 5b50cc9..85db71c 100644--- a/src/entrypoints/background/__tests__/paused-steps.test.ts+++ b/src/entrypoints/background/__tests__/paused-steps.test.ts@@ -59,8 +59,6 @@ describe('step writes while PAUSED', () => {expect(captureVisibleTab).not.toHaveBeenCalled();});- // A typing session that began before the pause must not land a keystroke- // afterwards, which is the one write that used to bypass the state check.it('ignores an input step update', async () => {const { handleUpdateInputStep } = await import('../step-pipeline');state = CaptureState.PAUSED;@@ -70,9 +68,6 @@ describe('step writes while PAUSED', () => {expect(updateStepDescription).not.toHaveBeenCalled();});- // A finalize is the opposite case: it only completes a step the user finished- // *before* pausing, so dropping it would leave that step holding the- // screenshot taken while the field was still empty.it('still finalizes an input step, so the typed text is not lost', async () => {captureVisibleTab.mockRejectedValue(new Error('no tab in this harness'));const { handleFinalizeInputStep } = await import('../step-pipeline');diff --git a/src/entrypoints/background/__tests__/state-update.test.ts b/src/entrypoints/background/__tests__/state-update.test.tsindex 85592ab..77e902d 100644--- a/src/entrypoints/background/__tests__/state-update.test.ts+++ b/src/entrypoints/background/__tests__/state-update.test.ts@@ -14,7 +14,6 @@ vi.mock('@/lib/browser-api', () => ({vi.mock('@/lib/logger', () => ({ logger: { info: vi.fn(), debug: vi.fn(), warn: vi.fn(), error: vi.fn() } }));-/** A snapshot as the previous build would have persisted it: no pauseReason. */function legacyRecordingSnapshot() {const actor = createActor(captureMachine);actor.start();@@ -45,10 +44,6 @@ beforeEach(() => {});describe('getStateUpdate', () => {- // Reloading the extension mid-session restores a snapshot written by the- // build before PAUSED existed. Its context has no pauseReason at all, and an- // `undefined` reaching the panel read as paused β the pill said "capture- // paused" and the button offered Resume while the machine was RECORDING.it('reports a legacy RECORDING snapshot as recording, not paused', async () => {const { getStateUpdate } = await loadActor(legacyRecordingSnapshot());diff --git a/src/entrypoints/background/__tests__/tab-manager.test.ts b/src/entrypoints/background/__tests__/tab-manager.test.tsindex 7d65add..a8e93d8 100644--- a/src/entrypoints/background/__tests__/tab-manager.test.ts+++ b/src/entrypoints/background/__tests__/tab-manager.test.ts@@ -32,8 +32,6 @@ beforeEach(() => {});describe('blur broadcasts', () => {- // Swapping these two silently destroys the masks the user just picked, so the- // message each one sends is worth pinning by name.it('dismiss asks every tab to close the overlay and keep the masks', async () => {await broadcastDismissBlur();expect(typesSent()).toEqual(['DISMISS_BLUR', 'DISMISS_BLUR']);@@ -64,8 +62,6 @@ describe('broadcastStopCaptureAndFlush', () => {expect(typesSent()).toEqual(['STOP_CAPTURE', 'STOP_CAPTURE']);});- // A tab with no content script rejects, and a frozen one never answers at- // all β neither may hold the pause open.it('resolves even when a tab never answers', async () => {sendMessageToTab.mockImplementation(() => new Promise(() => {}));await expect(broadcastStopCaptureAndFlush()).resolves.toBeUndefined();diff --git a/src/entrypoints/background/actor.ts b/src/entrypoints/background/actor.tsindex 4c73838..96f342f 100644--- a/src/entrypoints/background/actor.ts+++ b/src/entrypoints/background/actor.ts@@ -53,8 +53,6 @@ export function getStateUpdate(): PanelStateUpdate {state: snap.value as CaptureStateValue,stepCount: snap.context.stepCount,currentGuideId: snap.context.currentGuideId,- // A snapshot persisted before PAUSED existed has no pauseReason key, so- // normalise it rather than letting `undefined` reach the panel.pauseReason: snap.context.pauseReason ?? null,};}diff --git a/src/entrypoints/background/index.ts b/src/entrypoints/background/index.tsindex e87190c..b8da5eb 100644--- a/src/entrypoints/background/index.ts+++ b/src/entrypoints/background/index.ts@@ -119,7 +119,6 @@ export default defineBackground(() => {getActor().subscribe(() => broadcastStateToPanel(getStateUpdate()));});- /** Resume, putting the microphone back if the pause took it away. */const resume = () => resumeFromPause(() => void startNarrationIfPossible());onMessage('getState', async () => {@@ -176,10 +175,6 @@ export default defineBackground(() => {onMessage('enterBlurMode', async () => {await waitUntilReady();const activeTab = await getActiveTab();- // Blur is a request to mask this page. On a tab that cannot host the- // overlay β a PDF viewer, a chrome:// page, the dashboard itself β pausing- // anyway would leave a paused recording with no blur UI and no error, so- // refuse before touching the machine.if (!activeTab?.id || !isInjectableTab(activeTab)) return { entered: false };if (!(await pauseCapture('blur'))) return { entered: false };diff --git a/src/entrypoints/background/navigation.ts b/src/entrypoints/background/navigation.tsindex 6e79b8c..1301624 100644--- a/src/entrypoints/background/navigation.ts+++ b/src/entrypoints/background/navigation.ts@@ -12,13 +12,6 @@ import { TabMessage } from '@/lib/tab-messages';import { getActor, waitUntilReady } from './actor';import { injectContentScript, isInjectableTab } from './tab-manager';-/**- * A paused recording is still a recording: the tab keeps navigating, and the URL- * has to stay current or the next step after the resume is stamped with the page- * the user was on before pausing β which then drives Guide Me's replay to the- * wrong page. Content scripts need injecting while paused for the same reason:- * a tab opened mid-pause would otherwise be deaf to the resume broadcast.- */function isLive(state: CaptureSnapshot): boolean {return state.value === CaptureState.RECORDING || state.value === CaptureState.PAUSED;}diff --git a/src/entrypoints/background/pause.ts b/src/entrypoints/background/pause.tsindex ec8e048..0188103 100644--- a/src/entrypoints/background/pause.ts+++ b/src/entrypoints/background/pause.ts@@ -10,22 +10,8 @@ import {} from './tab-manager';import { getVoiceUpdate, stopVoiceNarration } from './voice';-/** Whether narration was live when the recording was paused, so resume can- * put the microphone back the way the user left it. */let narrationWasLive = false;-/**- * Moves RECORDING β PAUSED, then stops every frame and waits for them to drain.- * Returns false when there is nothing to pause, so a caller never reports a- * pause the machine did not take.- *- * The microphone is part of what "paused" promises. Leaving it live would send- * whatever is said during the pause to the transcription provider and attribute- * it to the step captured after the resume β exactly the opposite of what- * someone pausing over sensitive data expects. Stopping narration here also- * transcribes what was said *before* the pause, which does belong to the steps- * already recorded.- */export async function pauseCapture(reason: PauseReason): Promise<boolean> {const actor = getActor();if (actor.getSnapshot().value !== CaptureState.RECORDING) return false;@@ -38,7 +24,6 @@ export async function pauseCapture(reason: PauseReason): Promise<boolean> {return true;}-/** Moves PAUSED β RECORDING and puts the live frames back to work. */export async function resumeCapture(onNarrationResume?: () => void): Promise<boolean> {const actor = getActor();if (actor.getSnapshot().value !== CaptureState.PAUSED) return false;@@ -46,8 +31,6 @@ export async function resumeCapture(onNarrationResume?: () => void): Promise<booconst guideId = actor.getSnapshot().context.currentGuideId;if (guideId) {- // A tab opened or activated during the pause was skipped by the navigation- // listeners, so it may have no content script to answer START_CAPTURE.const activeTab = await getActiveTab();if (activeTab?.id && isInjectableTab(activeTab)) await injectContentScript(activeTab.id);await broadcastStartCapture(guideId);@@ -60,15 +43,6 @@ export async function resumeCapture(onNarrationResume?: () => void): Promise<booreturn true;}-/**- * The way back from any pause, however it was entered.- *- * Dismissing rather than clearing is the whole point of having both messages:- * the masks the user just picked have to survive, or the screenshots taken- * after the resume are unredacted. Only the end of a recording clears them.- * Both the blur exit and the panel's Resume come through here so there is one- * place for that decision rather than two that can drift apart.- */export async function resumeFromPause(onNarrationResume?: () => void): Promise<boolean> {await broadcastDismissBlur();return resumeCapture(onNarrationResume);diff --git a/src/entrypoints/background/step-pipeline.ts b/src/entrypoints/background/step-pipeline.tsindex 5a578c6..25cf399 100644--- a/src/entrypoints/background/step-pipeline.ts+++ b/src/entrypoints/background/step-pipeline.ts@@ -57,17 +57,10 @@ async function takeScreenshot(stepId: string, meta: ElementMeta): Promise<string}}-/** A keystroke arriving after the user paused must not be written. */function isRecording(): boolean {return getActor().getSnapshot().value === CaptureState.RECORDING;}-/**- * A finalize only completes a step the user finished *before* pausing, so it is- * allowed to land while paused β dropping it would leave that step holding the- * screenshot taken when the field was still empty. The pause handlers await the- * flush before opening the blur overlay, so this screenshot cannot catch it.- */function isRecordingOrPaused(): boolean {return getActor().getSnapshot().value !== CaptureState.IDLE;}diff --git a/src/entrypoints/background/tab-manager.ts b/src/entrypoints/background/tab-manager.tsindex b811e71..a534d73 100644--- a/src/entrypoints/background/tab-manager.ts+++ b/src/entrypoints/background/tab-manager.ts@@ -46,17 +46,10 @@ export async function broadcastStartCapture(guideId: string): Promise<void> {}}-/**- * Closes the blur overlay everywhere, leaving the masks in place. Broadcast- * rather than aimed at the active tab, because a paused recording re-opens the- * overlay on whatever page loads, so the overlay may live in a different tab- * by the time capture resumes.- */export async function broadcastDismissBlur(): Promise<void> {await broadcastBlur(TabMessage.DISMISS_BLUR);}-/** Closes the overlay and removes the masks. For the end of a recording. */export async function broadcastClearBlur(): Promise<void> {await broadcastBlur(TabMessage.CLEAR_BLUR);}@@ -74,14 +67,8 @@ async function broadcastBlur(type: TabMessageType): Promise<void> {}}-/** A frame that never answers must not hold a pause open. */const FLUSH_TIMEOUT_MS = 1500;-/**- * Stops capture everywhere and waits for the content scripts to answer, which- * they only do once their queue has drained. Pausing mid-typing would otherwise- * drop the finalize that writes the step's real screenshot.- */export async function broadcastStopCaptureAndFlush(): Promise<void> {try {const tabs = await queryTabs({});diff --git a/src/entrypoints/content.ts b/src/entrypoints/content.tsindex d40131b..cf0c679 100644--- a/src/entrypoints/content.ts+++ b/src/entrypoints/content.ts@@ -33,8 +33,6 @@ function createTabMessageHandler(session: CaptureSession, guideMe: GuideMeControreturn true;case TabMessage.STOP_CAPTURE:- // Answered only once the queue has drained, so a pause that follows can- // rely on the final input screenshot already being written.session.stop().then(() => sendResponse({ stopped: true }));return true;@@ -88,11 +86,6 @@ export default defineContentScript({document.dispatchEvent(new CustomEvent(CLEANUP_EVENT));const blurManager = new BlurManager();- // A recording paused for blur keeps the overlay alive across navigation:- // without this, the page that loads next has no Done button, so the user- // would be stuck paused with no way back from the page itself. The state is- // re-read rather than trusted, because the boot round trip is long enough- // for a Resume to land in the middle of it.const session = new CaptureSession(async (state) => {if (!shouldReopenBlur(state, window.self === window.top)) return;const current = await sendMessage('getState', undefined).catch(() => null);diff --git a/src/locales/__tests__/coverage.test.ts b/src/locales/__tests__/coverage.test.tsindex f3c280a..c7e9bbd 100644--- a/src/locales/__tests__/coverage.test.ts+++ b/src/locales/__tests__/coverage.test.ts@@ -20,8 +20,6 @@ function localeKeys(path: string): string[] {return keys.sort();}-// Every locale, not just zh-CN: a key missing from one of the others used to-// ship silently and render as the raw key in the UI.const LOCALES = ['zh-CN', 'es', 'fr', 'de', 'pt-BR'] as const;describe('locale coverage', () => {diff --git a/src/ui/sidepanel/MicToggle.tsx b/src/ui/sidepanel/MicToggle.tsxindex 0b0e066..034aaa8 100644--- a/src/ui/sidepanel/MicToggle.tsx+++ b/src/ui/sidepanel/MicToggle.tsx@@ -11,8 +11,6 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/ui/components/ui/toolinterface MicToggleProps {enabled: boolean;live: boolean;- /** Narration cannot start while capture is paused, so the control locks- * rather than accepting a toggle the background will refuse. */paused?: boolean;onChange: (enabled: boolean) => void;}diff --git a/src/ui/sidepanel/RecordingView.tsx b/src/ui/sidepanel/RecordingView.tsxindex f50ab06..7de4868 100644--- a/src/ui/sidepanel/RecordingView.tsx+++ b/src/ui/sidepanel/RecordingView.tsx@@ -21,9 +21,7 @@ interface RecordingViewProps {onStop: () => void;voice: PanelVoiceUpdate;aiFailure: PanelAiUpdate | null;- /** True while the machine holds PAUSED. The authority on paused-ness. */paused: boolean;- /** Why it is paused, for the wording only β may be null on a restored state. */pauseReason: PauseReason | null;}@@ -107,8 +105,6 @@ export default function RecordingView({ guideId, onStop, voice, aiFailure, pauseawait sendMessage('pauseCapture', undefined);}, []);- // Either handler dismisses the overlay before resuming, so a restored state- // with no reason still recovers; the branch only keeps the blur path named.const handleResume = useCallback(async () => {await sendMessage(pauseReason === 'blur' ? 'exitBlurMode' : 'resumeCapture', undefined);}, [pauseReason]);