Skip to content

examples: app-builder preview in one call (POST /v1/previews) - #69

Merged
Musti7even merged 1 commit into
mainfrom
previews-474
Nov 25, 2026
Merged

Musti7even merged 1 commit into
mainfrom
previews-474

Conversation

@Musti7even

Copy link
Copy Markdown
Collaborator

The reference app now makes a preview with one call: POST /v1/previews (Musti7even/phonebox#474).

It used to take five steps:

  1. find the end user's phone;
  2. start it or make one;
  3. install the build;
  4. open it;
  5. make the embed link.

Now preview() sends one request and gets back the phone and the link, with the app already on screen. If the build fails, its install_failed or open_failed error reaches the page.

README changes:

  • the steps and the table describe the one call;
  • a tip to send an idempotency key;
  • the limits request no longer promises an answer;
  • a new recorded run against production, below.
Step Time
APK on a new phone 27 s
Expo SDK 58 on a new phone 41 s
Back from parked 15 s
A 404 build: install_failed 0.2 s

node server.mjs --self-check passes.

🤖 Generated with Claude Code

phoneFor(), load() and the embed call become one POST /v1/previews: the end user's phone, the APK installed or the
Expo link opened, on screen, the embed link. Stage errors (install_failed, open_failed) reach the page. README: one
call in the steps and the table, idempotency keys, the limits request no longer promises an answer, and a new
recorded run against production (27 s new phone with an APK, 41 s with Expo, 15 s from parked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Musti7even
Musti7even merged commit 527e4bb into main Nov 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant