Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(soup): suspense and clear search text (#1495)

dev-rb9e1ab90bff75
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
index 4bd1f6aa8b..67260723b0 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-toolbar.tsx
@@ -62,7 +62,7 @@ const ENTITY_TYPE_SHORTCUTS: Record<
};
export const SoupToolbar = () => {
- const { soup, setQueryFilters } = useSoupView();
+ const { soup, setSearchText, setQueryFilters } = useSoupView();
const [scrollContainerRef, setScrollContainerRef] = createSignal<
HTMLDivElement | undefined
@@ -71,6 +71,7 @@ export const SoupToolbar = () => {
const handleClear = () => {
batch(() => {
soup.filters.clear();
+ setSearchText('');
setQueryFilters(QUERY_FILTERS.default);
});
};
diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
index a3e3c7ccfe..d99284b318 100644
--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx
@@ -55,6 +55,7 @@ import {
on,
onCleanup,
Show,
+ Suspense,
Switch,
} from 'solid-js';
import { type VirtualizerHandle, VList } from 'virtua/solid';
@@ -143,8 +144,10 @@ export const SoupView = () => {
}}
>
<SoupViewContextProvider soup={soup}>
- <div class="relative flex-grow min-h-0 flex max-sm:flex-col flex-row size-full">
- <SoupToolbar />
+ <div class="relative flex-grow min-h-1 flex max-sm:flex-col flex-row size-full">
+ <Suspense>
+ <SoupToolbar />
+ </Suspense>
<SoupViewFileDropzone>
<SoupViewList />
</SoupViewFileDropzone>