ENGINEERING NOTE 21 / 50 · SMS

Design a mobile SMS handoff that does not lose the order

OPEN RAMBO ·

Mobile users switch between the number page and a target app. Persist the order reference and restore its authoritative state when they return.

Published by OPEN RAMBO. The engineering patterns and pseudocode illustrate designs, not a documented product API. Numerical examples are illustrative.

Persist references, not secrets

Store only the minimum reference needed to reopen the order. Avoid persisting message bodies or codes in general browser storage. A refreshed page should retrieve the order after authentication instead of relying on a previously rendered secret.

Make copy explicit

Provide separate copy actions for number and code, with clear labels and a visible result. A failed clipboard operation needs a usable fallback. Do not copy automatically on page load or overwrite a clipboard while the user is reading another screen.

Restore after suspension

Listen for the page becoming visible and fetch status once. Do not create a second polling loop. Show expired, received or pending from that response; browser memory can survive longer than the actual allocation.

Illustrative implementation

on_visible():
    cancel_old_poller()
    state = await fetch_authorized_order(reference)
    render(state)
    start_poller_only_if_waiting(state)

Acceptance check

Test returning after the allocation expires, browser reload and clipboard denial. No flow should create a new order implicitly.

Read next