Skip to content
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

fix(answerStream): handle end of stream #4270

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

dmgauthier
Copy link
Contributor

@dmgauthier dmgauthier commented Aug 12, 2024

SVCC-4057

Problem

The end of stream was no handled after a 'sorry' message.
The answerGenerated is false with the 'sorry' message, and this was the condition to handle the end of stream.

The effect of this bug was that the cursor was not removed when the answer was 'sorry'. Plus, the buttons to rephrase weren't showing. Removing the possibility to rephrase.

Solution

We now check if there is an answer that was outputed beside the official answerGenerated.

Side fix

We now send the contentFormat in the payload, like we do with the SearchApi

Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 244.1 244.1 0
commerce 341.1 341.2 0
search 414 414 0
insight 391.7 391.8 0
product-listing 306.4 306.4 0
product-recommendation 210.4 210.4 0
recommendation 257.2 257.2 0
ssr 405.1 405.1 0
ssr-commerce 338.5 338.5 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
product-recommendation 0 10 0
product-listing 0 13 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
product-recommendation : missing SSR support
product-listing : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

Tests?

@dmgauthier dmgauthier force-pushed the fix-SVCC-4057-answer-client-handle-end-of-stream branch from 57d76ed to 7f353c3 Compare August 13, 2024 14:02
@dmgauthier dmgauthier added this pull request to the merge queue Aug 13, 2024
Merged via the queue into master with commit 5e1b49a Aug 13, 2024
116 checks passed
@dmgauthier dmgauthier deleted the fix-SVCC-4057-answer-client-handle-end-of-stream branch August 13, 2024 14:43
fpbrault pushed a commit that referenced this pull request Aug 23, 2024
[SVCC-4057](https://coveord.atlassian.net/browse/SVCC-4057)

## Problem

The end of stream was no handled after a 'sorry' message.
The `answerGenerated` is false with the 'sorry' message, and this was
the condition to handle the end of stream.

The effect of this bug was that the cursor was not removed when the
answer was 'sorry'. Plus, the buttons to rephrase weren't showing.
Removing the possibility to rephrase.

## Solution

We now check if there is an answer that was outputed beside the official
`answerGenerated`.

## Side fix

We now send the `contentFormat` in the payload, like we do with the
SearchApi
 

[SVCC-4057]:
https://coveord.atlassian.net/browse/SVCC-4057?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

Co-authored-by: Danny Gauthier <[email protected]>
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