-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Overview
As part of the AI Facet Selection PoC, the frontend should be able to consume the example query-to-facet JSON and translate it into the app’s selected facet state. This allows us to validate the end-to-end flow before backend integration is complete.
See search input mocks here, here, here, here, and here.
See selected state mocks here and here.
Requirements
- Fetch the example JSON response at http://localhost:3000/api/v0/facets/response.json.
- Parse the returned facet mappings and update the existing facet-selection state accordingly.
- Ensure the UI reflects the interpreted selections exactly as if a user had manually clicked the facets.
Possible Approaches
- Modify the existing "Search all filters" input box to fetch the JSON on hit of enter, or,
- switch out the existing "Search all filters" input box with a new component that handles the fetch on hit of enter, or,
- something else?
Note that you do not have to send the user input at the moment as the JSON is hard-coded. Note also that eventually there will be a toggle at the top of the panel to switch between the manual and AI search modes.
Background
- JSON is at /public/api/v0/facets/response.json.
- See background on JSON format in Create example JSON response for query to facet mapping #4610.
Acceptance Criteria
- When the app fetches the mock JSON, the corresponding facets visually appear as selected.
- No backend dependency; the front-end should function using only the example response.
- All facet IDs and values align with those used on the dev site.
Out of Scope
- Handling of unmatched facets and terms (specifically, the
MONDO:0005015,foobarandfoobazvalues in the JSON). - Display of AI-specific UI including filter format toggle, AI-generated indicators on chips, and AI search summary detail (i.e. "matched", "unmatched").

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels