Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the
|
e5e61d9 to
487deb0
Compare
b1c9aa0 to
12234c6
Compare
|
@claude review |
There was a problem hiding this comment.
An organization admin can view or raise the monthly spending cap at claude.ai/admin-settings/usage, on the Claude Code Review row under Services. The cap resets at the start of the next billing period.
Once the cap resets or is raised, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
487deb0 to
febb109
Compare
12234c6 to
e036578
Compare
febb109 to
01fccfc
Compare
e036578 to
ad3ecae
Compare
01fccfc to
fe2b404
Compare
ad3ecae to
a39d61e
Compare
Capture a visitor's ?ref= affiliate code in a cookie at the edge and forward it to register-user on sign-up, so attribution survives the gap between clicking a referral link and creating an account. - add referral-cookie lib: code normalization/validation and cookie read helper - middleware sets console_referral (30 days, HttpOnly, Secure in prod) on a valid ref param, overwriting any prior code - SessionService.createLocalUser/signUp forward an optional referralCode to POST /v1/register-user - the three sign-up paths (auth0 callback, email code verify, password signup) read the cookie and pass it through
fe2b404 to
5f0e810
Compare
a39d61e to
ba1c23e
Compare
Why
Closes CON-1189 (with #4275). A visitor who opens an affiliate's link usually browses before signing up, and may sign up days later. Console has to remember the code until then and send it with the sign-up.
Stacked on #4275.
What
middleware.tsstores a valid?ref=code in aconsole_referralcookie (30 days, HttpOnly, SameSite=Lax, Secure in production). Opening another affiliate's link replaces it, and an invalid code leaves it alone.POST /v1/register-userasreferralCode. Without a cookie, the body is unchanged.Testing
Unit specs for the cookie helpers, middleware, session service and each sign-up route. The new Auth0 callback spec reloads the route module per test because the route memoizes its handler with
once(). Mutation score on changed lines: 88.9%.