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(input): fix vertical stability (#6759)
teoc5dda71554d7
diff --git a/apps/web/src/features/agents-view/agents-view.css b/apps/web/src/features/agents-view/agents-view.cssindex b2905e90bb..76b41bf765 100644--- a/apps/web/src/features/agents-view/agents-view.css+++ b/apps/web/src/features/agents-view/agents-view.css@@ -304,11 +304,11 @@gap: 20px;}- /* Anchor the greeting independently of the draft and repository bar height. */+ /* Keep the greeting above center, independent of the draft and repository bar height. */.agents-view .newchat[data-active] {display: grid;grid-template-columns: minmax(0, 1fr);- grid-template-rows: max(0px, calc(50% - 60px)) auto 1fr;+ grid-template-rows: max(0px, calc(40% - 60px)) auto 1fr;justify-items: center;align-items: start;gap: 0;@@ -345,18 +345,18 @@display: grid;grid-template-rows: 0fr;margin: 0 16px;- border-radius: 20px 20px 0 0;+ border-radius: 0 0 20px 20px;background: color-mix(in oklch, var(--surface-1) 40%, var(--surface-2));opacity: 0;visibility: hidden;transition: grid-template-rows 200ms cubic-bezier(0.77, 0, 0.175, 1), opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), visibility 200ms;}- /* Continue the bar behind the input's rounded top corners. */+ /* Continue the footer behind the input's rounded bottom corners. */:where(.agents-view, .agents-view-portal) .composer-drawer::after {content: '';position: absolute;- top: 100%;+ bottom: 100%;left: 0;right: 0;height: 32px;@@ -379,7 +379,7 @@display: flex;align-items: center;padding: 2px 10px;- transform: translateY(12px);+ transform: translateY(-12px);transition: transform 200ms cubic-bezier(0.77, 0, 0.175, 1);}diff --git a/apps/web/src/features/agents-view/components/ChatComposer.test.tsx b/apps/web/src/features/agents-view/components/ChatComposer.test.tsxindex 8d49324459..f6f5b11100 100644--- a/apps/web/src/features/agents-view/components/ChatComposer.test.tsx+++ b/apps/web/src/features/agents-view/components/ChatComposer.test.tsx@@ -195,7 +195,7 @@ describe('Chat session input', () => {expect(screen.getByRole('button', { name: 'Agent' })).toBeTruthy();expect(screen.queryByRole('button', { name: 'Model' })).toBeNull();});- it('expands coding mode above the input without remounting the editor', () => {+ it('expands coding mode with repository settings after the input without remounting the editor', () => {const [mode, setMode] = createSignal('chat');const { container } = render(() => (<ChatComposer@@ -213,7 +213,7 @@ describe('Chat session input', () => {expect(layout?.getAttribute('data-composer-compact')).toBe('true');expect((drawer?.compareDocumentPosition(input) ?? 0) &- Node.DOCUMENT_POSITION_FOLLOWING+ Node.DOCUMENT_POSITION_PRECEDING).toBeTruthy();expect((drawer as HTMLElement).inert).toBe(true);expect(drawer?.getAttribute('aria-hidden')).toBe('true');diff --git a/apps/web/src/features/agents-view/components/ChatComposer.tsx b/apps/web/src/features/agents-view/components/ChatComposer.tsxindex e0bcbce79c..cb2686a996 100644--- a/apps/web/src/features/agents-view/components/ChatComposer.tsx+++ b/apps/web/src/features/agents-view/components/ChatComposer.tsx@@ -180,24 +180,6 @@ export function ChatComposer(props: {}}><div ref={container} data-keep-keyboard class="min-w-0">- <Show when={props.drawer}>- <div- class="composer-drawer"- data-open={props.drawerOpen ? '' : undefined}- aria-hidden={!props.drawerOpen}- inert={!props.drawerOpen}- >- <div class="composer-drawer-inner">- <div- class="composer-drawer-content"- role="group"- aria-label="Repository settings"- >- {props.drawer}- </div>- </div>- </div>- </Show><ComposerSurfaceas="div"data-agent-composer="chat"@@ -221,11 +203,13 @@ export function ChatComposer(props: {<div ref={setContent} data-composer-content><Input.Attachments kind="media" class="pb-0" /><Input.Attachments kind="document" class="pb-0" />+ {/* Expanded text keeps the compact row's vertical inset:+ 7.5px padding + half the button/line-height difference. */}<divref={setLayout}data-composer-compact={!props.drawerOpen && isCompact()}data-composer-coding={props.drawerOpen || undefined}- class="group/composer flex min-w-0 data-[composer-compact=false]:flex-wrap items-end gap-2 p-[7.5px] pl-3 data-[composer-compact=false]:pb-2.5 data-[composer-compact=false]:px-3 data-[composer-coding=true]:pt-4"+ class="group/composer flex min-w-0 data-[composer-compact=false]:flex-wrap items-end gap-2 p-[7.5px] pl-3 data-[composer-compact=false]:pb-2.5 data-[composer-compact=false]:px-3 data-[composer-compact=false]:pt-[calc(7.5px_+_(33.75px_-_1.5rem)/2)]"><Show when={props.onAttachFiles}><div@@ -312,6 +296,24 @@ export function ChatComposer(props: {</div></Input.DropZone></ComposerSurface>+ <Show when={props.drawer}>+ <div+ class="composer-drawer"+ data-open={props.drawerOpen ? '' : undefined}+ aria-hidden={!props.drawerOpen}+ inert={!props.drawerOpen}+ >+ <div class="composer-drawer-inner">+ <div+ class="composer-drawer-content"+ role="group"+ aria-label="Repository settings"+ >+ {props.drawer}+ </div>+ </div>+ </div>+ </Show></div></InputProvider>);diff --git a/apps/web/src/features/inbox-view/components/HomeChatStart.tsx b/apps/web/src/features/inbox-view/components/HomeChatStart.tsxindex 59027ca473..2f73b8ffa0 100644--- a/apps/web/src/features/inbox-view/components/HomeChatStart.tsx+++ b/apps/web/src/features/inbox-view/components/HomeChatStart.tsx@@ -34,7 +34,7 @@ export function HomeChatStart() {>{/*Agents new conversation sits under ViewShell.TopBar (h-12) and- anchors the greeting with .newchat padding 24/64. Home only renders that bar+ anchors the greeting above center with .newchat padding 24/64. Home only renders that barwhen the list is collapsed, so reserve the same offset here.*/}<Show when={agents().enabled && !showHomeTopBar()}>@@ -47,7 +47,7 @@ export function HomeChatStart() {<divclass={agents().enabled- ? 'mx-auto grid min-h-64 min-w-0 w-full max-w-180 flex-1 grid-cols-1 grid-rows-[max(0px,calc(50%-60px))_auto_1fr] pt-6 pb-16'+ ? 'mx-auto grid min-h-64 min-w-0 w-full max-w-180 flex-1 grid-cols-1 grid-rows-[max(0px,calc(40%-60px))_auto_1fr] pt-6 pb-16': 'mx-auto grid h-full min-h-64 min-w-0 w-full max-w-180 grid-cols-1 grid-rows-[1fr_auto_1fr] pb-16'}data-home-composer-align={agents().enabled ? 'agents' : 'legacy'}diff --git a/docs/AGENT_GUIDE/ai-chat.md b/docs/AGENT_GUIDE/ai-chat.mdindex 4cecc3a5e7..b6873becfa 100644--- a/docs/AGENT_GUIDE/ai-chat.md+++ b/docs/AGENT_GUIDE/ai-chat.md@@ -84,11 +84,12 @@ permission failures should display a failed tool call without a successful resulwhile the agent and model lists scroll. It opens the roster on the selected kind'stab, where either kind can be created.- On Home and New conversation, selecting a coding agent expands the input even- with an empty or short draft. The heading stays anchored while the composer+ with an empty or short draft. Both pages place the composer above the viewport's+ vertical center. The heading and first input line stay anchored while the composerexpands downward. The plus attachment button stays at the far left: before thetext in the compact row, and on the bottom control row when expanded. The editor sits above the controls, with attachmentson the left and the agent/model and Send on the right. An inset repository bar- slides and fades in above the rounded input over 200ms, with rounded top corners+ slides and fades in below the rounded input over 200ms, with rounded bottom cornersand a darker surface in dark mode. Selecting a chat agent retracts the bar andrestores the compact input when the draft fits on one line, without remountingthe editor or losing the draft. Reduced-motion@@ -113,7 +114,7 @@ permission failures should display a failed tool call without a successful resul**Retry**. Picking a different repository resets the branch to thatrepository's default. Omitting the branch on the create-session APIlikewise starts on the repository's default branch.- Both controls open above the drawer without clipping. The selections survive+ Both controls open above the footer without clipping. The selections surviveagent changes and are sent only to coding agents. Cursor honors the explicitrepository and branch instead of choosing a repository from the prompt;the owner must have access through the connected GitHub App.