feat: add quiet reading with rare confirmations

Part of the quiet-user-feedback change; docs and specs land in their own repositories.
This commit is contained in:
2026-10-06 07:01:58 +03:00
parent c096fc70ef
commit 5b30bb802a
77 changed files with 1352 additions and 1259 deletions
@@ -10,12 +10,14 @@ function useStocksPageVm() {
const search = useInstrumentSearch(MIN_STOCK_SEARCH_LENGTH);
const { canSearch, debounced, isWaiting, query } = search;
const result = useStockSearch(debounced);
const sync = useScreenSync({ query: debounced, screen: "stocks" }, [result]);
useScreenSync({ query: debounced, screen: "stocks" }, [result]);
return {
canSearch,
code: apiErrorCode(result.error),
error: result.isError || sync.sourceError || sync.transportError,
error:
!result.data
&& (result.isError || result.meta?.sync.state === "failed"),
items:
result.data?.map(stock => ({
...stock,
@@ -35,10 +37,6 @@ function useStocksPageVm() {
debounced.length >= MIN_STOCK_SEARCH_LENGTH
&& !isWaiting
&& Boolean(result.data),
refreshing: sync.refreshing,
retry: () => {
void sync.retry();
},
};
}