Skip to content

SCIX-876 Change UAT facet to use uat field instead of uat_facet_hier#885

Open
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:SCIX-876-uat-facet-use-uat-field
Open

SCIX-876 Change UAT facet to use uat field instead of uat_facet_hier#885
thostetler wants to merge 1 commit into
adsabs:masterfrom
thostetler:SCIX-876-uat-facet-use-uat-field

Conversation

@thostetler

@thostetler thostetler commented Jun 9, 2026

Copy link
Copy Markdown
Member

Changes the UAT search facet to query the uat field instead of uat_facet_hier.

  • Updated UAT facet config to use the flat uat field (removed hierarchical prefixing)
  • Added uat to the FacetField type and facet field list
  • Removed fq_uat from the hierarchical cleanClause branch
  • Updated facet mocks for the uat field
image image

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.2%. Comparing base (4d21fec) to head (7176dc9).

Files with missing lines Patch % Lines
src/components/SearchFacet/helpers.ts 0.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #885     +/-   ##
========================================
- Coverage    61.2%   61.2%   -0.0%     
========================================
  Files         349     349             
  Lines       41439   41437      -2     
  Branches     1836    1836             
========================================
- Hits        25359   25357      -2     
  Misses      16037   16037             
  Partials       43      43             
Files with missing lines Coverage Δ
src/api/search/types.ts 100.0% <100.0%> (ø)
src/components/SearchFacet/config.ts 100.0% <100.0%> (ø)
src/components/SearchFacet/helpers.ts 59.4% <0.0%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thostetler thostetler requested a review from shinyichen June 9, 2026 19:09
@thostetler thostetler marked this pull request as ready for review June 9, 2026 19:10
Copilot AI review requested due to automatic review settings June 9, 2026 19:10

Copilot AI 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.

Pull request overview

This PR updates the Search Facet configuration so the UAT facet queries the flat uat field instead of the hierarchical uat_facet_hier, aligning the facet behavior with the intended Solr field.

Changes:

  • Switched the UAT facet config from uat_facet_hier to uat and removed hierarchical-only settings.
  • Extended the FacetField union type and facet field list to include uat.
  • Updated facet-related mocks and removed fq_uat from the hierarchical cleanClause branch.

Risk summary: Low functional risk to production search behavior (mostly config/type wiring), but there is a moderate-risk inconsistency in the MSW facet mock generator that can make UAT facet prefix filtering behave unrealistically in tests/dev.

Findings (priority order)

  • medium (bug) — Mock facet generator ignores prefix for uat
    • Impact: When the UI requests facet data with a prefix (letter/search filtering), MSW-generated UAT buckets won’t reflect that prefix, making mocked behavior inconsistent with real Solr behavior and potentially weakening/undermining UI tests that rely on prefix filtering.
    • Location: src/mocks/generators/facets.ts:23-24
    • Minimal fix: Apply the provided prefix when generating uat values (inline suggestion provided in PR comment).
    • Confidence: high

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/mocks/generators/facets.ts Updates mock facet bucket value generation for uat.
src/components/SearchFacet/types.ts Switches facet field list entry from uat_facet_hier to uat.
src/components/SearchFacet/helpers.ts Removes fq_uat from hierarchical clause-cleaning behavior.
src/components/SearchFacet/config.ts Updates UAT facet config to use uat and removes hierarchical-only settings.
src/components/mocks/facetCountFields.ts Adds uat to mocked facet_fields.
src/api/search/types.ts Extends FacetField type to include uat.

Comment thread src/mocks/generators/facets.ts Outdated
@thostetler thostetler force-pushed the SCIX-876-uat-facet-use-uat-field branch from 015c739 to 7176dc9 Compare June 10, 2026 16:03
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.

2 participants