fix(frontend): make Android Chrome Terra connect tappable (GL-137) #159
No reviewers
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo!159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/gl-137-android-chrome-terra-connect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Make the header Connect Terra Wallet control tappable on Android Chrome and complete same-device WalletConnect without a non-gesture auto-redirect.
aria-label="Connect Terra Wallet", 44px hit target,touch-action: manipulation, Cancel instead of a disabled spinnerz-50 isolatewithoutoverflow-x-clipso Android Chrome does not clip/eat the tapconnectingis never persisted (onRehydrateStoragereset) so a fresh visit is not spinner-disabledQRCodeModalno longerlocation.hrefs from an async callbackwindow.keplris a WalletConnect row, not a dead “Not installed” extension rowskills/agent-frontend-terra-wallet-mobile.mdWhy
Related #137 (kept open until Android 16 Chrome device QA passes)
usera (Android 16 Chrome) could not activate Connect Terra Wallet on
bridge.cl8y.comwhile the same device connected successfully on ustr-cmm. Bridge transfers require a Terra wallet; a dead header CTA makes the product unusable for that cohort.Testing
npm run test:unitinpackages/frontend) — 692 passednpx tsc --noEmit)E2E_UI_ONLY=1 npx playwright test e2e/wallet-connect.spec.ts --workers=5— 7 passedChecklist
packages/frontend/plus docs/skills/README for invariantsnpx eslinton changed TS)npm run test:unit)mentioned in issue #137
RECOMMEND: FIX
Reviewed against #137. The implementation matches the intended DEX #519 / ustr-cmm direction (tappable header, no async
location.href, Open+Copy pairing, Keplr WC on mobile Chrome, Leap desktop-only). It is not a BLOCK. Do not close #137 until the reported device actually works.Security
QRCodeModalpatch + pairing hook; mobile uses Open/Copyhttps:/javascript:deep linksisAllowedWalletConnectDeepLinkintent:prefixintent:URI passes. Pairing templates come from the app wallet catalog, not an arbitrary WC peer, but a buggy/maliciousdetails.androidwould still open. Prefer allowlisting known packages (com.chainapsis.keplr, Galaxy Station, Lunc Dash)DEV_MODEconnectingonRehydrateStorageresetsconnecting; header becomes Cancel, not a disabled spinnerz-50 isolate,overflow-x-clipremoved; Legal TermsGate is not on the header (aligned with #134)https:#137 acceptance criteria
connecting === falseon fresh visitwindow.keplrabsentIssue verification: “Manual matrix on this issue: Android 16 Chrome tap → modal → Lunc Dash or Galaxy Station → address shown.” That box is still empty. Playwright
390×844with 5 workers (7 passed) is necessary but not sufficient — the original bug was Android Chrome hit-testing / WalletConnect, which desktop Chromium cannot reproduce.Other gaps
isAllowedWalletConnectDeepLinkallowlists allintent:andwc:URIs. Fine for pairing URIs; still rejectintent:without a known package.Testing
Unit coverage on pairing URI builders, allowlist negatives (
javascript:,data:,https://evil.example), WalletButton Cancel vs disabled, store rehydrate, and modal options is good. E2E covers desktop + mobile viewport including simulated Terra wallet.Required before treating #137 as closed: one passing Android 16 Chrome session on a preview deploy (tap CTA → modal → Open or Copy →
terra1in the header). Until then this is a well-aimed fix that has not been verified on the failing cohort.Follow-up (second pass): still RECOMMEND: FIX. Two completion-path bugs were not in the first note:
High —
connect.tsstill remaps WC failures to “install the extension.”packages/frontend/src/services/terra/connect.ts(~80–101) is unchanged. Any error containing"Keplr"/"Station"/"Cosmostation"becomes “Please install the … extension.” This MR now offers those wallets asWalletType.WALLETCONNECTon mobile Chrome. A WC reject/timeout/relay error that mentions the wallet name shows the old extension dead-end — the exact UX #137 is trying to kill. Gate that remap onWalletType.EXTENSIONonly.High —
cancelConnection+ visibility retry can rotate the pairing URI.stores/wallet.tscancelConnectionnow closes the pairing sheet. Unchangedhooks/useWallet.ts(~110–145) onvisibilitychange→ visible whileconnectingcallscancelConnection()thenconnectTerraWallet(..., WALLETCONNECT). Android Open (luncdash:/intent:) backgrounds Chrome; return from the wallet is the happy path. If the session is not yet in the cosmes cache, the user comes back to a newwc:URI while the wallet approved the old one. Retry via cached session /tryReconnectwithout closing the sheet or minting a new URI.Copy fallback (Medium): pairing
CopyButtonswallowsclipboard.writeTextfailure. Cosmes fallback usesprompt. Android Chrome often needs a visible Copy fallback when Open does not land in-app.Cosmes QR fallback Open still
location.hrefs with no allowlist when the pairing hook returns false (defense in depth vs theintent:prefix).Device QA on Android 16 Chrome remains required before closing #137. Draft !157 is the closed wrong-target duplicate.
mentioned in commit
b862755129added 1 commit
b8627551- fix(frontend): keep WalletConnect pairing URI stable after Android resume (GL-137)Compare with previous version
Follow-up: review fixes landed (
b862755)Implemented the two High completion-path bugs from the second pass, plus the Medium copy fallback,
intent:package allowlist, and cosmes fallback Open allowlist. Unit + Playwright retested. Do not close #137 until Android 16 Chrome device QA passes.Review items completed
remapTerraConnectErroronly emits “Please install the … extension” forWalletType.EXTENSION. WalletConnect reject/timeout/relay errors that mention Keplr/Station/Cosmostation keep the real message.cancelConnection+ visibility retry rotated the pairing URI. Returning from Lunc Dash / Galaxy Station / Keplr no longer cancels the in-flight connect or mints a newwc:URI.resumeWalletConnectAfterForegroundleaves the pairing sheet up;tryReconnectruns only when a cosmeswcSessionis already cached. Pairing hookopen()refuses to replace an in-flight URI.copyTextToClipboardfalls back toexecCommandthenprompt. Pairing sheet now shows a selectablewc:URI field for Android long-press when Copy fails.isAllowedDeepLinkbeforelocation.href(hook missing still rejects unknownintent:packages).intent:allowlist requires#Intentplus a knownpackage=(com.chainapsis.keplr,io.hexxagon.station,money.terra.station,wannabit.io.cosmostaion) orscheme=— not a blanketintent:prefix.INV-FE-WC-MOBILE-1indocs/FRONTEND_BRIDGE_INVARIANTS.md,docs/frontend.md,docs/qa-templates/qa-test-pass.md,skills/agent-frontend-terra-wallet-mobile.md.Not done (out of this push / still required)
Draft !157 was already the closed wrong-target duplicate.
Automated verification (this commit)
npm run test:unit— 707 passed (retest of new cases also passed)npx tsc --noEmitE2E_UI_ONLY=1 npx playwright test e2e/wallet-connect.spec.ts --workers=5— 7 passed (run twice)Device QA checklist (please run on Android 16 Chrome)
connecting === false); first tap opensTerraWalletModalterra1in the header; returning to Chrome does not replace the pairing URIwindow.keplr: enabled WalletConnect row, not a dead “Not installed”; a WC reject/timeout does not say “install the Keplr extension”Issue: #137 · MR: !159
changed the description
changed the description
added 10 commits
main42c92cea- chore: merge main into fix/gl-137-android-chrome-terra-connect (GL-137 + clickwrap/rank)Compare with previous version
added 6 commits
maine94e5382- chore: merge main into fix/gl-137-android-chrome-terra-connect (Terra AW docs)Compare with previous version
mentioned in commit
e228eb1cf8mentioned in issue #134
mentioned in merge request !161
mentioned in merge request !162