You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SetupPage now handles a non-profile return from initialProfile by returning null, which turns an auth boundary into a blank successful response instead of redirecting to sign-in. That’s a behavior regression for unauthenticated users and can hide auth problems in production. The smallest fix is to remove this fallback in SetupPage and make initialProfile the single source of truth that always redirects/throws when unauthenticated and otherwise returns a valid profile.
Changing initialProfile from db.profile.findUnique to db.profile.findFirst is a correctness and efficiency regression because userId is uniquely indexed. findFirst weakens the invariant (it will silently pick one row if data ever drifts) and gives up Prisma’s unique-query semantics. The smallest fix is to switch back to findUnique({ where: { userId } }) so the query matches the schema contract.
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
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.
This PR intentionally contains a couple of regressions so OpenCode can review the latest PR comment style with gpt-5.3-codex.