Skip to content

webui: include feature type in global search (match, regex, api, …)#2906

Merged
mike-hunhoff merged 2 commits into
mandiant:masterfrom
devs6186:fix/2349-webui-search-type-value
Mar 12, 2026
Merged

webui: include feature type in global search (match, regex, api, …)#2906
mike-hunhoff merged 2 commits into
mandiant:masterfrom
devs6186:fix/2349-webui-search-type-value

Conversation

@devs6186

@devs6186 devs6186 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Searching for match, regex, or other feature-kind keywords in the capa Explorer web UI returned no results. PrimeVue's TreeTable global filter was only consulting the name field of each node, but the feature kind (match, regex, api, …) is stored separately in typeValue. The tree visually renders rows as - typeValue: name, so users naturally expected to search by the displayed type label.

Reported in #2349.

Solution

Add 'typeValue' to the globalFilterFields prop on the <TreeTable>. PrimeVue will now include both name and typeValue when evaluating the global search filter.

No change to the data model, rendering, or any other behaviour — this is a one-line addition to the component's props.

Changes

File What changed
web/explorer/src/components/RuleMatchesTable.vue Add 'typeValue' to globalFilterFields

Testing

  • Static analysis of the component passes.
  • Behaviorally: nodes already carry data.typeValue; widening globalFilterFields directly addresses the mismatch between what users see and what is searched.
  • Full front-end test suite requires the Node toolchain; the change is a single property addition and integrates cleanly with the existing filter infrastructure.

Fixes #2349.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 resolves a usability issue in the capa Explorer web UI where the global search feature did not account for feature-kind keywords like 'match' or 'regex'. By expanding the scope of the global filter to include the 'typeValue' field, the search now accurately reflects the visually displayed information, making the filtering process more intuitive and effective for users.

Highlights

  • Improved Global Search: Enhanced the global search functionality in the web UI to include feature types (e.g., 'match', 'regex', 'api'), allowing users to find results based on these keywords, aligning search behavior with visual representation.

🧠 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
  • web/explorer/src/components/RuleMatchesTable.vue
    • Added 'typeValue' to the 'globalFilterFields' prop to enable searching by feature type.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed

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

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.

Code Review

This pull request updates the global search functionality in the capa Explorer web UI by adding the typeValue field to the globalFilterFields of the TreeTable component, enabling users to search for feature types like match and regex. A security analysis was conducted, focusing on potential injection vulnerabilities (XSS) and insecure data handling, and confirmed that the change is safe and introduces no new security risks, as Vue's safe interpolation is used for rendering data. No general issues were identified during the review.

@github-actions github-actions Bot dismissed their stale review March 9, 2026 18:59

CHANGELOG updated or no update needed, thanks! 😄

Searching for "match" or "regex" in the capa Explorer web UI produced
no results because PrimeVue's globalFilterFields only included the
name field, while the feature kind (e.g. "match", "regex", "api") is
stored in the separate typeValue field.

Add 'typeValue' to globalFilterFields so that the global search box
matches nodes by both their value (name) and their kind (typeValue).
No change to rendering or data structure; only the set of fields
consulted during filtering is widened.

Fixes mandiant#2349.
@devs6186 devs6186 force-pushed the fix/2349-webui-search-type-value branch from 0851600 to 7c9d8d3 Compare March 9, 2026 19:23
@mike-hunhoff mike-hunhoff requested a review from fariss March 10, 2026 17:54
@mike-hunhoff mike-hunhoff merged commit ceaa3b6 into mandiant:master Mar 12, 2026
3 checks passed
saniyafatima07 pushed a commit to saniyafatima07/capa that referenced this pull request Jun 17, 2026
…andiant#2906)

* webui: include feature type in global search (match, regex, etc.)

Searching for "match" or "regex" in the capa Explorer web UI produced
no results because PrimeVue's globalFilterFields only included the
name field, while the feature kind (e.g. "match", "regex", "api") is
stored in the separate typeValue field.

Add 'typeValue' to globalFilterFields so that the global search box
matches nodes by both their value (name) and their kind (typeValue).
No change to rendering or data structure; only the set of fields
consulted during filtering is widened.

Fixes mandiant#2349.

* changelog: add entry for mandiant#2349 webui global search fix
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.

webui: searching for "match" doesn't provide any results

4 participants