-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge master (v1.18.0) into develop #1921
Merged
Merged
Conversation
This file contains 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
This PR represents the work to add Generative Direct Answers support, both in basic searching functionality and analytics support, along with some vulnerability fixes. * Add GDA Object Model Similar to the existing DirectAnswer model, we will take in an object from search-core (GenerativeDirectAnswerResponse in this case) and use it to construct a model. J=WAT-4592 TEST=auto Ran unit tests * Update package.json to beta version * ksearch: Add flow for automatically calling into the GDA endpoint In this change I added the following functionality: - at the global config level, there will be a new property named "useGenerativeDirectAnswers" that must be set to true in order for GDA to work on the site - When the universal results or vertical results change, that will trigger a call into the GDA endpoint. To accomplish the above, I have added two new storage keys - one for the GDA itself, and one for the Search ID, which we need for the request into GDA. J=WAT-4593 TEST=auto, manual Auto: Wrote new tests Manual: Spun up local instance of the answers-search-ui + HH theme and changed the vars to use a Prod Search config with GDA configured. Saw the request being fired in the network tab when the prop was set to true, and not fired when the prop was set to false * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Include some results data in the GDA object constructed * Remove console log * Filter results in GDA model to only include those with name and matching uid in citations * Add Result Component for Generative Direct Answers This change includes the logic necessary to visualize a GDA response in the UI via the answers-search-ui package. The component styled here (styled using the Handlebars template and custom CSS) will be used if there is not a custom card for GDA set (in the theme, we will create a nearly identical, but still different, card visual). The actual *logic* for getting the data to the component is entirely present in this PR. This includes handling the different GDA search states (pre-search, in progress, complete) and analytics events (citation clicks and rich text link clicks). Here is a demo of it in action: https://drive.google.com/file/d/1KIxTRGBPCDvcUoIICT-jeF-swdXd7Pl6/view?usp=sharing Some key functionalities to note from the demo video: - An in-progress GDA call will show just the banner, with text "AI Generating Answer..." - The GDA answer will be formatted into an HTML string to be used in the snippet (the response from the endpoint gives a markdown representation) - If the answer has links, they will be formatted properly and should fire analytics events in the same way that regular direct answers do - Citations will display at the bottom of the component in a scrollable list - Citations have fields name (req), description (opt), and link (opt). - If a citation has a description, a truncated version will be displayed in the citation card, below the name - If a citation has a link, the citation card will become clickable - Clicking on a citation will fire a CITATION_CLICK analytics event J=WAT-4594 TEST=auto, manual Auto: Wrote new tests Manual: Spun up test-site pointing to Red Dog Prod experience, and verified various states and edge cases * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Added code to accomplish WAT-4598 and WAT-4602 * remove console log * remove console log * Update custom card handling logic We were missing some data being passed to the custom card when present in the search-loading case. The generativeDirectAnswer property is what contains the data passed to the custom card (as seen in addChild of generativedirectanswercomponent.js). We now add the searchState to this object, so that the custom card can have its own loading state logic. J=WAT-4595 TEST=manual Spun up test site with custom card in HH theme and saw the card behave as expected in the loading state. * Update package version to beta 2 * Add vertical config id to analytics event options for GDA * Use external entityId for GDA analytics; vertical key for universal now empty string for GDA events * update to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fixupdate to non-beta versions, add vuln fix * Automated update to THIRD-PARTY-NOTICES from github action's 3rd party notices check * Upgrade node version and ubuntu * up testcafe patch * Try removing irrelevant line * Remove unneeded search bar change --------- Co-authored-by: Kyle Gerner <49618240+k-gerner@users.noreply.github.com> Co-authored-by: Kyle Gerner <kgerner@yext.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
The acceptance tests have become flaky. This PR represents work to make them stable. J=WAT-4606 TEST=manual
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.
Merge master (v1.18.0) into develop