feat(vulnerabilities): add date range filter to vulnerability list#273
feat(vulnerabilities): add date range filter to vulnerability list#273
Conversation
Summary of ChangesHello @l1ttps, 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 enhances the vulnerability management interface by adding a crucial date range filtering capability. It involves a full-stack implementation, from new frontend UI components for intuitive date selection to modifications in the backend API and service layer to process and apply these date filters efficiently. The changes aim to provide users with more granular control over viewing and analyzing vulnerabilities based on their creation timeline. 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 successfully adds a date range filter to the vulnerability list page. The implementation spans both frontend and backend, including new UI components for date picking, state management with URL search parameters for filter persistence, and backend API extensions to support filtering by creation date. The code is well-structured and follows good practices. I have one suggestion to improve the default behavior of the date picker for a better user experience.
| const internalDate = value ?? { | ||
| from: new Date(new Date().getFullYear(), 0, 20), | ||
| to: addDays(new Date(new Date().getFullYear(), 0, 20), 20), | ||
| }; |
There was a problem hiding this comment.
The fallback for internalDate is hardcoded to January 20th of the current year. This means that when no date range is selected, the calendar will always open to January, which can be confusing for the user. It would be more intuitive to default to the current month.
const internalDate = value ?? { from: new Date() };
No description provided.