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): preview and card adjustments (#4663)
dev-rbb9166268ad98
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsxindex 93ae752255..789ab2c2a4 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx@@ -5,6 +5,7 @@ import { SoupViewContextGroup } from '@app/component/next-soup/soup-view/filtersimport { SoupViewContextSort } from '@app/component/next-soup/soup-view/filters-bar/soup-view-context-sort';import { UnifiedFilterDropdown } from '@app/component/next-soup/soup-view/filters-bar/unified-filter-dropdown';import { useFilterRefinements } from '@app/component/next-soup/soup-view/filters-bar/use-filter-refinements';+import { usePreviewPaneVisiblity } from '@app/component/next-soup/soup-view/use-preview-pane-visibility';import {SplitToolbarLeft,SplitToolbarRight,@@ -27,12 +28,15 @@ import { useSoup } from '../../soup-context';export function SoupFiltersBar() {const { resetToTabDefaults, consolidatedFiltersList } =useFilterRefinements();+const [filterDropdownOpen, setFilterDropdownOpen] = createSignal(false);const panel = useSplitPanelOrThrow();const analytics = useAnalytics();const soup = useSoup();+ const { isWideSplitPanel } = usePreviewPaneVisiblity();+const togglePreview = () => {const currentPreview = soup.previewEntity();if (currentPreview) {@@ -108,13 +112,19 @@ export function SoupFiltersBar() {</div></SplitToolbarLeft><SplitToolbarRight>- <Tooltip hotkey={TOKENS.unifiedList.togglePreview} label="Preview">+ <Tooltip+ hotkey={+ isWideSplitPanel() ? TOKENS.unifiedList.togglePreview : undefined+ }+ label={isWideSplitPanel() ? 'Preview' : 'No space for preview'}+ ><ButtononClick={togglePreview}variant="base"size="sm"depth={2}class="bg-surface"+ disabled={!isWideSplitPanel()}>{soup.previewEntity() ? <EyeSlashIcon /> : <EyeIcon />}<span>Preview</span>diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsxindex 833a1dfd26..ceec3ad558 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-context.tsx@@ -456,25 +456,10 @@ export const SoupViewContextProvider: FlowComponent<};};- // The inbox only surfaces missed calls. The preset NILs `callId` to exclude- // calls entirely, so drop that exclusion and filter to missed status instead.- const applyInboxCallFilter = (state: QueryState): QueryState => {- if (!isNewInbox()) return state;- const { callId: _callId, ...include } = state.include;- return {- ...state,- include: {- ...include,- callStatus: 'MISSED',- },- };- };-const applyViewFilters = (state: QueryState): QueryState => {let next = applyInboxFilter(state);next = applyInboxThreadFilter(next);next = applyInboxReadFilter(next);- next = applyInboxCallFilter(next);return next;};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.tsxindex 7ecfb9e89b..10d7f8ec89 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@@ -1251,8 +1251,8 @@ export const SoupViewList = (props: SoupViewListProps) => {<Resize.Zone direction="horizontal" gutter={0}><Resize.Panelid="soup-list"- minSize={200}- maxSize={paneVisible() ? 840 : undefined}+ minSize={300}+ maxSize={paneVisible() ? 440 : undefined}><SoupViewFileDropzone><div@@ -1608,10 +1608,10 @@ export const SoupViewList = (props: SoupViewListProps) => {<Show when={paneVisible()}><Resize.Panelid="soup-preview"- minSize={500}+ minSize={0}target={{kind: 'percent',- percent: isNewInboxEnabled() ? 75 : 70,+ percent: isNewInboxEnabled() ? 55 : 70,}}><divdiff --git a/js/app/packages/app/component/next-soup/soup-view/use-preview-pane-visibility.ts b/js/app/packages/app/component/next-soup/soup-view/use-preview-pane-visibility.tsindex b4960c0a60..653486508a 100644--- a/js/app/packages/app/component/next-soup/soup-view/use-preview-pane-visibility.ts+++ b/js/app/packages/app/component/next-soup/soup-view/use-preview-pane-visibility.ts@@ -61,5 +61,6 @@ export function usePreviewPaneVisiblity() {paneVisible: previewPaneVisible,placeholderVisible: previewPlaceholderVisible,previewVisible,+ isWideSplitPanel,};}diff --git a/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxCard.tsx b/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxCard.tsxindex 1353d517c8..18e6338b2a 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxCard.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxCard.tsx@@ -38,7 +38,9 @@ function Root(props: RootProps): JSX.Element {return (<divclass={cn(- 'group/inbox-item relative min-h-16 grid w-full grid-cols-[2rem_minmax(0,1fr)_max-content] grid-rows-[min-content_min-content] items-start gap-x-3 rounded-lg py-2.5 px-2',+ // `pl-9` reserves a fixed left column for the select checkbox (rendered+ // by the row wrapper) so content never reflows when it appears on hover.+ 'group/inbox-item relative min-h-16 grid w-full grid-cols-[2rem_minmax(0,1fr)_max-content] grid-rows-[min-content_min-content] items-start gap-x-3 rounded-lg py-2.5 pr-2 pl-9',{'bg-accent/8': props.selected,diff --git a/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxListEntity.tsx b/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxListEntity.tsxindex df677433bc..434f3bffd0 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxListEntity.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/views/inbox/InboxListEntity.tsx@@ -2,7 +2,7 @@ import { useChannelsContext } from '@core/context/channels';import { MaybeEntityRow, MultiSelectCheckbox } from '@entity';import type { BaseListEntityProps } from '@entity/composed/list-entity/shared';import { cn } from '@ui';-import { createMemo } from 'solid-js';+import { createMemo, Show } from 'solid-js';import { InboxCardLayout, toInboxCardDisplayItem } from './inbox-card-layouts';import { scopeThreadNotifications } from './utils';@@ -41,18 +41,21 @@ export function InboxListEntity(props: BaseListEntityProps) {onClick={props.onClick}/></MaybeEntityRow>- <div- class={cn(- 'hidden absolute right-2 bottom-2 z-10 group-hover/inbox-item:flex items-center justify-center bg-surface overflow-hidden',- props.checked && 'flex'- )}- >- <MultiSelectCheckbox- checked={props.checked}- onChecked={props.onChecked}- showBorder- />- </div>+ {/* Select checkbox lives in the gutter reserved by the card's `pl-9`. */}+ <Show when={!props.hideCheckbox}>+ <div+ class={cn(+ 'absolute left-1 top-2.5 z-10 size-8 place-items-center',+ props.checked ? 'grid' : 'hidden group-hover/inbox-item:grid'+ )}+ >+ <MultiSelectCheckbox+ checked={props.checked}+ onChecked={props.onChecked}+ showBorder+ />+ </div>+ </Show></div>);}diff --git a/js/app/packages/app/component/next-soup/soup-view/views/inbox/inbox-card-layouts.tsx b/js/app/packages/app/component/next-soup/soup-view/views/inbox/inbox-card-layouts.tsxindex bd6614cff2..3110a1cb3d 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/inbox/inbox-card-layouts.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/views/inbox/inbox-card-layouts.tsx@@ -587,7 +587,7 @@ export function ChannelCardLayout(props: InboxCardLayoutProps) {const location = channelLocation(entity());const tag = getNotificationTag(props.item.notification);- let sender = isDM() ? entity().name || messageSenderName() : '';+ const sender = isDM() ? entity().name || messageSenderName() : '';let action = '';if (tag === 'document_mention' && isDM()) {diff --git a/js/app/packages/app/component/next-soup/soup-view/views/inbox/utils.ts b/js/app/packages/app/component/next-soup/soup-view/views/inbox/utils.tsindex 2b22b7cde1..1a7b9b83f8 100644--- a/js/app/packages/app/component/next-soup/soup-view/views/inbox/utils.ts+++ b/js/app/packages/app/component/next-soup/soup-view/views/inbox/utils.ts@@ -109,6 +109,10 @@ export function itemContent(return meta.content.messageContent;}+ if (meta?.tag === 'call_started') {+ return;+ }+const channel = channelMessageContent(entity);if (channel) return channel;return notification ? notificationContent(notification) : undefined;