Skip to content

feat(git): play a producer tag sound when pushing to origin - #3628

Closed
seanpem wants to merge 3 commits into
mainfrom
posthog-code/producer-tag-on-push
Closed

feat(git): play a producer tag sound when pushing to origin#3628
seanpem wants to merge 3 commits into
mainfrom
posthog-code/producer-tag-on-push

Conversation

@seanpem

@seanpem seanpem commented Jul 21, 2026

Copy link
Copy Markdown

Problem

For anyone who wants a bit of fun in their workflow: play a signature "producer tag" — a short sound of your choosing — every time you push code to origin, à la a music producer's drop.

Changes

  • New Producer tag controls in Settings → Notifications: pick a sound (a built-in or one you import under "Custom sounds") plus a volume. Set to "None" to turn it off (default).
  • The tag drops from the single push-success path (applyPushResult in useGitInteraction), so it fires on a successful push, sync, or publish. Reuses the existing playCompletionSound helper, which no-ops when the tag is "None".
  • Settings are persisted and reset with the other notification defaults; a custom sound that's removed also clears any tag/completion selection pointing at it.
  • Extracted a shared SoundSelect so the tag picker and the completion-sound picker share one option list and the custom-sound pool.

How did you test this?

  • pnpm --filter @posthog/ui typecheck — clean.
  • biome lint on the changed files — clean.
  • pnpm --filter @posthog/ui exec vitest run over the settings and git-interaction suites — 97 passing, including new store tests for the producer-tag setters, orphan cleanup on custom-sound removal, persistence, and rehydrate normalization.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Add a "Producer tag" setting under Notifications: pick a signature sound
(built-in or an imported custom sound) that drops on a successful push,
sync, or publish to the remote.

- New producerTagSound/producerTagVolume settings, persisted and reset
  with the other notification defaults; orphaned custom-sound references
  are cleaned up alongside completionSound.
- Trigger fires from the single push-success path in useGitInteraction,
  reusing the existing playCompletionSound helper (no-ops when "none").
- Extract a shared SoundSelect so the tag picker reuses the same pool as
  the completion sound.

Generated-By: PostHog Code
Task-Id: 70d325b0-91ae-442c-bbe2-63a84000bfdb
@trunk-io

trunk-io Bot commented Jul 21, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit f8b99b8.

Add a focused Storybook story that renders the real ProducerTagSection and
Add-custom-sound dialog against the settings store, so the import-a-sound →
select-as-tag → play flow can be demoed and visually reviewed without the
authenticated app. Exports ProducerTagSection so the story can render it.

Generated-By: PostHog Code
Task-Id: 70d325b0-91ae-442c-bbe2-63a84000bfdb
@posthog

posthog Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

👋 Visual changes detected for this PR.

Review and approve in PostHog Visual Review

If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix.

The new Settings/ProducerTag story added 2 new visual snapshots, which fails
the Visual Review check until a human approves them. It's a manual demo/record
surface that doesn't need a signed baseline, so tag it "test-skip" — the
Storybook test-runner skips it from snapshot capture. The story stays visible
in Storybook for manual use.

Generated-By: PostHog Code
Task-Id: 70d325b0-91ae-442c-bbe2-63a84000bfdb
@github-actions

Copy link
Copy Markdown

This PR has had no activity for 7 days and has been marked stale. We are moving to the monorepo and tightening PR staleness in preparation, so it will be closed in 7 days if no further activity occurs.

@github-actions github-actions Bot added the stale No recent changes to PR label Jul 29, 2026
@charlesvien

Copy link
Copy Markdown
Member

Closing stale PRs ahead of Friday's monorepo migration. If this is a mistake, rebase and reopen for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale No recent changes to PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants