Skip to content

feat: display ai match ui (#746)#749

Merged
NoopDog merged 6 commits intocc/744-ai-facet-selection-pocfrom
fran/746-ai-match
Dec 16, 2025
Merged

feat: display ai match ui (#746)#749
NoopDog merged 6 commits intocc/744-ai-facet-selection-pocfrom
fran/746-ai-match

Conversation

@frano-m
Copy link
Contributor

@frano-m frano-m commented Dec 16, 2025

Closes #746.

image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 buildSummary utility 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

frano-m and others added 4 commits December 16, 2025 15:49
…components/ResultSummary/components/Tooltip/components/Title/title.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@NoopDog NoopDog merged commit 834b553 into cc/744-ai-facet-selection-poc Dec 16, 2025
2 checks passed
@frano-m frano-m deleted the fran/746-ai-match branch December 16, 2025 06:39
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.

3 participants