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

Feat svcc 3827 knowledge headless controller #4062

Closed

Conversation

dmgauthier
Copy link
Collaborator

Controller using the knowledge-api-client

Summary

Refactored the current generatedAnswer controllers to maximize re-usability between the current stream pattern using a stream ID from the searchAPI and the new AnswerAPI streaming directly from a query.

headless-core-generated-answer controller

Removed the logic listening to the search to make it more generic. All the state related to the UI component management is left untouched.

headless-searchapi-generated-answer controller

Is now the main controller used by all the implementation prior to the knowledgeAPI stream. And whenever the interface is not configured to use the new client, it will still use the headless-searchapi-generated-answer controller.

headless-knowledge-generated-answer controller

Its the controller used to connect the new client stream with the generated-answer state. I decided to keep the same state slice that was already used by the atomic and quantic implementation. I only mapped the required state keys from the client to the controller state with listeners dispatching the right state updating action when required.

Testing

I decided to duplicate a lot of test because I did not want any change made to the headless-core-generated-answer controller to affect the other controller extending it.

I did not find a way to properly test what is happening inside the listener, unfortunately

@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-knowledge-headless-controller branch from 35e3482 to f1c3aaa Compare June 19, 2024 18:48
@dmgauthier dmgauthier force-pushed the feat-SVCC-3789-knowledge-api-slice branch 3 times, most recently from f40e4fb to 4319a77 Compare June 19, 2024 19:21
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-knowledge-headless-controller branch from 4949876 to 34b976c Compare June 26, 2024 14:51
@developer-experience-bot
Copy link
Contributor

developer-experience-bot bot commented Jun 26, 2024

Pull Request Report

PR Title

❌ Title should follow the conventional commit spec:
<type>(optional scope): <description>

Example: feat(headless): add result-list controller

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 202.9 204.9 1
commerce 286.4 293.5 2.5
search 367.4 372.6 1.4
insight 347.8 352.7 1.4
product-listing 262.2 267 1.8
product-recommendation 171.9 170.9 -0.6
recommendation 215.8 217.8 0.9
ssr 360.3 365.5 1.4

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

@dmgauthier dmgauthier force-pushed the feat-SVCC-3789-knowledge-api-slice branch from 6fcaa85 to 9120336 Compare June 26, 2024 18:47
@dmgauthier dmgauthier force-pushed the feat-SVCC-3827-knowledge-headless-controller branch from 3b39ab8 to d98aa1f Compare June 26, 2024 18:57
@dmgauthier dmgauthier force-pushed the feat-SVCC-3789-knowledge-api-slice branch from 9120336 to f0be471 Compare June 26, 2024 18:58
@dmgauthier dmgauthier force-pushed the feat-SVCC-3789-knowledge-api-slice branch 2 times, most recently from 6e561dc to b135f09 Compare June 26, 2024 19:49
@pathiery pathiery force-pushed the feat-SVCC-3827-knowledge-headless-controller branch from d98aa1f to 6ad5665 Compare June 27, 2024 21:15
@pathiery pathiery force-pushed the feat-SVCC-3827-knowledge-headless-controller branch from 6ad5665 to d98aa1f Compare June 27, 2024 21:17
@dmgauthier dmgauthier force-pushed the feat-SVCC-3789-knowledge-api-slice branch 2 times, most recently from 50e9beb to e40a55c Compare June 28, 2024 13:34
Base automatically changed from feat-SVCC-3789-knowledge-api-slice to master July 2, 2024 15:05
@dmgauthier
Copy link
Collaborator Author

This is now obsolete

@dmgauthier dmgauthier closed this Jul 4, 2024
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.

None yet

2 participants