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(multi-inbox): unchecking the last inbox selects all instead of none (#4116)
gbirman46b703defe2d
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/inbox-selector.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/inbox-selector.tsxindex 1596b541d1..234b26bdc2 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/inbox-selector.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/inbox-selector.tsx@@ -48,7 +48,7 @@ export function InboxSelector() {<SearchableMultiSelectoptions={picker.options}activeIds={picker.activeIds}- onChange={picker.onChange}+ onChange={(ids) => (ids.length ? picker.onChange(ids) : picker.reset())}onOnly={picker.selectOnly}placeholder="Search inboxes..."preserveOrderdiff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsxindex 4dcde9a931..bd528ec979 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx@@ -121,11 +121,10 @@ export const MobileFilterDrawer = () => {const toggleInbox = (id: string) => {const current = picker.activeIds();- picker.onChange(- current.includes(id)- ? current.filter((activeId) => activeId !== id)- : [...current, id]- );+ const next = current.includes(id)+ ? current.filter((activeId) => activeId !== id)+ : [...current, id];+ return next.length ? picker.onChange(next) : picker.reset();};const VIEW_SORT_OPTIONS: Partial<Record<ListView, SortOption[]>> = {diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search/search-facets.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search/search-facets.tsxindex c8f3ec4d27..e1e6d0e25c 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search/search-facets.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search/search-facets.tsx@@ -266,7 +266,8 @@ export function useSearchFacets(label: 'Inbox',options: inboxPicker.options,activeIds: inboxPicker.activeIds,- onChange: inboxPicker.onChange,+ onChange: (ids) =>+ ids.length ? inboxPicker.onChange(ids) : inboxPicker.reset(),onOnly: inboxPicker.selectOnly,placeholder: 'Search inboxes...',preserveOrder: true,