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(database): make every table cell clickable across the full row height (#8216)
teo6d76d3764639
diff --git a/apps/web/src/features/crm/browser-test/editor.browser.e2e.ts b/apps/web/src/features/crm/browser-test/editor.browser.e2e.tsindex e5279801b9..205c1a194f 100644--- a/apps/web/src/features/crm/browser-test/editor.browser.e2e.ts+++ b/apps/web/src/features/crm/browser-test/editor.browser.e2e.ts@@ -1,12 +1,6 @@import { expect, test } from '@playwright/test';-test.afterEach(async ({ page }) => {- await page.unrouteAll({ behavior: 'ignoreErrors' });-});--test('the pipeline API powers the shared editor and respects column protections and grants', async ({- page,-}) => {+test.beforeEach(async ({ page }) => {await page.routeWebSocket('**', (socket) => socket.close());await page.route('https://**', (route) => route.abort());await page.route(/^http:\/\/localhost:\d+\//, async (route) => {@@ -29,6 +23,15 @@ test('the pipeline API powers the shared editor and respects column protectionsawait expect(page.getByRole('grid', { name: 'Renewals' })).toBeVisible({timeout: 30000,});+});++test.afterEach(async ({ page }) => {+ await page.unrouteAll({ behavior: 'ignoreErrors' });+});++test('the pipeline API powers the shared editor and respects column protections and grants', async ({+ page,+}) => {await expect(page.getByText('Acme', { exact: true })).toBeVisible();await page.getByRole('button', { name: 'Sort', exact: true }).click();await page.getByRole('button', { name: 'Add sort', exact: true }).click();@@ -57,3 +60,17 @@ test('the pipeline API powers the shared editor and respects column protectionspage.getByRole('button', { name: 'Add column', exact: true })).toHaveCount(0);});++test('a cell in a row taller than its value takes clicks across its full height', async ({+ page,+}) => {+ // Wrapped multi-select pills grow a row the same way.+ await page.addStyleTag({ content: '[role="row"] { min-height: 8rem; }' });+ const cell = page+ .getByRole('gridcell')+ .filter({ has: page.getByRole('button', { name: /^Notes: Follow up\./ }) });+ const box = await cell.boundingBox();+ if (!box) throw new Error('Notes cell is not laid out');+ await page.mouse.click(box.x + box.width / 2, box.y + box.height - 8);+ await expect(page.getByRole('textbox', { name: 'Edit Notes' })).toBeVisible();+});diff --git a/apps/web/src/features/database/components/database-table.tsx b/apps/web/src/features/database/components/database-table.tsxindex a25561ffa1..4544b90ccd 100644--- a/apps/web/src/features/database/components/database-table.tsx+++ b/apps/web/src/features/database/components/database-table.tsx@@ -721,7 +721,7 @@ export function DatabaseTable(props: DatabaseTableProps) {)}aria-colindex={columnIndex() + 2}tabindex={-1}- class="relative min-w-0 border-r border-edge-muted/40 px-0.5 py-0.5 outline-none focus-within:ring-1 focus-within:ring-inset focus-within:ring-ink/30 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ink/30"+ class="relative grid min-w-0 border-r border-edge-muted/40 px-0.5 py-0.5 outline-none focus-within:ring-1 focus-within:ring-inset focus-within:ring-ink/30 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ink/30"classList={{'bg-accent/15 ring-1 ring-inset ring-accent/50':selection.contains(index(), columnIndex()),diff --git a/apps/web/src/features/database/components/grid-cell.tsx b/apps/web/src/features/database/components/grid-cell.tsxindex 784ba0a4b0..9058a91ced 100644--- a/apps/web/src/features/database/components/grid-cell.tsx+++ b/apps/web/src/features/database/components/grid-cell.tsx@@ -350,7 +350,7 @@ export function GridCell(props: GridCellProps) {);return (- <div ref={cell} class="relative min-w-0" style={editorStyle()}>+ <div ref={cell} class="relative grid min-w-0" style={editorStyle()}><Switch><Match when={cellKind() === 'editing'}>{renderEditor()}</Match><Match when={cellKind() === 'boolean'}>@@ -401,9 +401,10 @@ export function GridCell(props: GridCellProps) {</div></Match><Match when={cellKind() === 'text'}>- <div class="relative">+ <div class="relative grid">{/* Keep the resolved label and its subscription alive while picking. */}<div+ class="grid"inert={isEntity() && editing()}classList={{invisible: isEntity() && editing() && draft() !== '',diff --git a/docs/agent-guide/databases.md b/docs/agent-guide/databases.mdindex 66915dbda3..1f2f95d229 100644--- a/docs/agent-guide/databases.md+++ b/docs/agent-guide/databases.md@@ -260,7 +260,9 @@ toast. A database's only table cannot be deleted: the item is disabled there.An editable empty row always follows the records. Enter a value in any of itscells to create a record; the next empty row appears immediately. Merely focusingor tabbing through an empty row does not save an empty record.-Click a cell to edit, or focus it with the arrow keys and start typing. Enter+Click a cell to edit, or focus it with the arrow keys and start typing. The+whole cell takes the click, including the space below its value when wrapped+pills make the row taller; values sit vertically centered in such rows. Entersaves and immediately edits the same column in the next row, including the emptynew-record row. Typing there starts the next record without waiting for theprevious save. Shift+Enter moves up. Both place the typing cursor at the end of