Skip to content

Test OpenCode review format#6

Open
huynguyen03dev wants to merge 1 commit intomasterfrom
opencode-review-test-2
Open

Test OpenCode review format#6
huynguyen03dev wants to merge 1 commit intomasterfrom
opencode-review-test-2

Conversation

@huynguyen03dev
Copy link
Copy Markdown
Owner

This PR intentionally contains a couple of regressions so OpenCode can review the new PR comment style.

Co-authored-by: Amp <amp@ampcode.com>
@github-actions
Copy link
Copy Markdown

The new if (!("id" in profile)) return null; in the setup page looks like it will swallow the Clerk redirect for unauthenticated users. initialProfile() already calls redirectToSignIn() when there’s no user; returning null here means the page renders blank instead of redirecting. Smallest fix is to remove this guard and let initialProfile() handle the redirect, or return the redirect result from the page if you want to keep a guard.

Switching findUnique to findFirst for userId weakens the query now that Profile.userId is declared @unique. That change hides data integrity issues and can return an arbitrary row if duplicates ever exist, which is exactly what findUnique prevents. I’d revert to findUnique so Prisma enforces the unique constraint and keeps the intent explicit.

github run

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