From 8f17b416b85f9470082f58330d71785459c1d474 Mon Sep 17 00:00:00 2001 From: ngqile Date: Wed, 2 Dec 2026 11:57:23 +0800 Subject: [PATCH] docs(whatsapp): tick portal tasks and the deployment doc Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs --- openspec/changes/add-whatsapp-inbox/tasks.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openspec/changes/add-whatsapp-inbox/tasks.md b/openspec/changes/add-whatsapp-inbox/tasks.md index cc5d4ee..008f7e8 100644 --- a/openspec/changes/add-whatsapp-inbox/tasks.md +++ b/openspec/changes/add-whatsapp-inbox/tasks.md @@ -60,7 +60,7 @@ Verify commands: ## Wave 5 (parallel: 5.1 and 5.2) -- [ ] 5.1 Portal inbox: +- [x] 5.1 Portal inbox: - the `/whatsapp` page, with list tabs, search, thread, bubbles and ticks, the window state, the composer and template picker, media rendering, and assign controls for admins; - polling; - proxies under `app/api/admin/whatsapp/**`; @@ -68,16 +68,20 @@ Verify commands: - Depends on: 4.2 - Scope: `solvway-admin-portal/app/whatsapp/**`, `solvway-admin-portal/app/api/admin/whatsapp/**`, `solvway-admin-portal/app/components/whatsapp/**`, `solvway-admin-portal/app/lib/services/whatsapp*`, `solvway-admin-portal/app/lib/routeModules*` - Verify: portal verify -- [ ] 5.2 Portal sidebar and buttons: +- [x] 5.2 Portal sidebar and buttons: - `BO_WHATSAPP` in the Leads section with `MessageCircle` and the unread badge; - WhatsApp buttons on leads and event leads rows and phone cards (start chat; told who owns it when someone else does). - Depends on: 4.2 - Scope: `solvway-admin-portal/app/lib/aclSidebar*`, `solvway-admin-portal/app/components/app/**`, `solvway-admin-portal/app/leads/**`, `solvway-admin-portal/app/event-leads/**`, `solvway-admin-portal/app/lib/i18n/defaultMessages.ts` - Verify: portal verify (5.1 adds its keys to `defaultMessages.ts` after 5.2 is integrated, to avoid a hotspot clash) + - 5.1 and 5.2 done 2026-12-02, inline (owner: no workers), self-reviewed. The proxy lives at `app/api/whatsapp` (codebase convention). The WhatsApp button sits in the Mobile cell, so the leads table keeps its column order. + - Live check on the local stack with the mock, as super admin at 1280 and 360 px: unread badge and clearing it, the tabs, the thread header and lead link, the window countdown, text send with sent then read ticks, template sync, an unsupported template disabled, a filled template sent, image, document, location and expired media, start chat from Leads. It found five bugs, each fixed test-first: the list stuck on its skeleton under StrictMode, a sent message kept a stale tick, a super admin got no templates, a super admin owner could not be shown in the owner select, and the thread overflowed at 360 px. + - It also found that the webhook answered 200 when the service could not store the event, losing it. Owner decision: answer 503 so Meta redelivers (design D3, spec scenario "Inbox not ready"), verified live by stopping `service-system`. ## Wave 6 (serial: release) -- [ ] 6.1 `docs/deployment.md`: the environment per company, the SQL order, the Meta setup steps (webhook URL, verify token, `messages` subscription, templates), and granting the modules. +- [x] 6.1 `docs/deployment.md`: the environment per company, the SQL order, the Meta setup steps (webhook URL, verify token, `messages` subscription, templates), and granting the modules. + - Also: the webhook's own Traefik route, the role pairing, the go-live limits, the 503 behaviour, and the client-address note for rate limits. - [ ] 6.2 Live check on the local stack with the mock: - inbound for INS and CV, kept apart; - an unknown sender;