6 file(s), +65 / -21 lines
| Path | Role | + | - |
|---|---|---|---|
| .env.example | Source | +3 | -0 |
| messages/en.json | Config | +2 | -0 |
| messages/hi.json | Config | +2 | -0 |
| src/components/settings/channels/enrollment-code-card.stories.tsx | Component | +2 | -2 |
| src/components/settings/channels/enrollment-code-card.tsx | Component | +20 | -18 |
| tests/unit/channels-page.test.tsx | Test | +36 | -1 |
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.
| Surface | Change |
|---|---|
| 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. |
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.
Settings/Channels/EnrollmentCodeCard → Click to send shows the primary
WhatsApp action plus the manual code and number fallback.
Settings/Channels/EnrollmentCodeCard → Expired shows regeneration and
no live send link.
wa.me URL and new-tab target.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.