-
Notifications
You must be signed in to change notification settings - Fork 154
feat(chat): persist messages to database using Supabase #1831
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
30f848f
to
a5c0db6
Compare
Updates to Preview Branch (sessions-new-page-save-messages) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
- Implemented saving and loading chat messages using the `messages` table - Introduced `designSessionId` prop to both `Chat` and `SessionDetailPage` components - Added `saveMessage`, `loadMessages`, and `getCurrentUserId` functions on the client side - Chat history is now preserved across sessions and synced with Supabase
a5c0db6
to
9e8dd21
Compare
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
I made one comment, LGTM! Thank you.✨
Screenshots
Now each messages are persisted in
messages
table.messages:

db:

Why is this change needed?
want to save the chat messages.
messages
table, ensuring session history is preserveddesignSessionId
prop toChat
andSessionDetailPage
componentssaveMessage
,loadMessages
, andupdateMessage
service methods (client-side)What would you like reviewers to focus on?
Testing Verification
What was done
🤖 Generated by PR Agent at 9e8dd21
messages
tabledesignSessionId
prop toChat
andSessionDetailPage
Detailed Changes
messageServiceClient.ts
Add Supabase message persistence client and utilities
frontend/apps/app/components/Chat/services/messageServiceClient.ts
saveMessage
,loadMessages
, andgetCurrentUserId
functionsindex.ts
Export message service client functions
frontend/apps/app/components/Chat/services/index.ts
Chat.tsx
Integrate Supabase message persistence into Chat component
frontend/apps/app/components/Chat/Chat.tsx
designSessionId
prop for session-specific chat historySessionDetailPage.tsx
Pass designSessionId to Chat for session context
frontend/apps/app/components/SessionDetailPage/SessionDetailPage.tsx
designSessionId
prop and passed it to Chatpage.tsx
Provide designSessionId to session detail page
frontend/apps/app/app/(app)/app/(with-project-and-branch)/projects/[projectId]/sessions/[id]/page.tsx
designSessionId
prop to SessionDetailPageAdditional Notes