Skip to content

feat: send the sign-up source with the first requirements update - #255

Merged
wizzomafizzo merged 1 commit into
mainfrom
feat/signup-source
Sep 3, 2026
Merged

feat: send the sign-up source with the first requirements update#255
wizzomafizzo merged 1 commit into
mainfrom
feat/signup-source

Conversation

@wizzomafizzo

@wizzomafizzo wizzomafizzo commented Sep 3, 2026

Copy link
Copy Markdown
Member
  • The account requirements call made after a sign-up now includes signup_attribution, naming the App and its platform (ios, android or web). The API records it once for a new account and ignores it afterwards, so sending it from the shared sign-in path is harmless for an existing account.
  • No identifier or device details are sent, and nothing is stored on the device.

Summary by CodeRabbit

  • New Features
    • Account creation and sign-in flows now include signup attribution details, such as the app source, sign-up medium, and platform.
    • Attribution is included for email signup, Google sign-in, and Apple sign-in flows.
    • This information is sent with the account requirements update and does not affect existing accounts.

- The requirements call made after a sign-up includes signup_attribution
  naming the App and its platform (ios, android or web). The API records
  it once for a new account and ignores it afterwards, so sending it from
  the shared sign-in path is harmless for an existing account.
- No identifier or device details are sent and nothing is stored locally.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 3f1d7920-1814-4e74-bf6d-9a040d199a19

📥 Commits

Reviewing files that changed from the base of the PR and between 14de068 and 13770bf.

📒 Files selected for processing (6)
  • src/__tests__/unit/lib/onlineApi.test.ts
  • src/__tests__/unit/lib/signupAttribution.test.ts
  • src/__tests__/unit/routes/settings.online.test.tsx
  • src/lib/models.ts
  • src/lib/signupAttribution.ts
  • src/routes/settings.online.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds signup attribution types and platform metadata. Account requirement updates now include this metadata for email, MFA, Google, and Apple signup flows. Unit and route tests cover generation and request forwarding.

Changes

Signup attribution reporting

Layer / File(s) Summary
Attribution contract and generator
src/lib/models.ts, src/lib/signupAttribution.ts
Adds the SignupAttribution interface and an optional signup_attribution request field. The helper returns app source, app medium, and the Capacitor platform.
Requirement update wiring
src/routes/settings.online.tsx
Adds attribution to post-sign-in and email signup requirement updates.
Attribution request and flow tests
src/__tests__/unit/lib/signupAttribution.test.ts, src/__tests__/unit/lib/onlineApi.test.ts, src/__tests__/unit/routes/settings.online.test.tsx
Tests platform-specific attribution, request forwarding, and attribution in signup, MFA, Google, and Apple flows.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 13770

New accounts now send app and platform signup attribution with their requirements update, while existing accounts are handled by the API as before. The request shape and covered signup flows are aligned, with no current merge-blocking risk identified.

Sequence Diagram(s)

sequenceDiagram
  participant SettingsOnline
  participant signupAttribution
  participant OnlineAPI
  participant AccountRequirements
  SettingsOnline->>signupAttribution: Create app and platform attribution
  signupAttribution-->>SettingsOnline: Return SignupAttribution
  SettingsOnline->>OnlineAPI: Call updateRequirements
  OnlineAPI->>AccountRequirements: POST /account/requirements
  AccountRequirements-->>OnlineAPI: Process requirement update
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: sending sign-up attribution with the first requirements update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/signup-source

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@wizzomafizzo
wizzomafizzo merged commit c204ba6 into main Sep 3, 2026
6 checks passed
@wizzomafizzo
wizzomafizzo deleted the feat/signup-source branch September 3, 2026 04:52
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