CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

Full audit and rewrite of extension — 22 bugs fixed #4023

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/typing-practice-app-0CvXPmainopened Mar 25, 2026
ccantynzcommented Mar 25, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/48co.v1/pull/14


OFFSCREEN.JS:

  • Pre-flight API key validation BEFORE recording starts
  • Errors sent as { error: '...' } not as transcript text
  • Audio streams properly released on every failure path
  • Specific error messages (401=bad key, 429=rate limit, timeout)

BACKGROUND.JS:

  • Tracks which tab STARTED recording (recordingTabId)
  • Transcription results sent to recording tab, not active tab
  • ensureOffscreen() wrapped in try/catch — reports failure to content
  • New OFFSCREEN_STARTED acknowledgment message
  • New GET_RECORDING_STATE for popup to check on open
  • Error badge state added

CONTENT.JS:

  • Separate timeout IDs for recording (60s) vs processing (30s)
  • State guard: processTranscript only runs if in recording/processing state
  • State guard: recognition.onend checks state before processing
  • TRANSCRIPTION_READY ignored if not in expected state
  • resetToIdle() helper clears ALL timers and recognition
  • Web Speech errors show error badge, not silent console.warn
  • insertText: 3 methods — execCommand → clipboard paste → DOM insert
  • START_RECORDING checks response for errors
  • Empty transcript shows error badge briefly instead of silent reset

POPUP.JS:

  • No optimistic UI updates — waits for real state from badge
  • Checks GET_RECORDING_STATE on open
  • Shows "click to force-reset" when stuck on Transcribing
  • Error state shown with red indicator and retry prompt
  • forceReset() sends to active tab content script

https://claude.ai/code/session_01PBeNmPHrD2W6A2YKZRC7V3

ccantynzcommented Mar 25, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
48co-ai-pa Ready Ready Preview, Comment Mar 25, 2026 6:41am

Request Review

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts