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[soup]: task assignee filter always shows user first (#2416)
Peter Chinman646cf219d06d
diff --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 058a11a5ee..12690f5f87 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@@ -132,14 +132,32 @@ export const MobileFilterDrawer = () => {label: 'Unassigned',icon: () => <CircleDashedIcon class="size-3.5 text-ink-muted" />,};- const contactOptions = contacts().map((contact) => ({- id: contact.id,- label: buildContactLabel(contact, currentUserId),- icon: () => (- <UserIcon id={contact.id} size="xs" suppressClick showTooltip={false} />- ),- }));- return [noAssigneeOption, ...contactOptions];+ let meOption: typeof noAssigneeOption | undefined;+ const otherContactOptions: (typeof noAssigneeOption)[] = [];+ for (const contact of contacts()) {+ const opt = {+ id: contact.id,+ label: buildContactLabel(contact, currentUserId),+ icon: () => (+ <UserIcon+ id={contact.id}+ size="xs"+ suppressClick+ showTooltip={false}+ />+ ),+ };+ if (contact.id === currentUserId) {+ meOption = opt;+ } else {+ otherContactOptions.push(opt);+ }+ }+ return [+ ...(meOption ? [meOption] : []),+ noAssigneeOption,+ ...otherContactOptions,+ ];});const filteredAssigneeOptions = createMemo(() => {diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsxindex 85137c0881..97a496a406 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx@@ -404,7 +404,7 @@ const SearchableFilterSubmenu = (props: {<DropdownMenu.Portal><DropdownMenu.SubContent- class="z-action-menu bg-menu border border-edge-muted rounded-sm shadow-xl min-w-[200px] p-1"+ class="z-action-menu bg-menu border border-edge-muted rounded-sm shadow-xl min-w-[200px] max-w-[500px] p-1"onFocusOut={handleSubContentFocusOut}>{/* Search input */}@@ -518,14 +518,32 @@ export const UnifiedFilterDropdown = () => {label: 'Unassigned',icon: () => <CircleDashedIcon class="size-3.5 text-ink-muted" />,};- const contactOptions = contacts().map((contact) => ({- id: contact.id,- label: buildContactLabel(contact, currentUserId),- icon: () => (- <UserIcon id={contact.id} size="xs" suppressClick showTooltip={false} />- ),- }));- return [noAssigneeOption, ...contactOptions];+ let meOption: SearchableOption | undefined;+ const otherContactOptions: SearchableOption[] = [];+ for (const contact of contacts()) {+ const opt: SearchableOption = {+ id: contact.id,+ label: buildContactLabel(contact, currentUserId),+ icon: () => (+ <UserIcon+ id={contact.id}+ size="xs"+ suppressClick+ showTooltip={false}+ />+ ),+ };+ if (contact.id === currentUserId) {+ meOption = opt;+ } else {+ otherContactOptions.push(opt);+ }+ }+ return [+ ...(meOption ? [meOption] : []),+ noAssigneeOption,+ ...otherContactOptions,+ ];});const toggleAssignee = (id: string) => {