Skip to content

feat(credits): remove free $5 credit for new users#928

Closed
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
remove-free-5-signup-credit
Closed

feat(credits): remove free $5 credit for new users#928
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
remove-free-5-signup-credit

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 9, 2026

Summary

  • Disables the $5 automatic welcome credit that was granted to new users who pass Turnstile + Stytch validation during signup.
  • handleSignupPromotion() in src/lib/stytch.ts is now a no-op — it retains the function signature for backward compatibility (called from account-verification/page.tsx) but no longer grants any credits.
  • The automatic-welcome-credits promo category in src/lib/promoCreditCategories.ts has its amount_usd set to 0 as a belt-and-suspenders safeguard.
  • The first-day welcome notification ("We added $5 to your balance…") in src/lib/notifications.ts is disabled since it no longer applies to new users.
  • Existing users who already received the credit are unaffected — no retroactive changes.

Verification

  • pnpm typecheck — passes clean across all 29 workspace projects
  • Verified test update in src/lib/stytch.test.ts — test now asserts no credit transaction is created (DB tests cannot run in this environment due to missing pg connection, but the test logic is correct)
  • Confirmed no unused imports remain after removing grantCreditForCategory, subDays, and hasReceivedPromotion

Visual Changes

N/A

Reviewer Notes

  • The handleSignupPromotion function is kept as a no-op rather than fully deleted because account-verification/page.tsx calls it. Removing the call entirely would also be fine but this approach is more minimal.
  • The automatic-welcome-credits category still exists in promoCreditCategories.ts (with amount_usd: 0) because it's referenced by welcomeCredits.ts for checking whether existing users have already received any welcome credits (used in admin tools and customer info).
  • The first-topup bonus ($20), survey credits, referral bonuses, and other promo mechanisms are not affected by this change.

Built for Mark by Kilo for Slack

The automatic-welcome-credits grant is now a no-op. The promo category
amount is set to 0 as a safeguard, and the welcome notification
referencing the $5 bonus is disabled.
description: 'Free credits for new users who pass both Turnstile and Stytch validation',
amount_usd: 5,
description: 'Free credits for new users who pass both Turnstile and Stytch validation (disabled)',
amount_usd: 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Zeroing this category amount breaks remaining welcome-credit grants

grantCreditForCategory() falls back to the promo config's amount_usd when callers do not override it. src/scripts/d2025-10-07-backfill-github-welcome.ts:85 still grants automatic-welcome-credits without an explicit amount, so this change will create a $0 transaction while still marking the user as having received welcome credits.

@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Mar 9, 2026

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/lib/promoCreditCategories.ts 175 Setting automatic-welcome-credits to $0 makes remaining grants record a welcome-credit transaction without actually crediting the user.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
src/scripts/d2025-10-07-backfill-github-welcome.ts 86 This script still grants automatic-welcome-credits without overriding amount_usd, so it will now create a $0 transaction.
src/lib/welcomeCredits.ts 16 A zero-dollar automatic-welcome-credits transaction still counts as having received welcome credits, which can incorrectly disqualify the user from follow-up flows.

Fix these issues in Kilo Cloud

Files Reviewed (4 files)
  • src/lib/notifications.ts - 0 issues
  • src/lib/promoCreditCategories.ts - 1 issue
  • src/lib/stytch.test.ts - 0 issues
  • src/lib/stytch.ts - 0 issues

@markijbema markijbema closed this Mar 9, 2026
@markijbema markijbema reopened this Mar 9, 2026
@markijbema markijbema closed this Mar 9, 2026
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