PR: #731: feat(channels): wa.me click-to-send enrollment link [Story-2976] by @pramaan-board-bot[bot]
View PR →

Files changed

6 file(s), +65 / -21 lines

Path Role + -
.env.exampleSource+3-0
messages/en.jsonConfig+2-0
messages/hi.jsonConfig+2-0
src/components/settings/channels/enrollment-code-card.stories.tsxComponent+2-2
src/components/settings/channels/enrollment-code-card.tsxComponent+20-18
tests/unit/channels-page.test.tsxTest+36-1

Story-2976: WhatsApp click-to-send enrollment

The Connect WhatsApp page now makes the shortest enrollment path the primary action: tap Open WhatsApp with code, let WhatsApp open a conversation with PRAMAAN's business number, then send the pre-filled one-time code.

Connect WhatsApp → open the pre-filled conversation → send once → keep the page open while it confirms the binding.

What changed

SurfaceChange
Primary action A shared PrimaryButton opens https://wa.me/15553039991?text=<encoded-code> in a separate context, preserving the polling page while WhatsApp handles the message.
Desktop fallback The plain-text enrollment code, copy action, and +15553039991 remain visible for manual sending.
Binding guidance The shipped “No number to type” guidance remains unchanged: the sender's number binds automatically when the message arrives.
Expiry Once the code expires, the click-to-send link disappears and the existing Get a new code action takes over.

Why the number is app-local

The current enrollment response exposes only provider, code, and expiry. The backend's WhatsApp phone-number ID is an opaque Meta identifier, not a dialable number. Story-2976 therefore uses a documented public environment value with the founder-supplied number as its exact fallback. If routing becomes per-firm, that number moves into the generated enrollment response rather than being inferred from a secret provider ID.

Storybook proof

Automated proof

Acceptance boundary

Storybook and unit tests prove the rendered contract. The real-phone M-01 tap-through remains the ceremony acceptance step and is not claimed by local fixture evidence.