feat: display ai match ui (#746)#749
Merged
NoopDog merged 6 commits intocc/744-ai-facet-selection-pocfrom Dec 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements UI components to display AI-powered facet matching results. The feature shows users a summary of matched and unmatched search terms from the AI facet assistant, with an interactive tooltip providing detailed breakdowns.
Key changes:
- Adds ResultSummary component with tooltip to display AI match statistics
- Implements
buildSummaryutility to classify AI responses into matched/unmatched pairs - Updates FacetAssistant to track and display AI response data
- Creates comprehensive test coverage for new utilities
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
tests/aiResultsSummary.utils.test.ts |
Tests summary rendering logic with various match/unmatch scenarios |
tests/aiFacetAssistant.utils.test.ts |
Tests AI response mapping and summary building functionality |
src/styles/common/mui/stack.ts |
Adds Stack direction constants for MUI Stack component |
src/components/Filter/components/ai/components/FacetAssistant/types.ts |
Extends AiResponse and SelectedValue interfaces with query and recognized fields |
src/components/Filter/components/ai/components/FacetAssistant/utils.ts |
Adds buildSummary function and refactors filtering logic for AI responses |
src/components/Filter/components/ai/components/FacetAssistant/facetAssistant.tsx |
Updates component to track AI response state and display ResultSummary |
src/components/Filter/components/ai/components/FacetAssistant/facetAssistant.styles.ts |
Replaces StyledForm with StyledStack for layout |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/types.ts |
Defines types for result summary data and props |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/utils.ts |
Implements summary text rendering with proper pluralization |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.tsx |
Main component rendering summary text with tooltip |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/resultSummary.styles.ts |
Styles for underlined, clickable summary text |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/types.ts |
Custom tooltip props extending MUI Tooltip |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/tooltip.tsx |
Tooltip wrapper with dynamic width measurement |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.ts |
Custom hook to measure element width for tooltip sizing |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.ts |
Tooltip configuration with custom styling |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/types.ts |
Props for result summary section component |
src/components/Filter/components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.tsx |
Renders matched/unmatched items with icons in tooltip |
.../components/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/hook.ts
Outdated
Show resolved
Hide resolved
...onents/FacetAssistant/components/ResultSummary/components/Tooltip/components/Title/title.tsx
Outdated
Show resolved
Hide resolved
...onents/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.ts
Show resolved
Hide resolved
...onents/ai/components/FacetAssistant/components/ResultSummary/components/Tooltip/constants.ts
Show resolved
Hide resolved
…components/ResultSummary/components/Tooltip/components/Title/title.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
NoopDog
approved these changes
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #746.