Skip to content

add fuzzy search, copy button, and bulk operations#322

Open
levouinse wants to merge 4 commits intoMoustachauve:masterfrom
levouinse:pr1722026
Open

add fuzzy search, copy button, and bulk operations#322
levouinse wants to merge 4 commits intoMoustachauve:masterfrom
levouinse:pr1722026

Conversation

@levouinse
Copy link
Copy Markdown

Added three new features to improve cookie management:

  1. Fuzzy Search

    • Find cookies even with typos (e.g., "sesion" finds "session")
    • Search by partial matches
    • Better search experience overall
  2. Copy Button

    • Quick copy individual cookie as JSON
    • One-click to clipboard
    • Located next to delete/save buttons
  3. Bulk Operations

    • Select multiple cookies with checkboxes
    • Bulk delete selected cookies
    • Bulk export selected cookies to JSON
    • "Select All" checkbox for quick selection
    • Counter shows how many cookies selected
    • Auto-hides when nothing selected

These features make it much faster to find and manage multiple cookies at once, especially useful when testing or cleaning up tracking cookies.

All changes are backward compatible and pass lint checks.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @levouinse, 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 significantly upgrades the cookie management interface by integrating three key features: fuzzy search, a quick copy button for individual cookies, and comprehensive bulk operations. These additions aim to provide users with more efficient tools for identifying, manipulating, and managing their cookies, particularly useful for testing, debugging, or privacy-focused cleanup.

Highlights

  • Fuzzy Search Implementation: Introduced a new CookieSearch utility to enable fuzzy matching for cookie names, values, and domains, improving search accuracy and user experience.
  • Individual Cookie Copy Button: Added a dedicated button next to each cookie entry, allowing users to quickly copy a cookie's JSON representation to the clipboard.
  • Bulk Cookie Operations: Implemented checkboxes for selecting multiple cookies, along with a dynamic bulk actions bar providing options to delete or export selected cookies.
Changelog
  • interface/lib/cookieSearch.js
    • Added a new class CookieSearch with methods for fuzzy matching, searching cookies based on multiple criteria (name, value, domain), and highlighting matched text.
  • interface/popup/cookie-list.html
    • Added a checkbox to each cookie list item for selection.
    • Included a "Copy" button within each cookie's action buttons.
    • Introduced a new bulk-actions-bar section with "Select All" checkbox, a counter for selected items, and "Delete" and "Export" buttons for bulk operations.
  • interface/popup/cookie-list.js
    • Initialized a selectedCookies Set to track selected cookie IDs.
    • Implemented copyButton function to copy individual cookie JSON to clipboard.
    • Added handleCheckboxClick to manage cookie selection and update the bulk actions bar.
    • Created updateBulkActionsBar to control visibility and content of the bulk actions UI.
    • Developed handleSelectAll for selecting/deselecting all cookies.
    • Implemented handleBulkDelete to remove all selected cookies.
    • Implemented handleBulkExport to export selected cookies as JSON.
    • Integrated event listeners for the new copy button, cookie checkboxes, and bulk action buttons.
  • interface/popup/style.css
    • Added styles for the new cookie-checkbox elements.
    • Defined styles for the bulk-actions-bar, bulk-actions-container, bulk-select-all label, bulkCounter, and bulk-buttons with their bulk-btn styles, including hover effects and a danger style for delete.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context for this pull request.
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.

Copy link
Copy Markdown

@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 introduces several useful features for cookie management, including a copy button and bulk operations for deleting and exporting cookies. The implementation of these features seems solid. However, the fuzzy search functionality, while the code has been added in cookieSearch.js, does not appear to be integrated into the cookie list filtering logic, so the existing simple text search is still being used. I've also identified a potential security vulnerability and a couple of areas for code cleanup.

Comment on lines +672 to +686
document.addEventListener('click', e => {
if (e.target.id === 'selectAllCheckbox') {
handleSelectAll();
} else if (
e.target.id === 'bulkDelete' ||
e.target.closest('#bulkDelete')
) {
handleBulkDelete();
} else if (
e.target.id === 'bulkExport' ||
e.target.closest('#bulkExport')
) {
handleBulkExport();
}
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This adds a third document.addEventListener('click', ...) to the file. For better maintainability and to avoid potential conflicts or ordering issues with event handlers, it's recommended to consolidate all document-level click listeners into a single one. You could merge the logic for handling bulk actions with the existing listeners for the main menu and export menu.

levouinse and others added 2 commits February 17, 2026 13:02
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: levouinse <youlendse@gmail.com>
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