Skip to content

feat(preview): stream the real desktop app in ACME sandboxes - #5233

Merged
benjaminshafii merged 15 commits into
devfrom
feature/freestyle-desktop-novnc
Sep 23, 2026
Merged

benjaminshafii merged 15 commits into
devfrom
feature/freestyle-desktop-novnc

Conversation

@reachjalil

@reachjalil reachjalil commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

What is this about?

ACME Freestyle snapshots also run the real OpenWork desktop app from the reviewed commit. The snapshot captures it running, so every sandbox resumes it instantly behind the same private access as its other services. Reviewers can pick OpenWork desktop in the sandbox World menu to open it directly.

What problem does it solve?

Desktop-only changes could not be tried from a PR preview; sandboxes only ran the web app.

What was the situation before?

The World menu offered OpenWork web and ACME web, with no desktop, display or viewer.

Evidence

  • evals/specs/freestyle-review.e2e.test.ts — before: the review panel offered OpenWork web and ACME web; after: it also offers OpenWork desktop and explains it.
  • scripts/verify-freestyle-preview.ts — before: no desktop service; after: CI confirms the desktop is already running in real clones behind the sandbox's access.

Build deadline, readiness waits, snapshot version, triggers and secrets are unchanged. The desktop tries to sign in as the demo owner and otherwise opens signed out; sign-in currently falls back because Den's handoff redirects to the snapshot's internal origin.

Design: P3, P5, C1, C2, C3.

ACME snapshots now boot the Linux desktop app from the reviewed commit on a virtual display, signed in as the demo owner, and expose it through a noVNC viewer behind the per-sandbox preview gateway. The desktop is optional: if it cannot start, the web preview still launches without a dead link. Snapshot recipe moves to v5 so older snapshots are rebuilt.
…iewer

Restore the original build deadline, readiness wait, snapshot recipe version, workflow timeout, verification script and world labels. The display and noVNC viewer start in seconds and the desktop app boots in the background, so existing build timing is unchanged.
…chable in-VM

The snapshot's Den answers on internal template origins that the in-VM desktop cannot reach, so automatic sign-in timed out and the app was closed. Launch it signed out; the real app, its workspace and UI stay available through the viewer.
…ndow

The desktop's first boot fetched sidecars and helpers before opening a window and missed the harness's fixed page-target wait. The snapshot builder now fetches them once and the harness skips that step; one retry reuses warm compile caches.
@reachjalil
reachjalil requested a review from a team September 22, 2026 22:46
@vercel

vercel Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Ignored Ignored Preview Sep 23, 2026 12:01am UTC
openwork-den Ignored Ignored Preview Sep 23, 2026 12:01am UTC
openwork-diagnostics Ignored Ignored Preview Sep 23, 2026 12:01am UTC
openwork-landing Ignored Ignored Preview Sep 23, 2026 12:01am UTC

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

parsePreviewOutputs Services regex omits the new desktop origin prefix, so client re-parsing of launch outputs throws "Invalid private service link" and breaks the entire preview panel for ACME previews that started the desktop.

Fix on Vercel

Drop the review README and label changes; the sandbox link still appears through the existing service list.
@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 22, 2026 22:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 22, 2026 22:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 22, 2026 22:56 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 22, 2026 22:56 Inactive
Following the existing Freestyle pattern: the live clone check now requires the access-checked noVNC viewer and a booted desktop app, and records its readiness time. The review panel names the service and the README documents it.
…rvives snapshot resume

The eval harness's fixed deadlines expired when the snapshot paused and resumed a desktop that was still booting. Use .devcontainer/start-daytona-electron.sh under a relaunch loop, with a deadline-free readiness poll.
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 22, 2026 23:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 22, 2026 23:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 22, 2026 23:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 22, 2026 23:21 Inactive
…ntly

Wait (bounded, inside the existing build deadline) for the desktop window before the world reports ready, so Freestyle's memory snapshot captures a running desktop. Use the builder's prefetched sidecars instead of refetching on every boot.
Keep the launcher and running-snapshot design; once its window is up, sign it in as the demo owner through the launcher's debug port with the harness's handoff, warming Den web's /api/den route first, and fall back to signed out. Fetch desktop sidecars alongside the other builds. The prewarm check records whether the desktop signed in.
Den web's /api/den proxy redirects the handoff to the snapshot's template origin, which does not resolve in the VM, so the exchange timed out. Bootstrap the desktop with the local API; the exchange route accepts any origin by design.
Choosing OpenWork desktop launches the full-stack ACME world and opens its desktop viewer directly.
@github-actions

Copy link
Copy Markdown
Contributor

Selected evidence: Passed · 1/1 tests · 2/2 assertions · 0 images

Commit aeccfddb7a42d31ddebb93703c3422fb603f0cc9 · selected evidence
Required verification is reported separately by the current-head Required verification check.

Open review report

@benjaminshafii
benjaminshafii merged commit 3943b29 into dev Sep 23, 2026
29 checks passed
benjaminshafii pushed a commit that referenced this pull request Sep 23, 2026
The review page re-validates every Services link a launch returns. The
desktop viewer (desktop-<id>) added in #5233 was missing from the allowed
prefixes, so a working ACME sandbox was rejected and shown as a failed
launch.

Signed-off-by: Benjamin Shafii <[email protected]>
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.

2 participants