Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
f7fc62b to
7abd8d0
Compare
7abd8d0 to
414e9a3
Compare
There was a problem hiding this comment.
Pull request overview
Introduces a reusable localStorage React hook and uses it in the graduate “New Plan” modal to persist a newly created plan locally for unauthenticated (guest) users.
Changes:
- Added
useLocalStoragehook for SSR-safe localStorage read/write. - Updated
NewPlanModalto detect auth session and store a “guest plan” locally when no user session exists.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| apps/searchneu/lib/graduate/useLocalStorage.ts | Adds a generic hook for reading/writing JSON-serialized values in localStorage. |
| apps/searchneu/components/graduate/modal/NewPlanModal.tsx | Uses session state to decide between server plan creation vs. local guest plan persistence. |
Comments suppressed due to low confidence (1)
apps/searchneu/components/graduate/modal/NewPlanModal.tsx:62
authClient.useSession()can returndata: undefinedwhile the session is still loading. As written,!session?.userwill treat “loading” as “guest”, so a signed-in user who clicks quickly could end up storing the plan in localStorage instead of creating it server-side. Consider also readingisPendingfromuseSession()and blocking submission (or showing a spinner) until session resolution, and only treatingsession === nullas unauthenticated.
const { data: session } = authClient.useSession();
//majors
const { data: supportedMajorsData, error: majorsError } =
useSupportedMajors();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Closed
|
Deployment failed with the following error: View Documentation: https://vercel.com/docs/accounts/team-members-and-roles |
6d33146 to
e90d277
Compare
3f1b96a to
0fe15ab
Compare
0fe15ab to
45ada38
Compare
45ada38 to
74bbe2d
Compare
74bbe2d to
54065a1
Compare
54065a1 to
04e2a83
Compare
+dennis 3/30 using server side to get user auth status
04e2a83 to
f2d875f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
This PR creates a 'guest-plan' in local storage to store a single plan for someone who is not signed into Search. When creating a new plan, the guest-plan will be updated with the most recent plan. This is done using useLocalStorage that has been migrated from the Graduate codebase and updating the handleCreatePlan of the newPlanModal. It does not cover updating the plan as edits are made.
dennis todo : need to integrate /guest page to display the plan from localstorage later in future ticket
Closes PR #294
Type of Change
Please tick the boxes that best match your changes.
Testing
Please describe how you tested this PR (both manually and with tests) Provide instructions so we can reproduce.
Checklist