Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(whatsapp): drop the account-ban note from the connect card (#9031)

Wolf Mermelstein8fa291cd0b38
diff --git a/apps/web/src/features/whatsapp-linked/components/account-card.tsx b/apps/web/src/features/whatsapp-linked/components/account-card.tsx
index 32e59e6e93..a7be96a4c3 100644
--- a/apps/web/src/features/whatsapp-linked/components/account-card.tsx
+++ b/apps/web/src/features/whatsapp-linked/components/account-card.tsx
@@ -7,7 +7,7 @@ import type { WhatsAppAccount } from '../core/account';
import { WhatsAppTile } from './whatsapp-tile';
/**
- * Nothing linked yet: what linking means, its risk, and Connect. A phone
+ * Nothing linked yet: what linking means, and Connect. A phone
* can't scan its own screen, so on one it says to link from a computer.
*/
export function ConnectCard(props: {
@@ -27,10 +27,6 @@ export function ConnectCard(props: {
? 'WhatsApp signed this device out. Link it again to keep your chats syncing.'
: 'Link your personal WhatsApp as a linked device. Only chats you choose come into Macro.'}
</Item.Description>
- <Item.Metadata>
- Macro connects as an unofficial WhatsApp client, which WhatsApp may
- restrict or ban accounts for.
- </Item.Metadata>
<Show when={props.phone}>
<Item.Description>
To link, open Macro on a computer, go to External → WhatsApp, and
diff --git a/apps/web/src/features/whatsapp-linked/views/whatsapp-page.test.tsx b/apps/web/src/features/whatsapp-linked/views/whatsapp-page.test.tsx
index c7962bfea7..ac3ccd8b6e 100644
--- a/apps/web/src/features/whatsapp-linked/views/whatsapp-page.test.tsx
+++ b/apps/web/src/features/whatsapp-linked/views/whatsapp-page.test.tsx
@@ -125,13 +125,11 @@ const chats = [
];
describe('not connected', () => {
- it('explains the account risk and links WhatsApp through a QR dialog', async () => {
+ it('links WhatsApp through a QR dialog', async () => {
const fake = createFakeWhatsApp({ account: null });
mount(fake);
- expect(
- screen.getByText(/unofficial WhatsApp client/, { exact: false })
- ).toBeTruthy();
+ expect(screen.queryByText(/unofficial|ban accounts/i)).toBeNull();
expect(fake.chatsEnabled[0]?.()).toBe(false);
fireEvent.click(screen.getByRole('button', { name: 'Connect' }));
diff --git a/apps/web/tests/functional/whatsapp-linked.spec.ts b/apps/web/tests/functional/whatsapp-linked.spec.ts
index 004cf42a9a..66eed54ccb 100644
--- a/apps/web/tests/functional/whatsapp-linked.spec.ts
+++ b/apps/web/tests/functional/whatsapp-linked.spec.ts
@@ -498,7 +498,6 @@ test('links WhatsApp by QR, then adds a shareable WhatsApp chat', async ({
const state = server();
const unexpected = await mount(page, state);
- await expect(page.getByText(/unofficial WhatsApp client/)).toBeVisible();
await page.getByRole('button', { name: 'Connect' }).click();
const dialog = page.getByRole('dialog');
await expect(dialog).toHaveClass(/ph-no-capture/);
diff --git a/docs/agent-guide/external.md b/docs/agent-guide/external.md
index a5abb61367..4b207e37f7 100644
--- a/docs/agent-guide/external.md
+++ b/docs/agent-guide/external.md
@@ -38,7 +38,7 @@ without one, External re-fetches once ~3 s after opening.
| State | What shows |
| --- | --- |
-| Not linked | Outlined WhatsApp row, the unofficial-client account-risk note, **Connect** (disabled with a tooltip when the server turns pairing off). A signed-out device reads **Reconnect**. A phone can't scan its own screen, so at phone width (touch, under 640px) there is no **Connect**; the row says to open Macro on a computer and scan its code with the phone. Tablets keep **Connect**. |
+| Not linked | Outlined WhatsApp row and **Connect**. A signed-out device reads **Reconnect**. A phone can't scan its own screen, so at phone width (touch, under 640px) there is no **Connect**; the row says to open Macro on a computer and scan its code with the phone. Tablets keep **Connect**. |
| Passkey | When WhatsApp asks for a passkey, the dialog says **Confirm on your desktop**. In Macro desktop, **Confirm with passkey** runs the native `whatsapp_passkey_authenticate` command (its caBLE QR shows in the dialog) and posts the assertion to `/whatsapp/pairing/<id>/passkey`; a returned code then shows to type on the phone. In a browser, **Continue in Macro desktop** opens `macro:///external?whatsappPairing=<id>`, which reopens the same pairing there; closing the browser dialog then doesn't cancel it. |
| Pairing | Dialog **Link WhatsApp**: a locally encoded QR (`role="img"`, name "Scan this code with WhatsApp on your phone") that follows WhatsApp's rotating codes, four numbered steps, **Cancel**. The dialog carries `ph-no-capture`. When a pairing expires (WhatsApp ran out of codes, ~2.7 minutes, or the 5-minute deadline) while the tab stays visible, the dialog shows **Refreshing code…** and starts a new pairing on its own, up to three times; after that, or if the tab was hidden, the QR square reads **Code expired** with **Show a new code**. A failure (not expiry) says **Linking didn't finish.** with **Show a new code**. |
| Linked | A full-width list like Drive's. Its header has **Search chats** (filters every section by name or phone digits) and a slim account strip: the phone number, "Connected" and a **WhatsApp account options** menu with **Disconnect** (asks to confirm). One account at a time: to switch, disconnect and connect again. Below, the account's WhatsApp chat list (`GET /whatsapp/chats`), newest activity first, one line per chat: a group, person or (announcement group) megaphone icon, the name ("Community · Group", or "Community · Announcements"), "Group" / "Community group" / "Announcement group" / "Direct chat · Archived", and the last activity on the right. Row actions show on hover or keyboard focus (always on touch). Chats sit in folding sections like the sidebar's (**Direct messages**, **Groups**, **Communities** with one section per community), remembered per person; a search opens every section and also lists matching added chats with **Open** (otherwise they are only in the sidebar). Addable chats (direct chats, community groups and disappearing-message groups included) have a one-click **Add to Macro** (no dialog, no name: the Macro chat follows the WhatsApp name; unnamed groups show member names), and groups someone already shared with the viewer as "Shared with you by <owner>" with **Open**. **Can't be added (n)** is collapsed (searching unfolds it) and lists the chat with yourself, communities themselves ("A community has no messages of its own; add one of its groups"), and groups the account left, each with its reason. A refused add shows DSS's specific reason in that chat's row. An account paired before the chat list existed shows only groups and chats with new messages until it is re-linked. |