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
chrome-devtools MCP Technique (learned on Macro)
Snapshot-first loop
take_snapshotafter every navigation or pane change; act only on uids from the latest snapshot. Uid prefixes bump (7_x→9_x) whenever the UI re-renders a region (the app is SolidJS); stale uids fail loudly — re-snapshot rather than guess.- Macro snapshots are huge (split panes duplicate the whole doc text; the Activity heatmap
adds ~400 nodes). Save with
filePath:and grep the file via Bash instead of dumping the snapshot into context. Strip lines matchingNotifications (altwhen reading. - The snapshot exposes contenteditable content as the element's
value— use it to verify what you typed or what an AI edit produced.
Interacting
fillonly works on real<input>/<textarea>/<select>. All Macro editors and message composers are contenteditable: click to focus, thentype_text(optionallysubmitKey: "Enter").- Token comboboxes (channel invites, participant add): click the combobox,
type_textthe value, watch for theN option(s) availablelive-region text, press Enter to commit the chip before submitting the form. - Radio tab strips (Messages/Attachments/Participants, Signal/Noise/All): clicking the radio input can fail with "element did not become interactive" — click the adjacent StaticText label instead.
- Clicking a menu button once can merely focus it. If the expected menu/form is absent from the next snapshot, click again.
- Dialog submits often use
Ctrl+Enter(task create, background chat send) —press_keyhandles combos.
Waiting
navigate_pagecan time out at 10s while the SPA actually loaded — follow withwait_foron expected text instead of retrying navigation.wait_formatches any text on the page, including placeholders and duplicated doc text — choose strings that cannot pre-exist, or don't use it for completion.AI completion (edit or chat) has no reliable text signal. Poll inside
evaluate_script:async () => { for (let i = 0; i < 60; i++) { if (![...document.querySelectorAll('button')] .find(b => /Stop generating|^Stop$/.test(b.textContent.trim()))) return true; await new Promise(r => setTimeout(r, 1000)); } return false; }
Diagnosing failures
- On any error dialog or blank page:
list_console_messages(types error/warn) pluslist_network_requests(resourceTypes xhr/fetch), thenget_network_requeston the suspicious reqid for headers/body. Pairing the console error with the failing request localizes the fault in one step. - If the app root is empty, include
scriptrequests: a 502 for a Vite module prevents the entry module from rendering, even when/app/returns 200. Check proxy logs for Docker-to-host dial timeouts. The generated Vite proxy limits upstream connections to 16 to avoid exhausting the host listener during module loading; reload after updating and restarting only the affected proxy. net::ERR_NETWORK_CHANGEDspam means the environment's network flapped: verify the stack with curl from the shell, thennavigate_pagereload.- Full-screen "Something went terribly wrong" dialogs:
Homerecovers navigation-level crashes; the LoroDoc crash needs a reload withignoreCache: true(see documents.md). - Browser restarts invalidate page ids AND (with a fresh profile) the login session; on
"browser was restarted" notes,
list_pages, re-select, and expect to re-login. - Every backend request carries a
traceparentheader and returnsx-request-id— grab them fromget_network_requestfor backend correlation (see observability.md).
GraphQL subscription compression
- For
/soup/graphql/ws, check the response handshake headerSec-WebSocket-Extensionsforpermessage-deflate. The browser's request offering it is not proof the server accepted it. On a nativeWebSocketobject,socket.extensionsreports the negotiated extension afteropen. - Both
graphql-transport-wsand legacygraphql-wssupport compression. The browser decompresses messages before deliveringmessageevents; keep using normal JSON parsing. DevTools' decoded message payloads do not show wire savings. - No extension in the response means an uncompressed fallback, not a failed subscription. This change is specific to GraphQL; don't expect the connection gateway or agent sockets to negotiate compression.
Hygiene
- Work in the user-visible tab (no isolated contexts) when a human is watching via VNC.
- Prefer snapshots over screenshots; screenshot only when layout confusion matters.
evaluate_scriptwithwaitForStableDom: falsefor read-only checks — it is cheaper and cannot deadlock on animating UI.