DEV Community

Roronoa
Roronoa

Posted on

"Approve a Preview on Mobile Without Trusting a Stale Network Handoff"

A phone opens a preview on Wi-Fi. The reviewer walks outside, the browser reconnects on cellular, and the old page still looks approvable. Network continuity is not evidence continuity. Bind the action to a short-lived preview token containing the exact artifact identity.

{
  "preview_id": "prv_01",
  "build_id": "bld_01",
  "commit_sha": "replace-me",
  "evidence_version": 4,
  "issued_at": "replace-with-UTC",
  "expires_at": "replace-with-UTC",
  "nonce": "single-use-replace-me"
}
Enter fullscreen mode Exit fullscreen mode

The server—not the phone clock—accepts approval only if the token is unexpired, unused, authorized for the reviewer, and still matches current preview, build, commit, and evidence version. Any rebuild, changed test result, superseding preview, logout, or explicit revocation makes it stale. The client can hide a stale button, but server rejection is the boundary.

Device and network grid

Device/browser Start Handoff Interruption Required result
small phone / A Wi-Fi cellular none revalidate before approve
small phone / A cellular offline background no optimistic success
large phone / B Wi-Fi captive portal reload explicit blocked state
tablet / B Wi-Fi cellular build replaced old token rejected
phone / A cellular Wi-Fi double tap one approval operation

Record exact OS/browser versions, power mode, preview/build IDs, network timestamps, token evidence version, HTTP outcome, and final server state. Do not record personal browsing data or raw bearer tokens.

Unexecuted test sequence: open the identified preview; inspect its visible commit marker; background the browser; trigger a harmless rebuild from the fixture; switch networks; foreground; attempt the old action. Expected failure is an explicit stale response with no approval effect. Fetch the new preview and token, verify identifiers, approve once, then immediately switch networks again. Expected success is one durable operation ID whose artifact identity matches the screen.

Stop release for approval during offline state, replay after token expiry, disagreement across devices, a changed artifact retaining the old evidence version, or duplicate effects from repeated taps. Cleanup means revoke unused tokens, delete preview and disposable workspace, remove test identities, and verify the action cannot be replayed from browser history. Preserve only sanitized IDs and outcomes.

This grid cannot cover every radio, browser cache, service worker, VPN, captive portal, or clock condition. A token reduces stale approval risk but does not prove preview content integrity or reviewer intent. The protocol and expected results are proposed; no mobile test result is claimed. Record whether a stale page remains visible after rejection, because safe server behavior does not excuse a misleading screen.

Connect the grid to a temporary preview

The overseas hosted MonkeyCode option is described by current official material as “Free to start,” with integrated models and managed server-side cloud development environments supporting build, test, and preview. It offers a surface for this handoff test; it does not make every model or cloud server free. Check the current console for availability, quotas, permitted regions, duration, possible future pricing, and applicable terms.

Use this official campaign route after preparing the disposable device fixture: https://ly.cyberserval.tech/iIETXiF

The mobile exit sequence revokes tokens, clears sanitized fixture data, deletes preview and workspace, and retries the old action only to confirm rejection. Any surviving authority or mismatched artifact identity fails the exercise.

Disclosure: This article promotes MonkeyCode using an official campaign link. I’m a MonkeyCode user, not affiliated with the project, and I receive no commission from this link.

AI assistance disclosure: This article was drafted with AI assistance and reviewed against the cited project materials.

Top comments (0)