webui: include feature type in global search (match, regex, api, …)#2906
Conversation
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 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
🧠 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
Activity
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.
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
There was a problem hiding this comment.
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.
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.
0851600 to
7c9d8d3
Compare
…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
Problem
Searching for
match,regex, or other feature-kind keywords in the capa Explorer web UI returned no results. PrimeVue'sTreeTableglobal filter was only consulting thenamefield of each node, but the feature kind (match,regex,api, …) is stored separately intypeValue. 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 theglobalFilterFieldsprop on the<TreeTable>. PrimeVue will now include bothnameandtypeValuewhen 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
web/explorer/src/components/RuleMatchesTable.vue'typeValue'toglobalFilterFieldsTesting
data.typeValue; wideningglobalFilterFieldsdirectly addresses the mismatch between what users see and what is searched.Fixes #2349.