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(preview): do not open preview window on empty state (#2587)

Aidan Holloway-Bidwell4a38f31fd93a
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 69ba97fb73..addf422758 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
@@ -245,7 +245,9 @@ export const SoupView = (props: SoupViewProps) => {
value={{
...panel,
halfSplitState: () =>
- soup.previewEntity() ? { side: 'left', percentage: 30 } : undefined,
+ soup.previewEntity() && soup.focus.item()
+ ? { side: 'left', percentage: 30 }
+ : undefined,
}}
>
<SoupViewContextProvider
@@ -982,7 +984,12 @@ export const SoupViewList = (props: SoupViewListProps) => {
onClear={soup.selection.clear}
/>
</Show>
- <Show when={soup.previewEntity() || panel.previewState[0]()}>
+ <Show
+ when={
+ (soup.previewEntity() || panel.previewState[0]()) &&
+ !!soup.focus.item()
+ }
+ >
<PreviewPanel
ref={setPreviewPanelRef}
selectedEntity={soup.focus.item()}