Skip to content

feat(code): allow users to record custom notification sounds#1629

Draft
robbie-c wants to merge 1 commit intomainfrom
posthog-code/custom-notification-sound
Draft

feat(code): allow users to record custom notification sounds#1629
robbie-c wants to merge 1 commit intomainfrom
posthog-code/custom-notification-sound

Conversation

@robbie-c
Copy link
Copy Markdown
Member

@robbie-c robbie-c commented Apr 13, 2026

Problem

Users can only pick from a fixed set of 11 bundled notification sounds. Some users (me) want to set a custom sound that's personal or more noticeable to them.

Changes

  • Add "custom" to the CompletionSound union type
  • Add saveCustomSound / getCustomSoundDataUrl / deleteCustomSound tRPC endpoints that store recordings in {userData}/sounds/custom-sound.webm
  • Add SoundRecorder component with a 4-state flow: permission → ready → recording (5s max) → recorded (play/save/discard)
  • Auto-detect existing mic permission to skip the "Allow microphone" step
  • Update sounds.ts to handle custom sound playback with a lazily-loaded cached data URL
  • Add "Custom recording" option (with separator) to the sound effect dropdown, plus a "Re-record" button

How did you test this?

  • Verified typecheck and lint pass via pre-commit hooks
  • Manual testing: selected custom recording, granted mic, recorded, previewed, saved, tested playback via Test button

Created with PostHog Code

Add the ability for users to record their own notification sound via
microphone directly from the settings UI. The recording is stored
locally in the app's userData directory.

- Add saveCustomSound/getCustomSoundDataUrl/deleteCustomSound tRPC endpoints
- Add "custom" option to CompletionSound type
- Add SoundRecorder component with permission, record, preview, save flow
- Update sounds.ts to handle custom sound playback with cached data URL
- Auto-detect existing mic permission to skip the allow step

Generated-By: PostHog Code
Task-Id: d0ceb2b8-f72e-4cda-a1ee-b1423e3d66a3
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