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(sharing): remove paperclip from share composers (#9279)
gbirmaneb1a252b5aae
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 76950bdb3c..dd6c2977b9 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -128,11 +128,12 @@ Gate event notes and document Share meeting-link controls withon in dev and uses PostHog in production.See `docs/agent-guide/calendar.md` at the repo root.-Share message image paste, file selection, drop, removal during upload, and+Share message image paste, drop, removal during upload, andupload failure have desktop, phone, and tablet browser coverage:`bunx playwright test --config src/lib/core/component/ForwardMessageComposer/browser-test/playwright.config.ts`.Keep the shared uploader from restoring removed attachments or publishing afterthe composer is disposed. The Share button and shortcut use the same upload guard.+Keep Share composers free of a paperclip button on desktop and mobile; preserve image paste and file drop.Menus that find entities by typed name (Command-K, mobile name search, @mentions) rank with `NAME_MATCH_RANKING` in `@core/util/freshSort`: names equaldiff --git a/apps/web/src/lib/core/component/ForwardMessageComposer.tsx b/apps/web/src/lib/core/component/ForwardMessageComposer.tsxindex ac2f9d95f0..23c9768c1d 100644--- a/apps/web/src/lib/core/component/ForwardMessageComposer.tsx+++ b/apps/web/src/lib/core/component/ForwardMessageComposer.tsx@@ -182,9 +182,6 @@ export function ForwardMessageComposer(props: {<Input.Attachments kind="document" /></div></div>- <div class="px-3 py-1 flex items-center">- <Input.AttachFilesAction disabled={props.composer.isSending()} />- </div></div></Input.Root>);diff --git a/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/README.md b/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/README.mdindex ef880b120b..86f7bb9b80 100644--- a/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/README.md+++ b/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/README.md@@ -10,8 +10,11 @@ Set `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH` when using an existing Chromium binaryand `SHARE_BROWSER_PORT` if port 3097 is occupied.The fixture mounts the production Share message composer and editor over a-controlled uploader. It exercises real clipboard paste, file input, drop events,+controlled uploader. It exercises real clipboard paste, drop events,removal, failure recovery, and serialized inline-image payloads on desktop,phone, and tablet. Requests to hosted services are blocked. It does not test alive backend upload or delivery; `ForwardToChannel.test.tsx` checks the sharesend boundary and its upload guard. Screenshots are saved with test results.++The shared composer has no paperclip button for any entity type. Images can+still be pasted or dropped into the optional message.diff --git a/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/images.browser.e2e.ts b/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/images.browser.e2e.tsindex a3cc7994f4..df2f649fde 100644--- a/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/images.browser.e2e.ts+++ b/apps/web/src/lib/core/component/ForwardMessageComposer/browser-test/images.browser.e2e.ts@@ -1,4 +1,4 @@-import { expect, test } from '@playwright/test';+import { expect, type Page, test } from '@playwright/test';const IMAGE ='iVBORw0KGgoAAAANSUhEUgAAAKAAAABkCAIAAACO1KzYAAABVUlEQVR4nO3aQQ2AMBQFwTrCFGeEoQQl6MAC6YGE7ST/Pm32+sZ+3tO3Hdf0cb9xx2ofXs0VOO4KHHcFjrsCx12B467AcVfguCtw3BU47gocdwWOuwLHXYHjrsBxV+C4K3DcFTjuChx3xx8fzX1/AsddgeOuwHFX4LgrcNwVOO4KHHcFjrsCx12B467AcVfguCtw3BU47gocdwWOuwLHXYHjrsBx1+gu7gocdwWOuwLHXYHjrsBxV+C4K3DcFTjuChx3BY67AsddgeOuwHFX4LgrcNwVOO4KHHcFjrsCx12ju7grcNwVOO4KHHcFjrsCx12B467AcVfguCtw3BU47gocdwWOuwLHXYHjrsBxV+C4K3DcFTjuChx3je7irsBxV+C4K3DcFTjuChx3BY67AsddgeOuwHFX4LgrcNwVOO4KHHcFjrsCx12B467AcVfguCtw3H0A1UmjWQj5J0YAAAAASUVORK5CYII=';@@ -23,14 +23,8 @@ test.beforeEach(async ({ page, context }) => {});});-test('pastes an image, waits for its upload and sends an inline image with multiline text', async ({- page,-}, testInfo) => {- const editor = page.locator('[data-markdown-editable]');- await editor.click();- await page.keyboard.type('First line');- await page.keyboard.press('Enter');- await page.keyboard.type('Second line');+async function pasteImage(page: Page) {+ await page.locator('[data-markdown-editable]').click();await page.evaluate(async (encoded) => {const bytes = Uint8Array.from(atob(encoded), (char) => char.charCodeAt(0));await navigator.clipboard.write([@@ -43,6 +37,17 @@ test('pastes an image, waits for its upload and sends an inline image with multiawait expect(page.locator('[data-input-attachments="media"] img[src^="blob:"]')).toBeVisible();+}++test('pastes an image, waits for its upload and sends an inline image with multiline text', async ({+ page,+}, testInfo) => {+ const editor = page.locator('[data-markdown-editable]');+ await editor.click();+ await page.keyboard.type('First line');+ await page.keyboard.press('Enter');+ await page.keyboard.type('Second line');+ await pasteImage(page);await expect(page.getByRole('button', { name: 'Share', exact: true })).toBeDisabled();@@ -71,14 +76,8 @@ test('pastes an image, waits for its upload and sends an inline image with multitest('removing an uploading image keeps it out of the message', async ({page,}) => {- await page.locator('[data-input-attach-file-picker]').setInputFiles({- name: 'removed.png',- mimeType: 'image/png',- buffer: Buffer.from(IMAGE, 'base64'),- });- await page- .getByRole('button', { name: 'Remove removed.png', exact: true })- .click();+ await pasteImage(page);+ await page.getByRole('button', { name: /^Remove / }).click();await page.getByRole('button', { name: 'Finish uploads' }).click();await expect(page.getByRole('button', { name: 'Share', exact: true })@@ -128,18 +127,12 @@ test('accepts a dropped image and lets an upload failure recover', async ({await expect(page.getByRole('button', { name: 'Share', exact: true })).toBeEnabled();- await page.locator('[data-input-attach-file-picker]').setInputFiles({- name: 'retry.png',- mimeType: 'image/png',- buffer: Buffer.from(IMAGE, 'base64'),- });+ await pasteImage(page);await page.getByRole('button', { name: 'Finish uploads' }).click();await expect(page.getByRole('button', { name: 'Share', exact: true })).toBeEnabled();- await expect(- page.getByRole('button', { name: 'Remove retry.png' })- ).toBeAttached();+ await expect(page.getByRole('button', { name: /^Remove / })).toBeAttached();await page.getByRole('button', { name: 'Close share' }).click();await page.getByRole('button', { name: 'Open share' }).click();await expect(page.locator('[data-input-attachments="media"]')).toHaveCount(0);diff --git a/docs/agent-guide/ai-chat.md b/docs/agent-guide/ai-chat.mdindex b29af908fa..a1a6f61b78 100644--- a/docs/agent-guide/ai-chat.md+++ b/docs/agent-guide/ai-chat.md@@ -1603,6 +1603,7 @@ Saved sessions have **Share** and **Copy Share Link** in the desktop header;on mobile, open the session title menu and choose **Share**. The owner canselect people or channels, choose their access level, and send the session withan optional message using the same Share dialog and mobile drawer as tasks.+Like other Share composers, it supports pasted images without a paperclip button.Sessions also support **Share** from entity list menus and the entity sharingshortcut. **People with access** lists the owner and shared conversations;the owner can change or remove a conversation's access. When that list holdsdiff --git a/docs/agent-guide/documents.md b/docs/agent-guide/documents.mdindex b227e95ebc..6d487fa55b 100644--- a/docs/agent-guide/documents.md+++ b/docs/agent-guide/documents.md@@ -14,15 +14,17 @@ The document header has separate Share, Copy Share Link, and Side Panel buttons.They are borderless with a soft rounded background on hover. Share opens thesharing dialog; copying a link is a separate action.-In the Share dialog's **Optional message**, paste an image with Cmd/Ctrl+V,-use **Attach files**, or drop a file into the composer. Images show a removable-preview and are sent inline beside the shared item to each selected person or-channel. Share (including Cmd/Ctrl+Enter and the phone drawer's Share button)-waits for uploads; Enter still inserts a newline. Removing an uploading image+In the Share dialog's **Optional message**, paste an image with Cmd/Ctrl+V+or drop a file into the composer. Share composers have no paperclip button on+desktop or mobile. Images show a removable preview and are sent inline beside+the shared item to each selected person or channel. Share (including+Cmd/Ctrl+Enter and the phone drawer's Share button) waits for uploads; Enter still inserts a newline. Removing an uploading imagekeeps it removed, and closing the dialog discards its attachment draft.-Verify paste, file selection, drop, removal during upload, upload failure, and+Verify paste, drop, removal during upload, upload failure, andsending to both a person and a channel. On touch, attachment previews scroll-horizontally and removal remains available without hover.+horizontally and removal remains available without hover. Composer fixture+screenshots: [desktop](media/share-images/desktop.png) and+[phone](media/share-images/mobile.png).With `enable-calendar-meeting-notes` enabled, owned markdown documents' Sharepanel also lists **Meeting links** (under the **Link** tab on mobile).diff --git a/docs/agent-guide/media/share-images/desktop.png b/docs/agent-guide/media/share-images/desktop.pngindex 6131a03186..f24fdbb74e 100644Binary files a/docs/agent-guide/media/share-images/desktop.png and b/docs/agent-guide/media/share-images/desktop.png differdiff --git a/docs/agent-guide/media/share-images/mobile.png b/docs/agent-guide/media/share-images/mobile.pngindex 5533af0ad4..f7776f5a4c 100644Binary files a/docs/agent-guide/media/share-images/mobile.png and b/docs/agent-guide/media/share-images/mobile.png differ