Conversation
This reverts commit 35fe4f9.
Summary of ChangesHello @MurakawaTakuya, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、ユーザーが論文をお気に入りとして保存し、カスタムフォルダで整理できる包括的なお気に入り機能を追加します。これには、お気に入りやフォルダを管理するための新しいバックエンドAPI、専用のお気に入りページ、および既存のUIへのシームレスな統合が含まれます。これにより、ユーザーは興味のある論文をより効率的に追跡し、管理できるようになります。 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive favorites and folder management system. Key changes include adding new API endpoints for managing user favorites (GET, POST, DELETE) and folders (GET, POST, PATCH), along with corresponding database schema updates for folders and favorites tables. A new FavoritesPage was created to display and manage user's saved papers, leveraging a new useFavorites hook for data fetching and state management, which also includes optimistic updates and toast notifications using the newly integrated sonner library. The sidebar (AppSidebar) was updated to dynamically list user-created folders, and a FavoriteButton component was added to the PapersTable for in-line favorite management, including adding to folders and creating new ones. Minor UI adjustments were made to the home page and categorization results for responsiveness and user experience. Review comments highlighted several issues: incorrect type definitions for params in API routes, a redundant AuthProvider in the root layout, a security vulnerability in the POST /api/favorites endpoint where folderId ownership was not validated, a bug in the useFavorites hook's optimistic update rollback logic where stale state was referenced, and an inconsistency in folder name validation between POST /api/folders and PATCH /api/folders/[id]. Additionally, it was suggested that folderIdParam should return an empty array for invalid IDs on the favorites page, an unused pathname variable should be removed, and a unique constraint should be added to the favorites table in the database schema to ensure data integrity.
There was a problem hiding this comment.
Pull request overview
This pull request adds a comprehensive favorites/bookmarking feature to the application, allowing users to save papers and organize them into folders. The feature includes optimistic UI updates, folder management capabilities, and integration throughout the existing paper browsing experience.
Changes:
- Added database schema for favorites and folders tables with appropriate indexes
- Implemented API routes for CRUD operations on favorites and folders
- Created a custom React hook (useFavorites) with optimistic update patterns
- Added UI components for favorite management including a popover-based folder selector
- Integrated favorites functionality into existing paper tables and sidebar navigation
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| src/db/schema.ts | Defines database schema for folders and favorites tables with foreign key relationships |
| src/hooks/use-favorites.ts | Custom hook managing favorites state with optimistic updates and API interactions |
| src/components/favorite-button.tsx | Popover UI component for adding/removing favorites and managing folder assignments |
| src/components/ui/sonner.tsx | Toast notification component wrapper for user feedback |
| src/app/api/folders/route.ts | API endpoints for fetching and creating folders |
| src/app/api/folders/[id]/route.ts | API endpoint for renaming folders |
| src/app/api/favorites/route.ts | API endpoints for fetching and creating favorites |
| src/app/api/favorites/[id]/route.ts | API endpoint for deleting favorites |
| src/app/favorites/page.tsx | Page component displaying favorited papers with folder filtering and rename functionality |
| src/components/app-sidebar.tsx | Updated sidebar to include favorites navigation with dynamic folder list |
| src/components/papers-table.tsx | Integrated favorite button into paper listings |
| src/app/layout.tsx | Added toast notification provider (with duplicate AuthProvider issue) |
| src/app/page.tsx | Responsive layout adjustments for mobile displays |
| src/components/search-stepper.tsx | Responsive design improvements for mobile stepper |
| src/components/categorization-results.tsx | Added cursor-pointer class to collapsible triggers |
| src/components/introduction.tsx | Updated conference name from ECCV to WACV |
| src/components/ui/animated-gradient-text.tsx | Adjusted gradient colors for better visual appearance |
| package.json | Added sonner toast library dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.