whatsup Admin UI — et-operational-platform

Status (verified 2026-10-04/05): built and shipped. Companion to whatsup-android-chat-puller-operations.md, which covers the wa-web-collector (Baileys) service this UI configures and displays data from.

What exists

  • Group management: src/services/whatsappGroupsService.ts — listGroupsWithStats, updateGroupAlias, updateGroupMonitored, updateGroupDescription, triggerSync.
  • Sync route: src/pages/api/whatsapp/groups/sync.ts (platform_admin only).
  • Message viewer: /api/whatsapp/messages reads the whatsapp_messages_enriched view over p24_whatsapp_messages (written by the collector), range-querying timestamp as Unix seconds.
  • Merged work: PR #2234 (whatsapp_groups RLS audit), 2248 (messages viewer), #2222 (day-accordion history).
  • Migration: supabase/migrations/20260523130000_add_rls_policy_whatsapp_groups.sql (platform_admin SELECT policy; table predates it).

Media (resolved 2026-10-05)

WhatsApp media renders in the viewer. URLs for wa-uploads objects are signed by getWaMediaSignedUrl in src/lib/wasabiClient.ts using the read-only WA_MEDIA_WASABI_* key (p24-infra#7396) in region eu-central-2 (#2283, #2287). The collector’s own key is write-only by design and must not be reused or widened. What to check if it breaks: ops doc §1.5.

The table it manages — whatsapp_groups

Same physical table, same Supabase project (mwkqmgadqnkkihjdeqsi), that the decommissioned WAHA incident-router used. Three uncoordinated writers:

  1. Dead WAHA fallback in src/pages/api/whatsapp/groups/sync.ts (WAHA_URL/WAHA_API_KEY) — removal tracked in #2253.
  2. n8n wa-group-sync webhook.
  3. whatsup-android-chat-puller/scripts/seed-whatsapp-groups.py (on_conflict=id upserts of its own 17 rows only).

Decided semantics (2026-10-04)

  • Refresh: the collector reads the allowlist once at startup. After toggling a group, restart it: ssh root@54.36.123.110 "cd /opt/wa-web-collector && docker compose restart".
  • monitored = false stops capture — nothing is written to wa_device_messages or p24_whatsapp_messages for that group. This differs from the WAHA-era meaning (where it only gated AI processing).