-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: supabase ssr bug #106
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe recent updates across the MasterBots.ai platform focus on enhancing user data fetching and authentication processes. A new method, Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Status
Configuration used: CodeRabbit UI
Files selected for processing (5)
- apps/masterbots.ai/app/c/[chatbot]/[threadId]/page.tsx (1 hunks)
- apps/masterbots.ai/app/c/[chatbot]/page.tsx (3 hunks)
- apps/masterbots.ai/app/c/page.tsx (1 hunks)
- apps/masterbots.ai/components/layout/header.tsx (1 hunks)
- apps/masterbots.ai/services/supabase/index.ts (1 hunks)
Additional comments not posted (7)
apps/masterbots.ai/services/supabase/index.ts (1)
1-2
: Ensure all references to the renamed exports (./client
and./supa-server-client
) are updated across the application to maintain consistency and prevent import errors.Verification successful
The executed script aimed to verify if all references to the old export paths (
supa-browser-client
andsupa-server.service
) were updated, as indicated by the changes in theindex.ts
file within the Supabase service directory. The script did not produce any output, which suggests that there are no lingering references to these old paths in TypeScript files within the codebase. This implies that the renaming and adjustments in export statements, as seen in the provided code snippet, are consistent and should not lead to import errors due to unresolved references to the old export paths.Given the absence of output from the script, it can be inferred that the necessary updates across the application have been made to accommodate the changes in export paths. Therefore, the review comment concerning the need to ensure all references to the renamed exports are updated across the application appears to have been addressed satisfactorily.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all references to the old export paths are updated. rg --type ts "supa-browser-client|supa-server.service"Length of output: 56
apps/masterbots.ai/app/c/page.tsx (2)
10-20
: The implementation ofcreateSupabaseServerClient
and user data retrieval usinggetUser
appears correct. However, consider adding more detailed error messages to distinguish between "user not found" and "user email not found" scenarios for improved debugging and user feedback.
29-29
: Ensure that theuserId
passed togetThreads
is correctly obtained from thedbUserProfile
. This change is crucial for maintaining the integrity of thread retrieval based on user identity.apps/masterbots.ai/components/layout/header.tsx (1)
15-19
: The use ofcreateSupabaseServerClient
for fetching user data is correctly implemented. Consider adding null checks forcookies().get('hasuraJwt')
before accessing its value to prevent potential runtime errors.apps/masterbots.ai/app/c/[chatbot]/[threadId]/page.tsx (1)
10-15
: The transition tocreateSupabaseServerClient
for user data retrieval is correctly implemented. Ensure that error handling for user or user email not found is adequately tested to provide a smooth user experience.apps/masterbots.ai/app/c/[chatbot]/page.tsx (2)
19-29
: The modifications to the user authentication flow usingcreateSupabaseServerClient
and subsequent user profile retrieval are correctly implemented. Consider implementing a fallback or retry mechanism for transient network errors during user profile retrieval to enhance robustness.
45-45
: Correctly passing theuserId
from theuserProfile
togetThreads
ensures that thread retrieval is accurately scoped to the authenticated user. This is a critical update for user data integrity.
* devops: force deployment * devops: force deployment * devops: force deployment * devops: update cloudbuild.yml * devops: cloud logging only * devops: remove cloudbuild.yml * chore: update bunlock * feat: browse as homepage, work early access (#62) * feat: browse as home * feat: browse as home * feat: remove tabs * feat: supabase auth (#63) * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: supabase auth * feat: pro form * devops: lighthouse reports on prs (#64) * devops: lighthouse reports on prs * chore: cleanup * devops: lighthouse ci (#65) * devops: lighthouse reports on prs * chore: cleanup * chore: test lighthouse ci * devops: lighthouse reports on pr * devops: use zentered/vercel-preview-url * devops: lighthouse ci github action (#66) * chore: test lighthouse ci * devops: fix version on github actions * chore: cleanup * devops: debug lighthouse github action (#67) * chore: test lighthouse ci * devops: debug github actions * devops: correct project id on github actions (#69) * devops: debug github actions * devops: correct project id * devops: correct vercel team id (#70) * devops: debug github actions * devops: correct vercel team id * devops: debug github actions (#71) * devops: debug github actions * devops: use actions/checkout v4 * devops: add protocol to lhci url * devops: use foo-software/lighthouse-check-action (#72) * devops: debug github actions * devops: debug github actions * devops: use foo-software/lighthouse-check-action * devops: lhci budget path (#73) * devops: debug github actions * devops: lhci budget path * devops: disable lhci budget (#74) * devops: debug github actions * devops: disable lhci budget * devops: run lhci on bot and user landings (#75) * devops: debug github actions * devops: run lhci on bot and user landings * devops: run lhci on bot and user landings (#76) * devops: debug github actions * devops: run lhci on bot and user landings * devops: run lhci on bot and user landings * devops: run lhci on bot and user landings (#77) * devops: debug github actions * devops: run lhci on bot and user landings * devops: debug lhci results comment (#78) * devops: debug github actions * devops: debug lhci results comment * devops: debug lhci results comment (#79) * devops: debug github actions * devops: debug lhci results comment * feat: thread landing (#80) * devops: debug lhci results comment * feat: thread landing * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#83) * chore: cleanup * devops: debug lhci results comment * devops: debug lhci results comment (#84) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#85) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#86) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#88) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#89) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: lhci results table comment * devops: debug lhci results comment * devops: lhci results table comment (#90) * devops: lhci results table comment * devops: lhci results table comment (#91) * devops: lhci results table comment * devops: lhci results table comment * devops: lhci results table comment * devops: debug lhci results comment (#92) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#93) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: lhci results table comment (#94) * devops: debug lhci results comment * devops: debug lhci results comment (#95) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment (#96) * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: debug lhci results comment * devops: lhci results table comment * devops: lhci results table comment * devops: debug lhci results comment * devops: lhci results table comment (#98) * chore: cleanup * devops: lhci results table comment * devops: test lhci results comment (#99) * devops: test lhci results comment * devops: test lhci results comment * devops: test lhci results comment * feat: shortener * feat: supabase auth * fix: hasura jwt secret on local env * fix: hasura jwt secret on local env * chore: user profile cookie * chore: user profile cookie * chore: user profile cookie * chore: user profile cookie * feat: supabase auth, github oauth, session cookies * devops: config pkgs, eslint, prettier, tailwind, ts (#101) * devops: config pkgs, eslint, prettier, tailwind, ts * devops: config pkgs, eslint, prettier, tailwind, ts * devops: config pkgs, eslint, prettier, tailwind, ts * devops: config pkgs, eslint, prettier, tailwind, ts * devops: remove first comment on lhci action * devops: fix eslint action * chore: ssr on browse, supa types, updated actions (#103) * chore: browse ssr improvements, supabase db types * chore: fix eslint * devops: lhci on pr * feat: thread ui dialog and ssr in public pages (#105) * feat: thread dialog ui * feat: thread dialog ui * feat: thread dialog ui * feat: ssr and layout improvements on u and b routes * fix: correct thread number * feat: ssr and layout improvements on u and b routes * feat: global categories nav * chore: move shared components * feat: copy shortlink * chore: disable getUserProfile * perf: only 25 items on first render * perf: only 20 items on first render * fix: supabase ssr bug (#106) * devops: wait 2 minutes before running lhci (#107) * feat: load only 15 more * fix: auth issues * devops: wait 2 minutes before running lhci * devops: wait before lhci, fix vercel build (#108) * feat: load only 15 more * fix: auth issues * devops: wait 2 minutes before running lhci * chore: cleanup * fix: header session bug * fix: chat auth bug (#109) * fix: chat auth bug * fix: chat auth bug * fix: chat auth bug * fix: chat navigation (#110) * fix: icon size * fix: chat navigation * feat: chat list and dialog (#111) * feat: chat lists and dialog * feat: chat lists and dialog * feat: dialog chat input
Summary by CodeRabbit