Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(inbox): sometimes preview not open by default (#4838)
dev-rbf491d143fbc4
diff --git a/apps/web/src/features/next-soup/soup-view/soup-view.tsx b/apps/web/src/features/next-soup/soup-view/soup-view.tsxindex 9d6079e9f7..3cb013fa3d 100644--- a/apps/web/src/features/next-soup/soup-view/soup-view.tsx+++ b/apps/web/src/features/next-soup/soup-view/soup-view.tsx@@ -412,10 +412,10 @@ export const SoupView = (props: SoupViewProps) => {batch(() => {soup.setPreviewEntity(persistedPreviewEntity);// Existing entries only stored the symbolic entity id. Treat one as an- // open pane while allowing new entries to use their view default.+ // open pane. The new-inbox default is applied reactively below because+ // its PostHog flag can resolve after this one-time initialization.soupView.setPreviewOpen(- persistedPreviewOpen ??- (persistedPreviewEntity ? true : isNewInboxEnabled())+ persistedPreviewOpen ?? persistedPreviewEntity !== undefined);soupView.initialize({@@ -480,6 +480,20 @@ export const SoupView = (props: SoupViewProps) => {});});+ // Production resolves the new-inbox flag asynchronously, so wait for it+ // before applying the default instead of locking in the initial false value.+ if (+ persistedPreviewOpen === undefined &&+ persistedPreviewEntity === undefined+ ) {+ let previewDefaulted = false;+ createRenderEffect(() => {+ if (previewDefaulted || !isNewInboxEnabled()) return;+ previewDefaulted = true;+ soupView.setPreviewOpen(true);+ });+ }+const previewEntityCaptorTeardown = panel.handle.registerEntryStateCaptor(SOUP_PREVIEW_ENTITY_ENTRY_KEY,() => soup.previewEntity()