Skip to content

Commit 8c44fcb

Browse files
jahoomaclaude
andcommitted
Remove referrals feature while preserving existing referral data
Strip the /refer-friends CLI command, web referral pages, affiliate sponsee routes, and one-time referral redemption API. Simplify the profile referrals section to a read-only list of who you referred. Keep DB schema, legacy monthly bonus grants, and the GrantType enum so historical referrals continue to pay out. Restore creator attribution for freebuff only: /get-started already accepts ?referrer=<name> and persists it; /onboard fires a FREEBUFF_REFERRER_ATTRIBUTED PostHog event with \$set_once on first visit post-login. /onboard now redirects logged-out visitors to /get-started (or /login when an auth_code is present) and greets logged-in users with an optional "{Name} invited you to try Freebuff!" header. Fixes a pre-existing bug where auth_code was dropped when /onboard redirected unauthenticated users. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent b01d2e3 commit 8c44fcb

59 files changed

Lines changed: 46 additions & 3874 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cli/src/__tests__/helpers/mock-api-client.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface MockApiClientOverrides {
1313
usage?: ReturnType<typeof mock>
1414
loginCode?: ReturnType<typeof mock>
1515
loginStatus?: ReturnType<typeof mock>
16-
referral?: ReturnType<typeof mock>
1716
publish?: ReturnType<typeof mock>
1817
logout?: ReturnType<typeof mock>
1918
feedback?: ReturnType<typeof mock>
@@ -54,8 +53,6 @@ export const createMockApiClient = (
5453
mock(defaultOkResponse)) as CodebuffApiClient['loginCode'],
5554
loginStatus: (overrides.loginStatus ??
5655
mock(defaultOkResponse)) as CodebuffApiClient['loginStatus'],
57-
referral: (overrides.referral ??
58-
mock(defaultOkResponse)) as CodebuffApiClient['referral'],
5956
publish: (overrides.publish ??
6057
mock(defaultOkResponse)) as CodebuffApiClient['publish'],
6158
logout: (overrides.logout ??

0 commit comments

Comments
 (0)