Skip to content

Fix/require successful onboarding - #240

Open
nishthefish06 wants to merge 9 commits into
developfrom
fix/require-successful-onboarding
Open

nishthefish06 wants to merge 9 commits into
developfrom
fix/require-successful-onboarding

Conversation

@nishthefish06

@nishthefish06 nishthefish06 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Before, users could sign up, skip onboarding, and still use the app with settings, note creation, and the home page all being reachable with an incomplete profile. This adds a shared protected layout which checks onboarding completion on every request and redirects to /get-started if onboarding has not been completed. Also fixed what seemed to be an issue with the major field in the onboarding schema.
Resolves #230 #251 #252 #253.

Testing

On local host version, attempted logging in with a new account to trigger onboarding process. Attempted to access settings, note creation page, and home by using buttons and urls, and successful redirection back to onboarding always occurred.

AI Disclosure

Used GitHub copilot to find potential causes of issue and to help fix a conflict I ran into while pulling the refactor from the repo.

Checklist

  • Create this PR
  • Perform final self-review

@nishthefish06
nishthefish06 requested review from a team as code owners September 17, 2026 02:19
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
utd-notebook Ready Ready Preview Sep 22, 2026 7:43pm UTC

Request Review

@ZeyadAbbas ZeyadAbbas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have left 3 comments on 3 different files, please check them and make the necessary fixes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This layout only protects page rendering. An authenticated but incomplete user can still call /api/trpc directly because protectedProcedure checks only for a session. Note creation/upload, reports, saves, and ratings remain accessible. Add an onboarding-aware tRPC middleware/procedure for protected operations, while leaving the onboarding update and account deletion endpoints exempt.

Comment thread src/lib/schemas/account.ts
Comment thread src/lib/components/form/FormAutocomplete.tsx
@nishthefish06

Copy link
Copy Markdown
Contributor Author

changes should have dealt with the necessary fixes

@ZeyadAbbas

Copy link
Copy Markdown
Contributor

Expanded on the previously reference issue #230 to aid with the task completion.

This branch was successfully deployed

1 active deployment
Preview — e1c68e6f Deployed Sep 22, 2026 by vercel[bot]
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