Skip to content

Conversation

ameer2468
Copy link
Collaborator

@ameer2468 ameer2468 commented Oct 15, 2025

Summary by CodeRabbit

  • Refactor

    • Streamlined onboarding by removing the separate “Download” step.
    • Inviting your team now also marks download as complete, keeping progress consistent.
    • Continue now takes you directly to the dashboard, with fewer transitions.
  • Bug Fixes

    • Eliminated auto-triggered actions and refreshes during onboarding that could cause unexpected redirects or error toasts.
    • Removed unnecessary loading spinner/disabled state on Continue for a smoother, faster click-through.

Copy link
Contributor

coderabbitai bot commented Oct 15, 2025

Walkthrough

Removes the “download” onboarding step across frontend, backend RPC, and domain types. Frontend DownloadPage no longer triggers a mutation and navigates directly to /dashboard/caps. Backend deletes the download endpoint and its RPC case; inviteTeam update now sets onboardingSteps.download = true. Domain unions drop the download variants.

Changes

Cohort / File(s) Summary
Frontend Onboarding UI
apps/web/app/(org)/onboarding/components/DownloadPage.tsx
Removed useEffect-driven onboarding mutation, local transition/spinner state, and mutation handlers. Continue button now directly router.push("/dashboard/caps").
Backend Onboarding Logic
packages/web-backend/src/Users/UsersOnboarding.ts
Deleted Onboarding.download endpoint and its user update logic. Updated Onboarding.inviteTeam to also set onboardingSteps.download = true.
Backend RPC Switch
packages/web-backend/src/Users/UsersRpcs.ts
Removed "download" case from UserCompleteOnboardingStep switch; no replacement path for this step.
Domain Types
packages/web-domain/src/User.ts
Removed { step: "download", data: Void } from OnboardingStepPayload and OnboardingStepResult unions.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant FE as Frontend DownloadPage
  participant RPC as UsersRpcs
  participant SVC as UsersOnboarding
  participant DB as Database

  rect rgb(245,248,255)
  note over User,DB: Old flow (before this change)
  User->>FE: Open Download page
  FE->>RPC: completeOnboarding(step="download")
  RPC->>SVC: onboarding.download()
  SVC->>DB: Update user.onboardingSteps.download=true<br/>Set onboarding_completed_at
  SVC-->>RPC: ok
  RPC-->>FE: result(step="download")
  FE->>FE: navigate to /dashboard/caps
  end

  rect rgb(240,255,245)
  note over User,DB: New flow (after this change)
  User->>FE: Open Download page
  FE->>FE: Direct navigate to /dashboard/caps
  note over RPC,SVC: "download" step removed from RPC and service
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant FE as Frontend
  participant RPC as UsersRpcs
  participant SVC as UsersOnboarding
  participant DB as Database

  rect rgb(255,250,240)
  note over User,DB: Download flag now set via team invite path
  User->>FE: Choose "Invite Team"
  FE->>RPC: completeOnboarding(step="inviteTeam", data: ...)
  RPC->>SVC: onboarding.inviteTeam(...)
  SVC->>DB: Update onboardingSteps.inviteTeam=true<br/>Also set onboardingSteps.download=true
  SVC-->>RPC: ok
  RPC-->>FE: result(step="inviteTeam")
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A bunny clicked “Continue,” swift and sound,
No more step to fetch or spin around.
The RPCs hop lighter now, it seems,
Types trimmed neat like meadow streams.
Invite the warren, flags align—
To caps we bound, in tidy line. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title “chore: unify updating steps” is ambiguous and does not clearly convey the primary change, which is the removal of the download step from the onboarding flow and the consolidation of how onboarding steps are updated. Although it hints at step-unification, it doesn’t specify what steps or what behavior has been altered, making it hard for a reviewer to understand the main change at a glance. Consider renaming the title to explicitly mention the removal of the download step and the consolidation of onboarding step updates—for example, “chore: remove download step and unify onboarding updates”—to make the change clear and specific.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-update

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6152b43 and 7feba4c.

📒 Files selected for processing (4)
  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx (1 hunks)
  • packages/web-backend/src/Users/UsersOnboarding.ts (1 hunks)
  • packages/web-backend/src/Users/UsersRpcs.ts (0 hunks)
  • packages/web-domain/src/User.ts (0 hunks)
💤 Files with no reviewable changes (2)
  • packages/web-backend/src/Users/UsersRpcs.ts
  • packages/web-domain/src/User.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use a 2-space indent for TypeScript code.
Use Biome for formatting and linting TypeScript/JavaScript files by running pnpm format.

Use strict TypeScript and avoid any; leverage shared types

Files:

  • packages/web-backend/src/Users/UsersOnboarding.ts
  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Use kebab-case for filenames for TypeScript/JavaScript modules (e.g., user-menu.tsx).
Use PascalCase for React/Solid components.

Files:

  • packages/web-backend/src/Users/UsersOnboarding.ts
  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx
apps/web/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

On the client, always use useEffectQuery or useEffectMutation from @/lib/EffectRuntime; never call EffectRuntime.run* directly in components.

Files:

  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx
apps/web/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/web/**/*.{ts,tsx}: Use TanStack Query v5 for all client-side server state and fetching in the web app
Mutations should call Server Actions directly and perform targeted cache updates with setQueryData/setQueriesData
Run server-side effects via the ManagedRuntime from apps/web/lib/server.ts using EffectRuntime.runPromise/runPromiseExit; do not create runtimes ad hoc
Client code should use helpers from apps/web/lib/EffectRuntime.ts (useEffectQuery, useEffectMutation, useRpcClient); never call ManagedRuntime.make inside components

Files:

  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx
apps/web/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Server components needing Effect services must call EffectRuntime.runPromise(effect.pipe(provideOptionalAuth))

Files:

  • apps/web/app/(org)/onboarding/components/DownloadPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Desktop (x86_64-pc-windows-msvc, windows-latest)
  • GitHub Check: Build Desktop (aarch64-apple-darwin, macos-latest)
  • GitHub Check: Analyze (rust)
🔇 Additional comments (2)
apps/web/app/(org)/onboarding/components/DownloadPage.tsx (1)

79-79: Continue navigation is safe. Both the inviteTeam and skipToDashboard RPCs set the download flag, and the onboarding layout enforces step order before rendering DownloadPage. No mutation is needed here.

packages/web-backend/src/Users/UsersOnboarding.ts (1)

175-175: All onboarding paths mark download as complete. Verified that both inviteTeam and skipToDashboard mutations set download: true and there’s no standalone download endpoint.


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 and usage tips.

@ameer2468 ameer2468 merged commit c3a1bf4 into main Oct 15, 2025
14 of 15 checks passed
@ameer2468 ameer2468 deleted the move-update branch October 15, 2025 16:17
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