Skip to content

feat(vulnerabilities): add date range filter to vulnerability list#273

Merged
l1ttps merged 2 commits intomainfrom
date-picker-range
Feb 9, 2026
Merged

feat(vulnerabilities): add date range filter to vulnerability list#273
l1ttps merged 2 commits intomainfrom
date-picker-range

Conversation

@l1ttps
Copy link
Copy Markdown
Member

@l1ttps l1ttps commented Feb 9, 2026

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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

  • Date Range Filtering for Vulnerabilities: Implemented a new feature allowing users to filter the vulnerability list by a creation date range. This includes both a UI component for date selection and backend API support.
  • New UI Components: Introduced new reusable UI components: a Calendar component based on react-day-picker and a DatePickerWithRange component for selecting date ranges with preset options. Also added a comprehensive Field component system for form elements.
  • Backend API Extension: Extended the vulnerability API to accept createdFrom and createdTo parameters, enabling server-side filtering of vulnerabilities based on their creation date.
  • URL Parameter Integration: The date range filter state is now reflected in and initialized from URL search parameters, allowing for shareable and persistent filter configurations.

🧠 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
  • console/package.json
    • Added new dependencies: radix-ui and react-day-picker to support new UI components.
  • console/src/components/ui/calendar.tsx
    • Added a new Calendar component, providing a styled and functional date picker using react-day-picker.
  • console/src/components/ui/data-table.tsx
    • Adjusted the layout of the data table toolbar to better accommodate multiple filter components, including the new date picker, especially on smaller screens.
  • console/src/components/ui/date-picker-range.tsx
    • Added a new DatePickerWithRange component, offering a user-friendly interface for selecting date ranges with quick preset options and clear functionality.
  • console/src/components/ui/field.tsx
    • Added a new set of generic form field components (Field, FieldLabel, FieldDescription, FieldError, etc.) for consistent form styling and structure.
  • console/src/components/ui/label.tsx
    • Updated the import path for LabelPrimitive to align with the new radix-ui dependency structure.
  • console/src/pages/dashboard/components/statistic.tsx
    • Modified navigation paths for 'Technologies' and 'Ports' statistics cards to include specific tabs, improving direct access to relevant asset views.
  • console/src/pages/vulnerabilities/list-vulnerabilitys.tsx
    • Integrated the DatePickerWithRange component into the vulnerability list toolbar.
    • Implemented logic to read and write createdFrom and createdTo date range parameters from/to the URL search parameters.
    • Updated the API call to include createdFrom and createdTo filters, formatted as 'yyyy-MM-dd'.
    • Ensured that changing the date range filter clears row selections and resets the current page.
  • console/src/services/apis/gen/queries.ts
    • Updated the VulnerabilitiesControllerGetVulnerabilitiesParams type to include optional createdFrom and createdTo string parameters for date filtering.
  • core-api/src/modules/vulnerabilities/dto/get-vulnerability.dto.ts
    • Added createdFrom and createdTo properties to GetVulnerabilitiesQueryDto with IsDateString validation and Swagger API documentation.
  • core-api/src/modules/vulnerabilities/vulnerabilities.service.ts
    • Modified the getVulnerabilities method to apply createdFrom and createdTo filters to the database query, ensuring createdTo includes the entire end day.
  • package-lock.json
    • Updated lock file to reflect new radix-ui and react-day-picker dependencies and their transitive dependencies.
  • worker/services/core-api/api.ts
    • Updated the VulnerabilitiesControllerGetVulnerabilitiesParams interface to include createdFrom and createdTo parameters with example values.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@l1ttps l1ttps merged commit 4ce6bd9 into main Feb 9, 2026
9 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +33 to +36
const internalDate = value ?? {
from: new Date(new Date().getFullYear(), 0, 20),
to: addDays(new Date(new Date().getFullYear(), 0, 20), 20),
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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() };

@l1ttps l1ttps deleted the date-picker-range branch February 23, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant