Feat: Add toggle for showing unreleased games in wishlist + reorder sections#460
Feat: Add toggle for showing unreleased games in wishlist + reorder sections#460Doezer wants to merge 3 commits intorelease/1.3.0from
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary of ChangesHello, 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! This pull request introduces significant new features and improvements across the application, primarily focusing on enhancing the wishlist experience, integrating with Steam, and bolstering security. It also includes performance optimizations, a new statistics dashboard, and a substantial increase in test coverage to ensure stability and reliability. Highlights
Changelog
Ignored Files
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 significant set of features and improvements, most notably the ability to toggle unreleased games in the wishlist and sync with a Steam wishlist. The code quality is high, with excellent refactoring into reusable hooks like useHiddenMutation, performance optimizations through lazy loading, and major security enhancements like SSRF protection and a standardized error handler. The test suite has also been substantially expanded. I've identified one critical security vulnerability and a couple of areas for improvement to align with the codebase's patterns and enhance maintainability.
I am having trouble creating individual review comments. Click here to see my feedback.
server/routes.ts (2183)
This endpoint is not protected by the authenticateToken middleware, making it a public endpoint. This allows any unauthenticated user to change the application-wide IGDB credentials, which is a critical security vulnerability. The setup page already handles the initial credential configuration via the /api/auth/setup endpoint. This endpoint should only be accessible to authenticated users on the settings page and must be protected.
app.post("/api/settings/igdb", authenticateToken, async (req, res) => {
References
- A global settings endpoint accessible by any authenticated user is acceptable if the application's user model ensures only admin-level users can be created, effectively making any authenticated user an administrator. This implies that such an endpoint, if not public, must be protected.
client/src/components/Header.tsx (140-173)
The onClick handler for the Steam sync button implements the API call logic directly using fetch. This duplicates logic for handling authentication, API requests, and displaying toasts, which is already abstracted away in apiRequest and useMutation. Refactoring this into a dedicated useMutation hook would improve consistency, centralize API logic, and make the component cleaner by handling loading/error states more gracefully.
References
- Extract duplicated logic from similar processing loops into a shared helper function to improve maintainability, reduce redundancy, and ensure consistent behavior (e.g., error handling).
- When a user action triggers an asynchronous operation, provide immediate visual feedback by disabling the interactive element and showing a loading indicator to improve user experience.
server/cron.ts (854-981)
The syncUserSteamWishlist function is quite long and handles multiple distinct steps: fetching user data, fetching the wishlist, mapping Steam IDs to IGDB IDs, filtering existing games, fetching details for new games, and finally adding them. Consider breaking this down into smaller, more focused helper functions. For example, a function to resolve Steam App IDs to new InsertGame objects, and another to handle the database interactions. This would improve readability, testability, and maintainability of this complex feature.
References
- Extract duplicated logic from similar processing loops into a shared helper function to improve maintainability, reduce redundancy, and ensure consistent behavior (e.g., error handling).
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request enhances the wishlist page by adding a feature to toggle the display of unreleased games (Upcoming and To Be Announced). This involves introducing a showUnreleased state, which is persisted in local storage, a new button with Eye/EyeOff icons to control this state, and conditional rendering for the unreleased game sections. Additionally, the 'Released' games section is now displayed first with an updated badge style. A review comment suggests refactoring the repeated useState and useEffect pattern for localStorage persistence into a reusable custom hook to reduce boilerplate and improve maintainability.
41bca22 to
8150ee3
Compare
|



This PR modifies the wishlist page