Skip to content

Fix up onboarding flow for self-hosted#1042

Merged
elie222 merged 3 commits intomainfrom
feat/config-page
Dec 2, 2025
Merged

Fix up onboarding flow for self-hosted#1042
elie222 merged 3 commits intomainfrom
feat/config-page

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Dec 1, 2025

Route onboarding and post-onboarding flows to /setup and update WelcomeRedirectPage redirect logic for self-hosted in Pricing.tsx and page.tsx

Redirects the Pricing "Go to app" action to /setup and updates WelcomeRedirectPage to route unauthenticated users to /login, force=true to /onboarding, users with completedOnboardingAt to /setup, and others to /onboarding. Removes NEXT_PUBLIC_APP_HOME_PATH from env and client exposure.

📍Where to Start

Start with the redirect handler in WelcomeRedirectPage in page.tsx; then review the Pricing link target in Pricing.tsx and the env removal in env.ts.


Macroscope summarized 87b3a72.

Summary by CodeRabbit

  • Bug Fixes

    • Simplified onboarding redirect flow to more reliably guide users based on their setup status.
    • Updated navigation paths for consistency.
  • Chores

    • Removed unused environment configuration.
    • Version bumped to v2.21.19.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
inbox-zero Ready Ready Preview Dec 1, 2025 2:29am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Walkthrough

This PR removes the NEXT_PUBLIC_APP_HOME_PATH environment variable from the configuration, replacing its hardcoded references with "/setup" in navigation links. It also simplifies the welcome-redirect logic by removing PostHog onboarding dependencies and updating redirect conditions, and bumps the version to v2.21.19.

Changes

Cohort / File(s) Summary
Environment Configuration
apps/web/env.ts, turbo.json
Removed NEXT_PUBLIC_APP_HOME_PATH from client env schema and Turbo build environment configuration.
Navigation Link Updates
apps/web/app/(app)/premium/Pricing.tsx, apps/web/app/(landing)/welcome/form.tsx
Replaced env.NEXT_PUBLIC_APP_HOME_PATH references with hardcoded "/setup" path in navigation links.
Welcome Redirect Logic
apps/web/app/(landing)/welcome-redirect/page.tsx
Removed PostHog onboarding condition and environment-based redirect logic. Narrowed searchParams to only force?: boolean and updated redirect flow to check force parameter and onboarding completion status.
Release
version.txt
Bumped version from v2.21.18 to v2.21.19.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify that removing NEXT_PUBLIC_APP_HOME_PATH does not break any other unmentioned references across the codebase
  • Confirm welcome-redirect redirect conditions properly handle all cases: force parameter, completed onboarding, and fallback path
  • Ensure "/setup" is the correct hardcoded destination for all replaced env references

Possibly related PRs

Poem

🐰 The home path hops away,
Now "/setup" leads the way,
PostHog checks we say goodbye,
Redirect rules simplified—we fly!
v2.21.19 takes the stage,

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix up onboarding flow for self-hosted' accurately reflects the main changes: modifications to the onboarding redirect logic, removal of environment-based routing, and simplification of navigation paths for self-hosted deployments.
✨ 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 feat/config-page

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/app/(landing)/welcome/form.tsx (1)

186-230: Remove commented-out code.

The SkipOnboardingButton component and its usage are commented out. Dead code should be removed rather than left as comments, as it adds maintenance burden and can cause confusion.

If this feature might be re-enabled in the future, consider:

  1. Removing the commented code now
  2. Tracking the feature requirement in an issue

As per coding guidelines, commented-out code should be removed to maintain code cleanliness.

Apply this diff to remove the dead code:

-        {/* {!isFinalQuestion && (
-          <SkipOnboardingButton
-            searchParams={searchParams}
-            submitPosthog={submitPosthog}
-            posthog={posthog}
-            router={router}
-          />
-        )} */}
       </div>
     </form>
   );
 };
 
-// function SkipOnboardingButton({
-//   searchParams,
-//   submitPosthog,
-//   posthog,
-//   router,
-// }: {
-//   searchParams: URLSearchParams;
-//   submitPosthog: (responses: Properties) => void;
-//   posthog: PostHog;
-//   router: AppRouterInstance;
-// }) {
-//   // // A/B test whether to show skip onboarding button
-//   // if (posthog.getFeatureFlag("show-skip-onboarding-button") === "hide")
-//   //   return null;
-
-//   return (
-//     <Button
-//       variant="ghost"
-//       className="mt-8"
-//       type="button"
-//       onClick={async () => {
-//         const responses = getResponses(searchParams);
-//         submitPosthog(responses);
-//         posthog.capture("survey dismissed", { $survey_id: surveyId });
-//         await completedOnboardingAction();
-//         router.push("/setup");
-//       }}
-//     >
-//       Skip Onboarding
-//     </Button>
-//   );
-// }
-
 function getResponses(seachParams: URLSearchParams): Record<string, string> {
🧹 Nitpick comments (1)
apps/web/app/(app)/premium/Pricing.tsx (1)

94-94: Consider centralizing the "/setup" path.

Since "/setup" is now hardcoded in multiple locations across the codebase (this file, welcome-redirect/page.tsx, and commented code in welcome/form.tsx), consider defining it as a centralized constant to improve maintainability and prevent inconsistencies.

For example, you could create a routes constant file:

// utils/routes.ts or constants/routes.ts
export const ROUTES = {
  SETUP: '/setup',
  ONBOARDING: '/onboarding',
  // ... other routes
} as const;

Then update the import and usage:

+import { ROUTES } from '@/utils/routes';
...
-<Link href="/setup">
+<Link href={ROUTES.SETUP}>
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae8bd75 and 87b3a72.

📒 Files selected for processing (6)
  • apps/web/app/(app)/premium/Pricing.tsx (1 hunks)
  • apps/web/app/(landing)/welcome-redirect/page.tsx (1 hunks)
  • apps/web/app/(landing)/welcome/form.tsx (1 hunks)
  • apps/web/env.ts (0 hunks)
  • turbo.json (0 hunks)
  • version.txt (1 hunks)
💤 Files with no reviewable changes (2)
  • apps/web/env.ts
  • turbo.json
🧰 Additional context used
📓 Path-based instructions (13)
apps/web/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.{ts,tsx}: Use TypeScript with strict null checks
Use @/ path aliases for imports from project root
Use proper error handling with try/catch blocks
Format code with Prettier
Follow consistent naming conventions using PascalCase for components
Centralize shared types in dedicated type files

Import specific lodash functions rather than entire lodash library to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
apps/web/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

Follow NextJS app router structure with (app) directory

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
apps/web/**/*.tsx

📄 CodeRabbit inference engine (apps/web/CLAUDE.md)

apps/web/**/*.tsx: Follow tailwindcss patterns with prettier-plugin-tailwindcss for class sorting
Prefer functional components with hooks over class components
Use shadcn/ui components when available
Ensure responsive design with mobile-first approach
Use LoadingContent component for async data with loading and error states

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/data-fetching.mdc)

**/*.{ts,tsx}: For API GET requests to server, use the swr package
Use result?.serverError with toastError from @/components/Toast for error handling in async operations

**/*.{ts,tsx}: Use wrapper functions for Gmail message operations (get, list, batch, etc.) from @/utils/gmail/message.ts instead of direct API calls
Use wrapper functions for Gmail thread operations from @/utils/gmail/thread.ts instead of direct API calls
Use wrapper functions for Gmail label operations from @/utils/gmail/label.ts instead of direct API calls

**/*.{ts,tsx}: For early access feature flags, create hooks using the naming convention use[FeatureName]Enabled that return a boolean from useFeatureFlagEnabled("flag-key")
For A/B test variant flags, create hooks using the naming convention use[FeatureName]Variant that define variant types, use useFeatureFlagVariantKey() with type casting, and provide a default "control" fallback
Use kebab-case for PostHog feature flag keys (e.g., inbox-cleaner, pricing-options-2)
Always define types for A/B test variant flags (e.g., type PricingVariant = "control" | "variant-a" | "variant-b") and provide type safety through type casting

**/*.{ts,tsx}: Don't use primitive type aliases or misleading types
Don't use empty type parameters in type aliases and interfaces
Don't use this and super in static contexts
Don't use any or unknown as type constraints
Don't use the TypeScript directive @ts-ignore
Don't use TypeScript enums
Don't export imported variables
Don't add type annotations to variables, parameters, and class properties that are initialized with literal expressions
Don't use TypeScript namespaces
Don't use non-null assertions with the ! postfix operator
Don't use parameter properties in class constructors
Don't use user-defined types
Use as const instead of literal types and type annotations
Use either T[] or Array<T> consistently
Initialize each enum member value explicitly
Use export type for types
Use `impo...

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/prisma-enum-imports.mdc)

Always import Prisma enums from @/generated/prisma/enums instead of @/generated/prisma/client to avoid Next.js bundling errors in client components

Import Prisma using the project's centralized utility: import prisma from '@/utils/prisma'

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

**/*.{tsx,ts}: Use Shadcn UI and Tailwind for components and styling
Use next/image package for images
For API GET requests to server, use the swr package with hooks like useSWR to fetch data
For text inputs, use the Input component with registerProps for form integration and error handling

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{tsx,ts,css}

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

Implement responsive design with Tailwind CSS using a mobile-first approach

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/ui-components.mdc)

**/*.tsx: Use the LoadingContent component to handle loading states instead of manual loading state management
For text areas, use the Input component with type='text', autosizeTextarea prop set to true, and registerProps for form integration

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

**/*.{js,jsx,ts,tsx}: Don't use accessKey attribute on any HTML element
Don't set aria-hidden="true" on focusable elements
Don't add ARIA roles, states, and properties to elements that don't support them
Don't use distracting elements like <marquee> or <blink>
Only use the scope prop on <th> elements
Don't assign non-interactive ARIA roles to interactive HTML elements
Make sure label elements have text content and are associated with an input
Don't assign interactive ARIA roles to non-interactive HTML elements
Don't assign tabIndex to non-interactive HTML elements
Don't use positive integers for tabIndex property
Don't include "image", "picture", or "photo" in img alt prop
Don't use explicit role property that's the same as the implicit/default role
Make static elements with click handlers use a valid role attribute
Always include a title element for SVG elements
Give all elements requiring alt text meaningful information for screen readers
Make sure anchors have content that's accessible to screen readers
Assign tabIndex to non-interactive HTML elements with aria-activedescendant
Include all required ARIA attributes for elements with ARIA roles
Make sure ARIA properties are valid for the element's supported roles
Always include a type attribute for button elements
Make elements with interactive roles and handlers focusable
Give heading elements content that's accessible to screen readers (not hidden with aria-hidden)
Always include a lang attribute on the html element
Always include a title attribute for iframe elements
Accompany onClick with at least one of: onKeyUp, onKeyDown, or onKeyPress
Accompany onMouseOver/onMouseOut with onFocus/onBlur
Include caption tracks for audio and video elements
Use semantic elements instead of role attributes in JSX
Make sure all anchors are valid and navigable
Ensure all ARIA properties (aria-*) are valid
Use valid, non-abstract ARIA roles for elements with ARIA roles
Use valid AR...

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

**/*.{jsx,tsx}: Don't use unnecessary fragments
Don't pass children as props
Don't use the return value of React.render
Make sure all dependencies are correctly specified in React hooks
Make sure all React hooks are called from the top level of component functions
Don't forget key props in iterators and collection literals
Don't define React components inside other components
Don't use event handlers on non-interactive elements
Don't assign to React component props
Don't use both children and dangerouslySetInnerHTML props on the same element
Don't use dangerous JSX props
Don't use Array index in keys
Don't insert comments as text nodes
Don't assign JSX properties multiple times
Don't add extra closing tags for components without children
Use <>...</> instead of <Fragment>...</Fragment>
Watch out for possible "wrong" semicolons inside JSX elements
Make sure void (self-closing) elements don't have children
Don't use target="_blank" without rel="noopener"
Don't use <img> elements in Next.js projects
Don't use <head> elements in Next.js projects

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
!(pages/_document).{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/ultracite.mdc)

Don't use the next/head module in pages/_document.js on Next.js projects

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • version.txt
  • apps/web/app/(landing)/welcome-redirect/page.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/utilities.mdc)

**/*.{js,ts,jsx,tsx}: Use lodash utilities for common operations (arrays, objects, strings)
Import specific lodash functions to minimize bundle size (e.g., import groupBy from 'lodash/groupBy')

Files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
apps/web/app/(app)/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/page-structure.mdc)

apps/web/app/(app)/**/*.{ts,tsx}: Components for the page are either put in page.tsx, or in the apps/web/app/(app)/PAGE_NAME folder
If we're in a deeply nested component we will use swr to fetch via API
If you need to use onClick in a component, that component is a client component and file must start with use client

Files:

  • apps/web/app/(app)/premium/Pricing.tsx
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-11-25T14:36:18.416Z
Learning: Applies to apps/web/**/*NEXT_PUBLIC_* : Prefix client-side environment variables with `NEXT_PUBLIC_`
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/environment-variables.mdc:0-0
Timestamp: 2025-11-25T14:36:45.807Z
Learning: Applies to apps/web/env.ts : Add client-side environment variables to `apps/web/env.ts` under the `client` object with `NEXT_PUBLIC_` prefix and Zod schema validation
📚 Learning: 2025-07-08T13:14:07.449Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 537
File: apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx:30-34
Timestamp: 2025-07-08T13:14:07.449Z
Learning: The clean onboarding page in apps/web/app/(app)/[emailAccountId]/clean/onboarding/page.tsx is intentionally Gmail-specific and should show an error for non-Google email accounts rather than attempting to support multiple providers.

Applied to files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Applies to apps/web/components/ui/**/*.tsx : Shadcn UI components are located in `components/ui` directory

Applied to files:

  • apps/web/app/(landing)/welcome/form.tsx
📚 Learning: 2025-11-25T14:38:23.265Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:23.265Z
Learning: Applies to apps/web/app/(app)/**/*.{ts,tsx} : Components for the page are either put in `page.tsx`, or in the `apps/web/app/(app)/PAGE_NAME` folder

Applied to files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:36:18.416Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-11-25T14:36:18.416Z
Learning: Applies to apps/web/app/**/*.{ts,tsx} : Follow NextJS app router structure with (app) directory

Applied to files:

  • apps/web/app/(landing)/welcome/form.tsx
  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:38:23.265Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:23.265Z
Learning: Applies to apps/web/app/(app)/*/page.tsx : Create new pages at `apps/web/app/(app)/PAGE_NAME/page.tsx`

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
  • apps/web/app/(landing)/welcome-redirect/page.tsx
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Applies to apps/web/app/**/[!.]*/route.{ts,tsx} : Use kebab-case for route directories in Next.js App Router (e.g., `api/hello-world/route`)

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:38:18.874Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:18.874Z
Learning: Applies to apps/web/app/(app)/**/page.tsx : Create new pages at `apps/web/app/(app)/PAGE_NAME/page.tsx`

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:38:56.992Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:56.992Z
Learning: Main Next.js application is located in `apps/web`

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:36:45.807Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/environment-variables.mdc:0-0
Timestamp: 2025-11-25T14:36:45.807Z
Learning: Applies to apps/web/env.ts : Add client-side environment variables to `apps/web/env.ts` under the `client` object with `NEXT_PUBLIC_` prefix and Zod schema validation

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:38:18.874Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: .cursor/rules/page-structure.mdc:0-0
Timestamp: 2025-11-25T14:38:18.874Z
Learning: Applies to apps/web/app/(app)/**/*.tsx : Components for pages are either put in `page.tsx`, or in the `apps/web/app/(app)/PAGE_NAME` folder

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-11-25T14:36:18.416Z
Learnt from: CR
Repo: elie222/inbox-zero PR: 0
File: apps/web/CLAUDE.md:0-0
Timestamp: 2025-11-25T14:36:18.416Z
Learning: Applies to apps/web/**/*.{ts,tsx} : Follow consistent naming conventions using PascalCase for components

Applied to files:

  • apps/web/app/(app)/premium/Pricing.tsx
📚 Learning: 2025-08-10T22:03:30.507Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 667
File: apps/web/app/(app)/[emailAccountId]/onboarding/page.tsx:18-25
Timestamp: 2025-08-10T22:03:30.507Z
Learning: In Next.js 15, both `params` and `searchParams` passed to page components in the App Router are Promises that need to be awaited. They should be typed as `Promise<{...}>` and accessed using `await` in server components or React's `use()` hook in client components. This is different from Next.js 14 where they were plain objects.

Applied to files:

  • apps/web/app/(landing)/welcome-redirect/page.tsx
📚 Learning: 2025-06-05T09:49:12.168Z
Learnt from: elie222
Repo: elie222/inbox-zero PR: 485
File: apps/web/app/(landing)/login/page.tsx:41-43
Timestamp: 2025-06-05T09:49:12.168Z
Learning: In Next.js App Router, components that use the `useSearchParams` hook require a Suspense boundary to handle the asynchronous nature of search parameter access. The Suspense wrapper is necessary and should not be removed when a component uses useSearchParams.

Applied to files:

  • apps/web/app/(landing)/welcome-redirect/page.tsx
🧬 Code graph analysis (2)
apps/web/app/(app)/premium/Pricing.tsx (1)
apps/web/components/new-landing/icons/Link.tsx (1)
  • Link (1-18)
apps/web/app/(landing)/welcome-redirect/page.tsx (1)
apps/web/utils/auth.ts (1)
  • auth (494-495)
⏰ 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: cubic · AI code reviewer
  • GitHub Check: Review for correctness
  • GitHub Check: test
🔇 Additional comments (2)
version.txt (1)

1-1: LGTM!

Version bump is appropriate for this release.

apps/web/app/(landing)/welcome-redirect/page.tsx (1)

5-21: LGTM! Simplified redirect logic.

The updated redirect flow is clearer and more maintainable:

  1. Force flag allows re-entering onboarding
  2. Completed users go to /setup
  3. New/incomplete users go to /onboarding

Both target routes (/onboarding and /setup) are properly implemented and delegate to redirectToEmailAccountPath() to handle account-specific routing. The removal of the question parameter and environment-based logic simplifies the interface without compromising functionality.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@elie222 elie222 merged commit 4fd018f into main Dec 2, 2025
16 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Dec 9, 2025
@elie222 elie222 deleted the feat/config-page branch December 18, 2025 23:02
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

Comments