Search: Decouple search-ui components and search business logic
Created by: vovakulikov
Search UI components are supposed to be consumer agnostic and reusable UI without significant implementation leaks in props and special to consumer logic inside. But currently, if we look at the search-ui
package, we will see that this is full of core/business logic, and all UI and logic tuning is happening on the props level. (A good example is that the side panel has a lot of coreWorkflow checks, or it uses a lot of Zustand global stores, which we have to replace in runtime with react context)
All these problems lead to the bad public API of these search UI components and make them hard to reuse, understand and maintain.
This issue implies that we have to unbound search UI from the global, consumer logic, simplify public API of them and make it easy to reuse and compose them in different consumers (search-ui is used primary for two consumers at the moment WebApp and VSCode integration)
/cc @joelkw @felixfbecker @vovakulikov @unclejustin