Repository navigation
fix(support): WhatsApp contact opens the real chat with the message attached - #707
Merged
Merged
Conversation
…ttached Fixes #703 — and the bug on the ground was worse than the issue says. openWhatsAppAction accepted the message and dropped it, so support lost the app-version/device context the caller builds. But the URL it opened, wa.flashapp.me, has served a 'WhatsApp support is temporarily unavailable' placeholder card since the 2026-08 account suspension — verified by fetching it — so the button delivered neither the chat NOR the message: it dead-ended every user at a page telling them to go use email instead, while the restored support number sat reachable. Now builds https://wa.me/<digits>?text=<message> from WHATSAPP_CONTACT_NUMBER. wa.me over the whatsapp:// scheme deliberately: the scheme rejects when WhatsApp is not installed (an unhandled rejection out of a button handler), the universal link degrades to a browser page. Digits-only because a literal + in the wa.me path 404s. Logic extracted to contact-modal.logic.ts (the app-update.logic pattern) so it is testable without dragging the component tree through jest; the component re-exports it. Tests pin the message surviving into the URL, the wa.me target, and the wiring — the original bug WAS the wiring, and it would have passed any builder-only test. 88 suites / 864 tests green; tsc and eslint clean. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…n failure, drop dead helper Address review findings on #707: - Derive WHATSAPP_SUPPORT_URL from WHATSAPP_CONTACT_NUMBER (wa.me, digits-only) instead of the dead wa.flashapp.me placeholder, fixing the three remaining support buttons (Bank Accounts, Need Help, Bank Transfer) that still opened the 'support unavailable' card; test pins the constant off the placeholder host - Catch the Linking.openURL rejection in openWhatsAppAction (no browser + no WhatsApp on managed/kiosk Android rejects with no activity) and surface an email-fallback toast instead of an unhandled rejection; new support.whatsappOpenFailed i18n key added to en and all 23 locale files; test covers the rejection path - Delete the unused openWhatsApp helper that embedded the whatsapp:// scheme + '+'-in-number pattern the module doc argues against - Correct the app-update gate comment that claimed the shared helper still points at wa.flashapp.me Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…act-modal Review finding: the re-export had zero importers — consumers use ContactModal directly and the test imports from contact-modal.logic. One import path per symbol. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
Review residual on #707. The failure toast fired without currentTranslation, so it fell back to English for every locale — and it fires precisely for a user whose support attempt just failed, the worst moment to switch languages on them. openWhatsAppAction now threads the caller's LL through, following the repo's near-universal toastShow convention. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…RT_URL + pin the modal call site Review fixes for #707: - buildWhatsAppSupportUrl now builds on the shared WHATSAPP_SUPPORT_URL constant instead of re-deriving the wa.me base from WHATSAPP_CONTACT_NUMBER with its own digit-strip — one source of truth for the support URL, so a future number/host change can't silently fork the contact-modal path from the three shared-constant buttons. - Add a render test for the ContactModal WhatsApp item: press it and assert Linking.openURL received buildWhatsAppSupportUrl(messageBody), pinning the component call site (the #703 failure shape) one level above the exported helper. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #703 — and the bug on the ground is worse than the issue describes.
What the button actually did
openWhatsAppAction(message)accepted the message and dropped it (#703's finding). But the URL it opened,wa.flashapp.me, has served a "WhatsApp support is temporarily unavailable" placeholder card since the 2026-08 account suspension — verified by fetching it. So the button delivered neither the chat nor the message: every user tapping "WhatsApp" dead-ended at a page telling them to email instead, while the restored support number sat reachable.The fix
Build
https://wa.me/<digits>?text=<message>fromWHATSAPP_CONTACT_NUMBER(routing decision confirmed with Jabari — inbound goes to the handset).Two deliberate details:
wa.meover thewhatsapp://scheme — the scheme rejects when WhatsApp isn't installed (an unhandled rejection out of a button handler); the universal link opens the app when present and degrades to a browser page.+in thewa.mepath 404s.Structure
Logic extracted to
contact-modal.logic.ts(the existingapp-update.logicpattern) so it's testable without dragging the component tree through jest; the component re-exports it, so no caller changes.Tests
Three, and the third is the one that matters: the message surviving into the URL, the
wa.metarget (not the placeholder host, no+), andopenWhatsAppActionopening exactly the built URL — the original bug was the wiring, and a builder-only test would have passed with the bug present.88 suites / 864 tests green; tsc + eslint clean.