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 channel height introduced by channel tabs (#7553)
Seamusbdc132d5ea8c
diff --git a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsxindex bba68b9a9b..b7ee753916 100644--- a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx+++ b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx@@ -32,7 +32,7 @@ import {ChannelTabProvider,useChannelTab,} from '@channel/Channel/ChannelTabContext';-import { ChannelTabs } from '@channel/Channel/ChannelTabs';+import { ChannelTabLayout, ChannelTabs } from '@channel/Channel/ChannelTabs';import { ChannelTopBarLiveIndicators } from '@channel/Channel/ChannelTopBarLiveIndicators';import { CHANNEL_TAB_ICONS } from '@channel/Channel/channel-tab-icons';import {@@ -528,21 +528,23 @@ export function NewChannelBlockAdapter(props: BlockChannelProps) {pendingJoinCall={pendingJoinCall}onHandled={() => setPendingJoinCall(false)}/>- <div+ <ChannelTabLayoutclass={cn(- 'h-full flex flex-col px-2 touch:px-0',+ 'h-full px-2 touch:px-0',// The channel block is full-frame on mobile (messages scroll// behind the chrome); the other tabs still need to start below// the status bar + floating header.activeTab() !== 'messages' &&'touch:pt-(--mobile-content-inset-top)')}+ tabs={+ <Show when={!isTouchDevice()}>+ <Suspense>+ <ChannelTabs channelId={channelId} />+ </Suspense>+ </Show>+ }>- <Show when={!isTouchDevice()}>- <Suspense>- <ChannelTabs channelId={channelId} />- </Suspense>- </Show><Switch><Match when={activeTab() === 'messages'}><ChannelMessages@@ -572,7 +574,7 @@ export function NewChannelBlockAdapter(props: BlockChannelProps) {</Match></Switch><NewTop channelId={channelId} />- </div>+ </ChannelTabLayout></ChannelTabProvider></ChannelSurface>);diff --git a/apps/web/src/features/channel/Channel/ChannelDetail.tsx b/apps/web/src/features/channel/Channel/ChannelDetail.tsxindex 8c647f661c..c68089ea2a 100644--- a/apps/web/src/features/channel/Channel/ChannelDetail.tsx+++ b/apps/web/src/features/channel/Channel/ChannelDetail.tsx@@ -41,7 +41,7 @@ import {type ChannelTargetRequest,} from './ChannelSurface';import { ChannelTabProvider } from './ChannelTabContext';-import { ChannelTabs } from './ChannelTabs';+import { ChannelTabLayout, ChannelTabs } from './ChannelTabs';import { ChannelLiveIndicators } from './ChannelTopBarLiveIndicators';import { type ChannelTabId, DEFAULT_CHANNEL_TAB } from './channel-tabs';import {@@ -313,10 +313,14 @@ function ChannelDetailContent(props: ChannelDetailProps) {}}/></DebugSuspense>- <div class="flex min-h-0 flex-1 flex-col px-2">- <DebugSuspense name="ChannelDetail.tabs">- <ChannelTabs channelId={channelId} />- </DebugSuspense>+ <ChannelTabLayout+ class="flex-1 px-2"+ tabs={+ <DebugSuspense name="ChannelDetail.tabs">+ <ChannelTabs channelId={channelId} />+ </DebugSuspense>+ }+ ><Switch><Match when={activeTab() === 'messages'}><DebugSuspense name="ChannelDetail.messages">@@ -353,7 +357,7 @@ function ChannelDetailContent(props: ChannelDetailProps) {</DebugSuspense></Match></Switch>- </div>+ </ChannelTabLayout></div></ChannelTabProvider></ChannelSurface>diff --git a/apps/web/src/features/channel/Channel/ChannelTabs.tsx b/apps/web/src/features/channel/Channel/ChannelTabs.tsxindex d94bfbd6c2..2c4b14b64a 100644--- a/apps/web/src/features/channel/Channel/ChannelTabs.tsx+++ b/apps/web/src/features/channel/Channel/ChannelTabs.tsx@@ -1,8 +1,31 @@+import { cn } from '@ui';import { Tabs } from '@ui/components/Tabs';+import type { JSX, ParentProps } from 'solid-js';import { useChannelTab } from './ChannelTabContext';import type { ChannelTabId } from './channel-tabs';import { useChannelTabItems } from './use-channel-tab-items';+type ChannelTabLayoutProps = ParentProps<{+ class?: string;+ tabs: JSX.Element;+}>;++/**+ * Gives channel chrome its intrinsic height and measures the active tab pane+ * against the space left over. Keep every host on this layout boundary: a+ * pane with `h-full` must fill the remainder, not the pre-chrome container.+ */+export function ChannelTabLayout(props: ChannelTabLayoutProps) {+ return (+ <div class={cn('flex min-h-0 flex-col', props.class)}>+ {props.tabs}+ <div class="flex min-h-0 flex-1 flex-col" data-channel-tab-content>+ {props.children}+ </div>+ </div>+ );+}+/** Shared content navigation for split and inline channel surfaces. */export function ChannelTabs(props: { channelId: string }) {const { activeTab, setActiveTab } = useChannelTab();diff --git a/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsx b/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsxindex 7361b3e159..a2fbbca732 100644--- a/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsx+++ b/apps/web/src/features/channel/Channel/tests/channel-detail-navigation.test.tsx@@ -122,6 +122,16 @@ beforeEach(() => {afterEach(cleanup);describe('channel detail navigation', () => {+ it('measures tab content against the height left after channel chrome', () => {+ const view = render(() => (+ <ChannelDetail channelId={CHANNEL_ID}>{() => null}</ChannelDetail>+ ));++ const content = view.container.querySelector('[data-channel-tab-content]');+ expect(content?.classList.contains('min-h-0')).toBe(true);+ expect(content?.classList.contains('flex-1')).toBe(true);+ });+it('navigates the surface for every message link click, including a repeat', async () => {render(() => (<ChannelDetail channelId={CHANNEL_ID}>{() => null}</ChannelDetail>diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex 006b7aec75..bf55696c67 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -902,7 +902,10 @@ Bubble tabs sit in their own row below the channel header:`Messages` / `Attachments` / `Calls` / `Participants`.`Ask Macro`, `Invite`, and `Call` actions remain in the header. On narrow desktoppanes, the tab row scrolls horizontally and keeps its text labels. Standalone-mobile channels keep view selection in the title menu. The `Calls` tab lists+mobile channels keep view selection in the title menu. The tab row consumes+space above the active pane: in both a single channel and an adjacent channel+split, the message composer stays fully visible at the bottom instead of being+pushed down by the row. The `Calls` tab listsrecordings for that channel(same rows as the Calls soup view, filtered to this channel). The live `Call` tabappears while a call is in progress. `Ask Macro` opens a new chat pane with the channel