Skip to content

feat: improve first-login onboarding and avatar handling - #769

Draft
tiankaima wants to merge 8 commits into
mainfrom
cursor/welcome-avatar-onboarding-61aa
Draft

feat: improve first-login onboarding and avatar handling#769
tiankaima wants to merge 8 commits into
mainfrom
cursor/welcome-avatar-onboarding-61aa

Conversation

@tiankaima

@tiankaima tiankaima commented Aug 8, 2026

Copy link
Copy Markdown
Member

Goal

Improve first-login onboarding: turn the dense single-page welcome into a guided staged flow, add secure custom avatar uploads, allow refreshing OAuth profile data, and close authentication test gaps.

Changed Surfaces

  • Staged welcome flow: required profile step, skippable subscriptions step, final orientation step, with a step indicator and back/skip/finish controls
  • Step state resolved on the server from the URL, so steps are deep-linkable and an incomplete profile always resolves to the profile step
  • Cloudflare Images binding: 256×256 cover transform to WebP
  • Private R2 avatar storage and profile-reference-gated public delivery
  • Processed and upstream avatars retained as reusable profile options
  • Narrow app-runtime User.profilePictures UPDATE grant; Better Auth role remains unable to write it
  • OAuth profile staging and linked-provider reauthorization
  • Sign-in and welcome unit/E2E coverage
  • User contract and both locales

Evidence

Passed:

  • bun run app:prepare
  • bunx wrangler types --include-runtime=false --check
  • bunx biome check (only 7 pre-existing non-null-assertion warnings)
  • bunx svelte-check --tsconfig ./tsconfig.json (0 errors; 13 pre-existing warnings)
  • application, test, and operational TypeScript checks
  • full Vitest suite: 2,049 passed across 330 files
  • bun run openapi:check
  • GraphQL schema snapshot: 2 passed
  • production Worker build
  • Playwright against a local Worker + PostgreSQL: welcome specs (9 passed), plus sign-in, workspace, and settings specs (57 passed) to confirm the shared auth harness still completes the staged flow

Wrangler's local Images simulator exposes the binding but cannot execute this transform, so E2E verifies the recoverable unavailable state; the successful transform/store path is covered by a binding-level unit test and the production Cloudflare Worker build.

Docs / Contracts

Updated docs/contracts/user.json (including a new welcome-staged-steps rule), messages/zh-cn.json, and messages/en-us.json.

Risk Areas

OAuth account reauthorization, Cloudflare Images availability, R2 object lifecycle, multipart form handling, public avatar authorization, deployment ordering for the app-runtime column grant, and the new welcome step contract shared with the E2E auth harness.

Cleanup

No scratch artifacts, generated Playwright output, unrelated rewrites, or manual generated Prisma/OpenAPI edits remain. worker-configuration.d.ts was regenerated with Wrangler.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 8, 2026 15:15
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
life-ustc 58b01d5 Aug 08 2026, 04:05 PM

cursoragent and others added 3 commits August 8, 2026 15:17
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

cursoragent and others added 3 commits August 8, 2026 15:49
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
Co-authored-by: Tiankai Ma <tiankaima.dev@gmail.com>
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.

2 participants