Skip to content

Conversation

@CREDO23
Copy link
Contributor

@CREDO23 CREDO23 commented Jan 15, 2026

Description

  • User can place a comment next to an AI chat response or reply to an existing one.
  • Users can tag other users with @mentions in comments or replies.

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR implements a Google Docs-style commenting system for shared AI chat responses, allowing users to add comments and replies to AI-generated messages with @mention support. The implementation includes database migrations for chat_comments and chat_comment_mentions tables, new permissions (COMMENTS_CREATE, COMMENTS_READ, COMMENTS_DELETE), and a complete backend API supporting comment CRUD operations, mention parsing and rendering, and read/unread tracking. Comments are limited to AI responses only and support one level of nesting (comments can have replies, but replies cannot have further replies). The feature includes proper permission checks based on search space membership and role-based access control.

⏱️ Estimated Review Time: 30-90 minutes

💡 Review Order Suggestion
Order File Path
1 docs/comments-implementation-guide.md
2 surfsense_backend/alembic/versions/66_add_chat_comments_table.py
3 surfsense_backend/alembic/versions/67_add_chat_comment_mentions_table.py
4 surfsense_backend/app/db.py
5 surfsense_backend/app/schemas/chat_comments.py
6 surfsense_backend/app/utils/chat_comments.py
7 surfsense_backend/app/services/chat_comments_service.py
8 surfsense_backend/app/routes/chat_comments_routes.py
9 surfsense_backend/app/routes/__init__.py

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Jan 15, 2026

@CREDO23 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@CREDO23 CREDO23 changed the base branch from main to dev January 15, 2026 17:27
Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 0d2a2f8..4792fb7

  Severity     Location     Issue     Delete  
High surfsense_backend/app/services/chat_comments_service.py:593 Lazy loading error with async session
✅ Files analyzed, no issues (7)

docs/comments-implementation-guide.md
surfsense_backend/alembic/versions/66_add_chat_comments_table.py
surfsense_backend/alembic/versions/67_add_chat_comment_mentions_table.py
surfsense_backend/app/db.py
surfsense_backend/app/routes/__init__.py
surfsense_backend/app/routes/chat_comments_routes.py
surfsense_backend/app/utils/chat_comments.py

@CREDO23 CREDO23 marked this pull request as ready for review January 16, 2026 18:28
@CREDO23 CREDO23 force-pushed the sur-90-feat-comments-in-chats branch from c0ce7ab to 9d11446 Compare January 16, 2026 18:40
@CREDO23 CREDO23 marked this pull request as draft January 16, 2026 19:11
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