Skip to content

Test OpenCode review format v2#7

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

Test OpenCode review format v2#7
huynguyen03dev wants to merge 1 commit intomasterfrom
opencode-review-test-3

Conversation

@huynguyen03dev
Copy link
Copy Markdown
Owner

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

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

Returning null when the result of initialProfile() isn’t an object with id swallows the sign-in redirect and leaves the page blank for unauthenticated users. That changes auth flow correctness in a real user path. Smallest fix: remove the id guard entirely and let initialProfile() throw/return the redirect response, or explicitly return profile when it’s a redirect response instead of null.

Accessing user.emailAddresses[0].emailAddress can throw if the array is empty, which is a possible runtime edge case for users without a primary email. This would fail profile creation and break onboarding. Smallest fix: guard for an empty array (e.g., use .at(0) with a fallback or pick the primary email) and handle the missing email path explicitly before creating the profile.

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