Skip to content

Warn when a voice note can't start, and stop the Safari client error - #374

Merged
byronwall merged 3 commits into
mainfrom
claude/voice-notes-issues-e34321
Nov 29, 2026
Merged

byronwall merged 3 commits into
mainfrom
claude/voice-notes-issues-e34321

Conversation

@byronwall

Copy link
Copy Markdown
Owner

Two voice note fixes. Voice note now tells you why it cannot start, for example when the microphone is blocked. In Safari, a new voice note no longer opens the "Client exception" dialog.

Before: With the mic blocked, tapping Voice note did nothing. When a voice note did open in Safari, the "Client exception" dialog appeared every time.
After: A toast shows "Could not start the voice note" and the reason. The note opens and records with no dialog.

Cause

  • The recorder stored the start error with no note attached. Only a note's audio strip shows recorder errors, and none was open, so the error never appeared. The mic opens before the note is created, so no note is left behind.
  • Safari sends the harmless "ResizeObserver loop completed with undelivered notifications" notice as a window error event while the recording strip lays out. The app's global handler treated every window error as a crash. Chrome does not send it on this page, which is why it did not reproduce on desktop Chrome.

Proof

Toast when the microphone is blocked
Production build, getUserMedia rejected with NotAllowedError (what a blocked site permission gives). The toast names the problem and the fix.

Safari engine (Playwright WebKit) on the production build: start a voice note from the sidebar, then wait 8 seconds.

# before
[console.error] [global-error-overlay] Client exception ResizeObserver loop completed with undelivered notifications.
overlay count 1

# after (3 desktop runs + 1 iPhone 14 run)
[console.info] [audio-recorder] recording b8ea7ffc… audio/mp4;codecs=mp4a.40.2
overlay count 0

Opening an existing note in WebKit, by reload or by a link click, showed no error before the fix either, so the notice comes from the recording flow. Chromium record, wait 12 s, then stop, at 1440 px and 390 px: 0 page errors. pnpm lint, pnpm type-check and related tests pass.

Limits

  • The ResizeObserver notice is filtered, not removed. Several observers (annotation rail, table of contents, editor) fire while the recording strip mounts. I did not find which one starts the loop, because the notice is harmless.
  • WebKit was tested with a stubbed mic stream, not a real iPhone.

🤖 Generated with Claude Code

byronwall and others added 3 commits November 28, 2026 22:23
A blocked mic stored its error with no note, and only the note's audio
strip shows errors, so the sidebar Voice note button failed silently.
Map each getUserMedia error name to a plain message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Safari sends this benign notice as a window error event while a voice
note opens, and the overlay treated it as a crash. Add a launchArgs
option to the browser-check kit for fake-mic checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes: a note created before startDocAudio failed was left
orphaned, a throwing AudioContext left the recorder stuck in starting,
and a mic error from the sidebar also showed in the open note's strip.
Drop the anchor on the ResizeObserver filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@byronwall

Copy link
Copy Markdown
Owner Author

Code review (medium): 4 findings, all fixed in 991ea04.

  • A note created before startDocAudio failed was orphaned. Voice note now opens that note, where the audio strip shows the error.
  • new AudioContext() threw outside the try, so the recorder stayed in "starting" (pre-existing). Moved it inside.
  • A sidebar mic error also showed in the open note's strip. errorFor now matches only its own note; the toast covers the rest.
  • Dropped the ^ anchor on the ResizeObserver filter.

@byronwall
byronwall merged commit 08093d8 into main Nov 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant