Feature favorites#19
Closed
ogardoni wants to merge 23 commits into
Closed
Conversation
- Add isFavorite boolean field to Secret schema with default false - Update SecretWithDecryptedData interface to include isFavorite - Database migration ready for favorite functionality
- Add toggleSecretFavorite action to toggle favorite status - Add getFavoriteSecretsWithVaults action to fetch only favorites - Update getAllSecretsWithVaults to include isFavorite field - Proper error handling and authorization checks
- Add getFavoriteSecretsWithDecryptedData method - Add toggleFavorite method for optimistic updates - Update existing methods to include isFavorite field - Import and integrate new server actions
- Create /app/favorites route for viewing favorite secrets - Display starred secrets from all vaults with vault badges - Include descriptive header and empty state messaging
- Add Star icon import and star button to each secret card - Implement handleToggleFavorite with optimistic updates - Add FavoriteSecretsList component for favorites page - Update query invalidation to include favorites - Add FAVORITE_SECRETS_QUERY_KEY constant - Optimistic UI updates with error rollback handling
- Add Star icon import and favorites navigation item - Add pathname detection for active state highlighting - Place favorites link after 'All Secrets' in navigation - Update both error and success states to include favorites
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
knivram
requested changes
Jul 3, 2025
| variant="ghost" | ||
| size="sm" | ||
| onClick={() => handleToggleFavorite(secret)} | ||
| className="p-1" |
Co-authored-by: Marvin <129607867+knivram@users.noreply.github.com>
a98a36d to
40f5de7
Compare
- Add isFavorite boolean field to Secret schema with default false - Update SecretWithDecryptedData interface to include isFavorite - Database migration ready for favorite functionality
- Add toggleSecretFavorite action to toggle favorite status - Add getFavoriteSecretsWithVaults action to fetch only favorites - Update getAllSecretsWithVaults to include isFavorite field - Proper error handling and authorization checks
- Add getFavoriteSecretsWithDecryptedData method - Add toggleFavorite method for optimistic updates - Update existing methods to include isFavorite field - Import and integrate new server actions
- Create /app/favorites route for viewing favorite secrets - Display starred secrets from all vaults with vault badges - Include descriptive header and empty state messaging
- Add Star icon import and star button to each secret card - Implement handleToggleFavorite with optimistic updates - Add FavoriteSecretsList component for favorites page - Update query invalidation to include favorites - Add FAVORITE_SECRETS_QUERY_KEY constant - Optimistic UI updates with error rollback handling
- Add Star icon import and favorites navigation item - Add pathname detection for active state highlighting - Place favorites link after 'All Secrets' in navigation - Update both error and success states to include favorites
Co-authored-by: Marvin <129607867+knivram@users.noreply.github.com>
…nto feature-favorites
Co-authored-by: Marvin <129607867+knivram@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here's a comprehensive merge request description for the reviewer:
🌟 Add Favorites Functionality to Password Safe
Overview
This PR implements a complete favorites system that allows users to mark secrets as favorites and view them in a dedicated page. The feature includes optimistic UI updates for instant feedback and maintains data consistency across all views.
🚀 What's New
Core Features
/app/favoritesroute to view all favorite secretsUser Experience Improvements
📁 Files Changed
Database & Types
isFavoriteboolean field to Secret modelBackend (Server Actions)
Frontend (Client-Side)
🔧 Technical Implementation
Database Schema
Key Components
API Endpoints
toggleSecretFavorite(secretId)- Toggle favorite statusgetFavoriteSecretsWithVaults()- Fetch only favorite secrets🎯 Business Logic
Favorite Toggle Rules
Data Synchronization
🧪 Testing Scenarios
Happy Path
Error Handling
Cross-View Consistency
🔒 Security Considerations
📱 UI/UX Design
Visual Elements
Responsive Behavior
🚦 Migration Strategy
isFavoritefield✅ Ready for Review
Code Quality
Performance
Reviewer Notes:
handleToggleFavorite