Skip to content

Remove fully-rolled-out audio_previews feature flag#6107

Merged
gumclaw merged 1 commit into
mainfrom
remove-audio-previews-flag
Jul 21, 2026
Merged

Remove fully-rolled-out audio_previews feature flag#6107
gumclaw merged 1 commit into
mainfrom
remove-audio-previews-flag

Conversation

@gumclaw

@gumclaw gumclaw commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What

Removes the audio_previews Flipper flag and its dead branches. The flag is globally enabled in production (state=on, boolean=true; prod-state audit request 20260721T025828Z-d0d55a50, gumroad-private#1208) and the gated code has been stable since 2025-04.

Why

Part of the rollout-flag cleanup requested on #6041 / gumroad-private#1208 (Sahil: "Do all A except content mod as kill switch"). Behavior-neutral: the flag is fully on, so every production seller already sees the "Insert audio" description-editor menu item and public audio previews render on all product pages.

Changes

  • Presenters: ProductPresenter#edit_props, ProductPresenter::ProductProps#props, and BundlePresenter#bundle_props no longer emit audio_previews_enabled (was Feature.active?(:audio_previews, user) — always true in prod).
  • TSX: the audio_previews_enabled prop is removed from Product, ProductEdit/state, BundleEdit/ProductPreview, Bundles/Product/Edit, Bundles/Share/Edit, and ProductEdit/ProductPreview; DescriptionEditor drops the audioPreviewsEnabled param and its upload guard; PublicFileEmbed's "Insert audio" menu item renders unconditionally.
  • Specs: removed Feature.activate_user(:audio_previews, …) setups and the audio_previews_enabled prop assertions in the two presenter specs, rich_text_editor_spec, and bundles/edit_spec. No minitest twins (grep -rn audio_previews test/ empty). Repo-wide grep for audio_previews is now zero hits.

QA steps

Flag removal with no user-visible change (flag is 100% enabled in prod, so production behavior is already the post-removal behavior).

  1. Confirm grep -rn "audio_previews" app lib config spec test returns nothing.
  2. Run the touched specs (see Test results).

Before / After

No adjacent UI change: the description editor's "Insert audio" item and public-file audio players on product pages render identically for all production sellers before and after (the flag was globally on). The spec run below is the reviewable artifact for the behavior-neutral claim.

Test results

spec run

  • product_presenter/product_props_spec.rb -e "with public files": 1 example, 0 failures
  • product_presenter_spec.rb -e "with public files": 1 example, 0 failures
  • Full product_presenter_spec.rb + bundle_presenter_spec.rb: 42 examples, 1 failure — :102 fails identically on clean origin/main in this local env (card-charge validation in factory setup); pre-existing, unrelated.
  • npx tsc --noEmit: zero errors in touched files (only the pre-existing vite/client typelib note); prettier clean on all 9 touched TS/TSX files.

Post-merge housekeeping (after deploy confirmation): Flipper.remove(:audio_previews) via the audited console, logged against gumroad-private#1208.


AI disclosure

🤖 Generated with Claude Fable 5 (Anthropic), running as the Hermes agent "gumclaw" autonomous dev dispatcher. Prompts/instructions: continue the Category A rollout-flag cleanup per gumroad-private#1208 checklist and Sahil's "Do all A except content mod as kill switch" directive; the issue's audit table was used as the spec.

The flag is globally enabled in production (state=on, boolean=true; prod
audit request 20260721T025828Z-d0d55a50, gumroad-private#1208) and the
gated code has been stable since 2025-04. Removing the checks is
behavior-neutral: every production seller can already insert public
audio previews into product/bundle descriptions.

- Presenters (product edit_props, product page props, bundle) no longer
  emit audio_previews_enabled.
- TSX: prop removed from Product, ProductEdit state, BundleEdit and
  Bundles pages; DescriptionEditor and PublicFileEmbed's 'Insert audio'
  menu item are now unconditional.
- Specs: removed flag activations and the prop assertions.
@gumclaw
gumclaw enabled auto-merge (squash) July 21, 2026 22:26
@gumclaw

gumclaw commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Fable-style self-review — PASS (no P1/P2).

Hunt list checked:

  • Upload guard removal: DescriptionEditor's if (!audioPreviewsEnabled) return guard is gone, but the very next line still rejects non-audio extensions and the server-side PublicFile path is unchanged — no new upload capability beyond what all prod sellers already have (flag globally on).
  • typia contract: audio_previews_enabled removed from every page-props type in the same commit as the presenters, so typia.assert on Product/Bundle pages stays consistent (repo-wide grep: zero remaining references).
  • Context consumers: usePublicFilesSettings had exactly two consumers of audioPreviewsEnabled (PublicFileEmbed menuItem + DescriptionEditor onUpload); both updated. The Product-page provider never passed it (only files) — that mismatch existed before and is now resolved by dropping the field from the context type.
  • Stale pins: no minitest twins; no negative pins of the flag-off behavior remain in either suite.

Auto-merge armed per gumroad-private#1208 (Category A directive).

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the fully rolled-out audio preview feature flag. The main changes are:

  • Removes audio_previews_enabled from presenter payloads and TypeScript types.
  • Makes audio insertion available without a frontend feature check.
  • Updates product and bundle preview data paths.
  • Removes obsolete feature setup and assertions from specs.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

T-Rex T-Rex Logs

What T-Rex did

  • Compared the pre-change state to the post-change state and verified that the exact requested search returns no results.
  • Identified a blocker that prevented progress and documented it with a runtime blocker log listing Ruby, the Gemfile directive, the required .ruby-version, and a failing bundle check.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
app/javascript/components/ProductEdit/ProductTab/DescriptionEditor.tsx Removes the rollout property and guard while retaining audio validation, upload handling, and cleanup.
app/javascript/components/TiptapExtensions/PublicFileEmbed.tsx Makes the Insert audio menu item unconditional to match the completed rollout.
app/javascript/components/Product/index.tsx Removes the obsolete product field and editor-context value.
app/presenters/product_presenter.rb Removes the obsolete feature state from product edit payloads.
app/presenters/product_presenter/product_props.rb Removes the obsolete feature state from public product payloads.
app/presenters/bundle_presenter.rb Removes the obsolete feature state from bundle page payloads.

Reviews (1): Last reviewed commit: "Remove fully-rolled-out audio_previews f..." | Re-trigger Greptile

@gumclaw
gumclaw merged commit 79b1b51 into main Jul 21, 2026
86 checks passed
@gumclaw
gumclaw deleted the remove-audio-previews-flag branch July 21, 2026 22:43
gumclaw added a commit that referenced this pull request Jul 22, 2026
Part of the Category A rollout-flag audit
(antiwork/gumroad-private#1208), following the pattern of #6105 / #6107
/ #6114.

The `:tax_center` Flipper flag is 100% enabled in production (state=on,
boolean=true; prod-state audit request `20260721T025828Z-d0d55a50`) and
the tax-center code has been stable since 2025-12. Removal is
behavior-neutral — production behavior already IS the post-removal
behavior.

- `User#tax_center_enabled?` reduces to `from_us?` (US residency was
always the second condition and is the only real requirement — the tax
center serves IRS forms). Moved from `User::FeatureStatus` to
`User::Taxation` next to `from_us?`, with a comment explaining the
history.
- Specs: dropped `Feature.activate_user(:tax_center)` setups; flag-off
contexts converted to non-US-seller contexts (the guard that still
exists).

## Test results
- `spec/controllers/tax_center_controller_spec.rb` +
`spec/controllers/api/v2/tax_forms_controller_spec.rb`: **43 examples, 0
failures** locally.
- `spec/controllers/api/v2/earnings_controller_spec.rb`: 2 failures
locally, but they reproduce identically on unmodified main (purchase
factory hitting Stripe — environmental). 0 new regressions.
- Rubocop clean. Repo-wide grep: zero remaining `:tax_center` Feature
references.

Post-merge housekeeping (queued): `Flipper.remove(:tax_center)` via the
audited prod console after deploy confirmation.

🤖 Authored by gumclaw (AI agent).
gumclaw added a commit that referenced this pull request Jul 22, 2026
…plete) (#6146)

Part of the Category A rollout-flag audit
(antiwork/gumroad-private#1208), following the pattern of #6105 / #6107
/ #6114 / #6125.

## What

Removes the `:au_backtaxes` Flipper flag check from
`SettingsPresenter#aus_backtax_details` and the corresponding
`Feature.activate` setups / flag-off contexts in the presenter and
request specs.

## Why

The `:au_backtaxes` flag is 100% enabled in production (state=on,
boolean=true; prod-state audit request `20260721T025828Z-d0d55a50`) and
the AU backtax collection campaign is confirmed complete (sign-off on
gumroad-private#1208). The flag only gated the settings-page backtax
prompt, which is additionally guarded by two real conditions that remain
in place:

- the seller owes at least
`User::MIN_AU_BACKTAX_OWED_CENTS_FOR_CONTACT`, and
- an `AustraliaBacktaxEmailInfo` record exists for the seller (they
received the campaign email).

Sellers who never received a campaign email continue to see nothing, so
removal is behavior-neutral — production behavior already IS the
post-removal behavior. No UI pixels change for any seller state.

## Test results

- `spec/presenters/settings_presenter_spec.rb -e "AU backtax"`: **2
examples, 0 failures** locally.
- `spec/requests/settings/payments_spec.rb -e "Taxes collection"`: 4
failures locally, but the same section fails identically on unmodified
main in this worktree (Capybara `#app` hydration timeout —
vite-asset/browser environmental, screenshots show a blank app shell on
both). **0 new regressions**; CI will verify.
- Rubocop clean on all three touched files. Repo-wide grep: zero
remaining `:au_backtaxes` Feature references (remaining `au_backtaxes*`
hits are unrelated prop names for paid-status display).

Post-merge housekeeping (queued): `Flipper.remove(:au_backtaxes)` via
the audited prod console after deploy confirmation.

---

🤖 AI disclosure: authored by gumclaw (Claude Fable 5) as part of the
automated rollout-flag audit; flag removal, spec restructuring, and
local spec runs done by the agent.

Co-authored-by: Hermes Agent <gumclaw@users.noreply.github.com>
Co-authored-by: Sahil Lavingia <sahil@gumroad.com>
gumclaw added a commit that referenced this pull request Jul 22, 2026
## What

Removes the `utm_links` Flipper feature flag and every gate that checked
it. Only the flag *gating* is removed — the UTM links feature (model,
controllers, jobs, presenters, pages) is untouched.

- `UtmLinkPolicy#index?` / `#create?` — drop the
`Feature.active?(:utm_links, seller)` conjunct, leaving the role checks
that actually govern authorization.
- `UtmLinkSaleAttributionJob` — drop the per-visit `next unless
Feature.active?(...)` skip; visits now attribute unconditionally.
- `UtmLinkTrackingController#show` — drop the `e404 unless
Feature.active?(...)` guard; the short-link redirect is now
unconditional.
- `UtmLinkTracking` concern — drop both `Feature.active?(...)` guards in
the visit-tracking path.
- Specs — remove `Feature.activate(_user)(:utm_links)` setups (now
unconditional behavior) and delete the flag-off contexts that pinned
dead behavior.

## Why

The flag has been **100% on in production** since the UTM links feature
stabilized in 2025-04. Audited prod read `20260721T025828Z-d0d55a50`
confirms `state=on, boolean=true`. With the flag fully enabled, every
`Feature.active?(:utm_links, seller)` check already evaluates to `true`
in production, so removing it is **behavior-neutral — production
behavior already IS the post-removal behavior**. Removing the gate
deletes dead branches (the flag-off path is unreachable in prod) and
simplifies the authorization/tracking code.

This is part of the **gp#1208** rollout-flag audit, following the same
pattern proven across
#6062/#6066/#6079/#6080/#6084/#6091/#6105/#6107/#6114/#6125.

## Before/After

No UI delta — this removes a backend gate that was already fully open in
production, so there is nothing visual to capture. The reviewable
artifact is the diff plus the passing backend gate specs (below).

## Test Results

All backend specs that exercised the removed gates pass (93 examples, 0
failures) and rubocop is clean on all touched files:

![spec
run](https://raw.githubusercontent.com/antiwork/gumroad/remove-utm-links-flag/qa-media/remove-utm-links-flag-specs.png)

`spec/requests/analytics/utm_links_spec.rb` is a `:js` browser suite
whose React app does not mount in this worktree's asset pipeline; its 9
failures are **pre-existing and reproduce identically on clean `main`**
(verified by stash-bisect, by example name), so this change introduces
zero regressions.

---

## AI disclosure

Authored by Claude Opus 4.8 (Claude Code). Prompt: audit and remove the
fully-enabled `utm_links` Flipper flag (gp#1208 Category A) — delete the
`Feature.active?(:utm_links, ...)` gates while preserving the feature,
sweep both spec suites removing flag-off contexts, verify no gating hits
remain, and open this PR. The behavior-neutrality claim rests on the
audited production flag state `20260721T025828Z-d0d55a50` (flag 100%
on).

## QA steps

No preview deploy is needed — this is a behavior-neutral backend flag
removal with no UI change. To confirm nothing broke, exercise the
existing UTM links flow as any seller (the flag being removed was 100%
on, so this is the current production path):

1. Visit Analytics → Links, create a UTM link, and confirm it saves and
lists.
2. Visit the link's short URL and confirm it redirects to the UTM
destination.
3. Complete a purchase after visiting through a UTM link and confirm the
sale is attributed (driven-sale row created; UTM block appears in the
seller's sale notification email).

---------

Co-authored-by: Hermes Agent <gumclaw@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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