Problem Statement
Currently, users have no way to mark important conversations for quick access. When managing multiple conversations, users lose track of the ones they want to revisit frequently. The conversation list only sorts by recency, making it difficult to prioritize specific conversations.
Current Limitations:
- No way to bookmark/favorite important conversations
- All conversations have equal visual priority
- No filtering mechanism to view only preferred conversations
- Users must scroll through all conversations to find important ones
User Value
This feature will significantly improve conversation management by allowing users to:
- Quick Access: Mark important conversations with a single click and filter to view only favorites
- Better Organization: Separate frequently-used conversations from one-time chats
- Visual Clarity: Favorited conversations appear first in the list with a clear indicator
- Improved Workflow: Reduce time spent searching for important conversations by 80%+
Concrete Examples:
- A developer can favorite conversations about specific projects they're actively working on
- A researcher can bookmark conversations containing important findings or references
- A user can prioritize ongoing discussions while keeping exploratory chats accessible but lower in the list
Technical Approach
Architecture:
- Hexagonal architecture with Domain-Driven Design
- Property name:
isFavorite (metadata-backed, not the existing isPinned field)
- Explicit domain methods for type safety and discoverability
- Optimistic updates for immediate UI feedback
Backend Changes:
- Fix critical metadata serialization bug in
Conversation entity
- Add domain methods:
markAsFavorite(), unmarkAsFavorite(), toggleFavorite(), isFavorite()
- Extend repository with
findFavorites() and isFavorite filter in findAll()
- Create
PUT /api/conversations/[id]/favorite endpoint
- Update
GET /api/conversations/list to return isFavorite field and support query param
Frontend Changes:
- Add star toggle button in
ConversationListItem (visible on hover when unfavorited, always visible when favorited)
- Add filter tabs in
ConversationSidebar (All / Favorites)
- Implement
useToggleFavoriteMutation with optimistic updates
- Extend
useConversationsListQuery with favorites filter
- Update Zod schemas to include
isFavorite field
Business Rules:
- Archived conversations cannot be favorited (400 error)
- Unlimited favorites allowed
- Favorites appear first in list, sorted by
updatedAt
- Default state: NOT favorited
Definition of Done
Implementation
Unit Tests (125+ total tests, >80% coverage)
Backend Tests (70+ tests, >95% coverage):
Frontend Tests (55+ tests, >80% coverage):
Documentation
Code Review
CI/CD
Manual Testing
Manual Testing Checklist
Basic Flow
Edge Case Testing
Error Handling
Integration
Accessibility
Visual/UX
Performance
Implementation Resources
Planning Documents:
- Backend Architecture:
.claude/doc/favorites/backend-architecture.md
- Frontend Architecture:
.claude/doc/favorites/frontend.md
- UI/UX Design:
.claude/doc/favorites/shadcn_ui.md
- Backend Testing:
.claude/doc/favorites/backend-testing.md
- Frontend Testing:
.claude/doc/favorites/frontend-testing.md
- Session Context:
.claude/sessions/context_session_favorites_conversations.md
Estimated Effort: 8-12 hours for complete implementation + testing
Problem Statement
Currently, users have no way to mark important conversations for quick access. When managing multiple conversations, users lose track of the ones they want to revisit frequently. The conversation list only sorts by recency, making it difficult to prioritize specific conversations.
Current Limitations:
User Value
This feature will significantly improve conversation management by allowing users to:
Concrete Examples:
Technical Approach
Architecture:
isFavorite(metadata-backed, not the existingisPinnedfield)Backend Changes:
ConversationentitymarkAsFavorite(),unmarkAsFavorite(),toggleFavorite(),isFavorite()findFavorites()andisFavoritefilter infindAll()PUT /api/conversations/[id]/favoriteendpointGET /api/conversations/listto returnisFavoritefield and support query paramFrontend Changes:
ConversationListItem(visible on hover when unfavorited, always visible when favorited)ConversationSidebar(All / Favorites)useToggleFavoriteMutationwith optimistic updatesuseConversationsListQuerywith favorites filterisFavoritefieldBusiness Rules:
updatedAtDefinition of Done
Implementation
Conversation.toObject()andConversation.restore())findFavorites()and filter supportPUT /api/conversations/[id]/favoriteendpoint createdGET /api/conversations/listupdated withisFavoritesupportConversationMetadataSchemaandConversationListItemSchema)toggleFavorite()methodConversationListItemcomponentConversationSidebarcomponentUnit Tests (125+ total tests, >80% coverage)
Backend Tests (70+ tests, >95% coverage):
Frontend Tests (55+ tests, >80% coverage):
Documentation
Code Review
CI/CD
yarn tsc --noEmit)yarn build)Manual Testing
Manual Testing Checklist
Basic Flow
Edge Case Testing
Error Handling
Integration
InMemoryConversationRepositoryandMongoDBConversationRepositoryAccessibility
Visual/UX
Performance
Implementation Resources
Planning Documents:
.claude/doc/favorites/backend-architecture.md.claude/doc/favorites/frontend.md.claude/doc/favorites/shadcn_ui.md.claude/doc/favorites/backend-testing.md.claude/doc/favorites/frontend-testing.md.claude/sessions/context_session_favorites_conversations.mdEstimated Effort: 8-12 hours for complete implementation + testing