fix(web): Open in Keplr when Terra T&C has no extension (#9) #29

Merged
PlasticDigits merged 1 commit from fix/9-terra-mobile-keplr into main 2026-08-18 15:00:56 +00:00
PlasticDigits commented 2026-08-18 14:41:48 +00:00 (Migrated from gitlab.com)

Summary

  • Closes #9: /sign/terra-classic no longer dead-ends on Keplr extension not found in Android Chrome.
  • When window.keplr is missing, the portal shows Open in Keplr (documented universal https://deeplink.keplr.app/web-browser?url= with the current sign URL) plus Copy link. Signing still uses issue #1 ADR-036 signArbitrary once Keplr injects the provider in-app.
  • Desktop / in-app Keplr path is unchanged. API verify, canonical message, columbus-5, property isolation, and redirect allowlist are untouched. EVM / Solana / Telegram pages do not mount the CTA.

Acceptance criteria

Criterion Status
Android Chrome never dead-ends on Keplr extension not found without a next step Done — Open in Keplr + copy-link; Connect & sign shows guidance instead of throwing
Happy path: signed_latest from Android Chrome or Keplr in-app (both documented; ≥1 Chrome-viable path) Chrome-viable path is Open in Keplr → in-app signArbitrary. Stay-in-Chrome WalletConnect not shipped
Desktop Keplr extension path from #1 still works Unchanged signArbitrary(columbus-5, …) + mock e2e
API still rejects wrong pubkey / property / tampered message / timestamp No API change; cargo test Terra unit + abuse integration green
EVM / Telegram / Solana unchanged EVM omits extraControls; e2e asserts no Open in Keplr on /sign/evm
Retail-short copy (no ADR-036 in idle status) Idle: “On a phone, open this page in the Keplr app…”

Test plan

  • Web unit: keplrMobile deep-link encoding, origin bind, javascript: reject, copy-link, signShell extraControls
  • Playwright missing-window.keplr CTA (deeplink encodes portal URL, not redirect_uri; no dead-end error)
  • Playwright mock Keplr ADR-036 happy path (CTA hidden)
  • Full web e2e (16) with Playwright workers: 5
  • cd api && cargo test (ADR-036 unit + abuse integration)
  • Manual: Android 16 Chrome against staging/prod Open in Keplr → in-app sign → signed_latest
  • Manual: desktop Keplr extension regression

Invariants / docs

Cross-linked in skills/terra-classic-adr036/SKILL.md (new #9 invariants 15–18), skills/testing-coverage/SKILL.md, skills/portal-sign-disclosure/SKILL.md, README.md, clickwrap README, gaps/GAP_1786322222.md. Deep-link url is always the current portal sign page — never a query-supplied redirect_uri.

Follow-up (not in this MR)

WalletConnect / Keplr Mobile signArbitrary so Chrome can complete T&C without switching to the in-app browser (issue #9 product path). DEX/bridge connect bugs remain on those repos (cl8y-dex-terraclassic#554, cl8y-bridge-monorepo#137).

## Summary - Closes [#9](https://gitlab.com/plasticdigits/cl8y-ecosystem-legal/-/issues/9): `/sign/terra-classic` no longer dead-ends on `Keplr extension not found` in Android Chrome. - When `window.keplr` is missing, the portal shows **Open in Keplr** (documented universal `https://deeplink.keplr.app/web-browser?url=` with the current sign URL) plus **Copy link**. Signing still uses issue #1 ADR-036 `signArbitrary` once Keplr injects the provider in-app. - Desktop / in-app Keplr path is unchanged. API verify, canonical message, `columbus-5`, property isolation, and redirect allowlist are untouched. EVM / Solana / Telegram pages do not mount the CTA. ## Acceptance criteria | Criterion | Status | |-----------|--------| | Android Chrome never dead-ends on `Keplr extension not found` without a next step | Done — Open in Keplr + copy-link; Connect & sign shows guidance instead of throwing | | Happy path: `signed_latest` from Android Chrome **or** Keplr in-app (both documented; ≥1 Chrome-viable path) | Chrome-viable path is Open in Keplr → in-app `signArbitrary`. Stay-in-Chrome WalletConnect **not** shipped | | Desktop Keplr extension path from #1 still works | Unchanged `signArbitrary(columbus-5, …)` + mock e2e | | API still rejects wrong pubkey / property / tampered message / timestamp | No API change; `cargo test` Terra unit + abuse integration green | | EVM / Telegram / Solana unchanged | EVM omits `extraControls`; e2e asserts no Open in Keplr on `/sign/evm` | | Retail-short copy (no ADR-036 in idle status) | Idle: “On a phone, open this page in the Keplr app…” | ## Test plan - [x] Web unit: `keplrMobile` deep-link encoding, origin bind, `javascript:` reject, copy-link, signShell `extraControls` - [x] Playwright missing-`window.keplr` CTA (deeplink encodes portal URL, not `redirect_uri`; no dead-end error) - [x] Playwright mock Keplr ADR-036 happy path (CTA hidden) - [x] Full web e2e (16) with Playwright `workers: 5` - [x] `cd api && cargo test` (ADR-036 unit + abuse integration) - [ ] Manual: Android 16 Chrome against staging/prod Open in Keplr → in-app sign → `signed_latest` - [ ] Manual: desktop Keplr extension regression ## Invariants / docs Cross-linked in [`skills/terra-classic-adr036/SKILL.md`](skills/terra-classic-adr036/SKILL.md) (new #9 invariants 15–18), [`skills/testing-coverage/SKILL.md`](skills/testing-coverage/SKILL.md), [`skills/portal-sign-disclosure/SKILL.md`](skills/portal-sign-disclosure/SKILL.md), [`README.md`](README.md#terra-classic-keplr), clickwrap README, [`gaps/GAP_1786322222.md`](gaps/GAP_1786322222.md). Deep-link `url` is always the current portal sign page — never a query-supplied `redirect_uri`. ## Follow-up (not in this MR) WalletConnect / Keplr Mobile `signArbitrary` so Chrome can complete T&C without switching to the in-app browser (issue #9 product path). DEX/bridge **connect** bugs remain on those repos (`cl8y-dex-terraclassic#554`, `cl8y-bridge-monorepo#137`).
PlasticDigits commented 2026-08-18 15:00:42 +00:00 (Migrated from gitlab.com)

mentioned in issue #10

mentioned in issue #10
PlasticDigits commented 2026-08-18 15:00:51 +00:00 (Migrated from gitlab.com)

mentioned in issue #9

mentioned in issue #9
PlasticDigits commented 2026-08-18 15:00:56 +00:00 (Migrated from gitlab.com)

mentioned in commit 56f99d4ac5

mentioned in commit 56f99d4ac5ec5c3cd4129e85f8a90520af09686d
PlasticDigits (Migrated from gitlab.com) merged commit 56f99d4ac5 into main 2026-08-18 15:00:56 +00:00
PlasticDigits commented 2026-08-18 15:16:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #11

mentioned in issue #11
PlasticDigits commented 2026-08-26 01:36:09 +00:00 (Migrated from gitlab.com)

mentioned in merge request !30

mentioned in merge request !30
PlasticDigits commented 2026-08-26 01:36:52 +00:00 (Migrated from gitlab.com)

mentioned in merge request !31

mentioned in merge request !31
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-ecosystem-legal!29
No description provided.