Commit Graph

5 Commits

Author SHA1 Message Date
bymyself
43db891c1a [bugfix] Fix TypeScript errors in typecheck
- Add @ts-expect-error directive to unused postSurveyStatus function in auth.ts
- Add @ts-expect-error for .mts import extension in vite.electron.config.mts
- Add @ts-expect-error directives for global variable assignments in vitest.setup.ts
- Remove vite.electron.config.mts from ESLint allowDefaultProject to fix duplicate inclusion error
2025-09-28 20:18:05 -07:00
bymyself
1b1cb956e6 Fix unused exports for knip check 2025-09-28 16:17:09 -07:00
Jin Yi
8ca541e850 feat: add email verification check for cloud onboarding (#5636)
## Summary
- Added email verification flow for new users during onboarding
- Implemented invite code claiming with proper validation 
- Updated API endpoints from `/invite/` to `/invite_code/` for
consistency

## Changes

### Email Verification
- Added `CloudVerifyEmailView` component with email verification UI
- Added email verification check after login in `CloudLoginView`
- Added `isEmailVerified` property to Firebase auth store
- Users must verify email before claiming invite codes

### Invite Code Flow
- Enhanced `CloudClaimInviteView` with full claim invite functionality
- Updated `InviteCheckView` to route users based on email verification
status
- Modified API to return both `claimed` and `expired` status for invite
codes
- Added proper error handling and Sentry logging for invite operations

### API Updates
- Changed endpoint paths from `/invite/` to `/invite_code/` 
- Updated `getInviteCodeStatus()` to return `{ claimed: boolean;
expired: boolean }`
- Updated `claimInvite()` to return `{ success: boolean; message: string
}`

### UI/UX Improvements
- Added Korean translations for all new strings
- Improved button styling and layout in survey and waitlist views
- Added proper loading states and error handling

## Test Plan
- [ ] Test new user signup flow with email verification
- [ ] Test invite code validation (expired/claimed/valid codes)
- [ ] Test email verification redirect flow
- [ ] Test invite claiming after email verification
- [ ] Verify Korean translations display correctly

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-20 20:29:56 -07:00
Jin Yi
33b6df55a8 feat: Add Sentry error tracking to auth API functions (#5623)
## Summary
- Added comprehensive Sentry error tracking to all auth API functions
- Implemented helper functions to reduce code duplication  
- Properly distinguish between HTTP errors and network errors

## Changes
- Added `captureApiError` helper function for consistent error reporting
- Added `isHttpError` helper to prevent duplicate error capture
- Enhanced error tracking with:
  - Proper error type classification (`http_error` vs `network_error`)
  - HTTP status codes and response details
  - Operation names for better context
  - Route templates for better API endpoint tracking

## Test plan
- [ ] Verify auth functions work correctly in normal flow
- [ ] Test error scenarios (network failures, 4xx/5xx responses)
- [ ] Confirm Sentry receives proper error reports without duplicates
- [ ] Check that error messages are informative and actionable

🤖 Generated with [Claude Code](https://claude.ai/code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5623-feat-Add-Sentry-error-tracking-to-auth-API-functions-2716d73d3650819fbb15e73d19642235)
by [Unito](https://www.unito.io)
2025-09-18 11:39:23 -07:00
Jin Yi
59a1380f39 [feat] Cloud onboarding flow implementation (#5494)
* feature: cloud onboarding scaffolding

* fix: redirect unknown routes

* feature: cloud onboarding flow

* chore: code review

* test: api mock for test failing

* refactor: Centralize onboarding routing with dedicated check views

- Add UserCheckView to handle all user status routing decisions
- Add InviteCheckView to manage invite code validation flow
- Simplify auth.ts by removing async operations and extra complexity
- Update login/signup to always redirect through UserCheckView
- Remove distributed routing logic from all onboarding components
- Simplify router guards to delegate to check views
- Fix infinite redirect loops for non-whitelisted users
- Use window.location.href for final navigation to bypass router conflicts

Breaking changes:
- Removed claimInvite from auth.ts (moved to CloudClaimInviteView)
- Changed route names to use cloud- prefix consistently
- Simplified getMe() to synchronous function

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: delete unused file

* Revert "test: api mock for test failing"

This reverts commit 06ca56c05e.

* feature: API applied

* feature: survey view

* feature: signup / login view completed

* style: min-h-screen deleted

* feature: completed login flow

* feature: router view added

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-14 16:36:57 -07:00