Repository navigation
Conversation
Aymericr
requested changes
Oct 23, 2026
Aymericr
left a comment
Member
There was a problem hiding this comment.
Thanks for this, @angelim! The fix is well scoped and the plumbing checks out: tagging the shutter with a requestId lets the existing runSnapshotCapture failure path report back to the overlay, and keeping background thumbnails on the upload path makes sense. The tests are nice too.
One blocker before we can merge:
- Screenshots or a short screen recording. This changes visible behavior (the download, the "Saved" state, and the new error message), so please add a quick clip or screenshots of a 16:9 capture finishing and of the error state.
A few smaller things worth a look:
- Revoking the object URL at 0 ms in
downloadImage. Some browsers (Safari and Firefox in particular) can cancel or fail the download if the blob URL is revoked right afterclick(). A longer delay (for example 30 to 60 seconds) is the usual safe choice. Related: theurlemitted onsnapshot:savedis already revoked by the time anyone reads it, so listeners can't use it. Either keep it alive or document that it's informational only. - Other hosts. Since the overlay now always sends a
requestIdandisOverlaySnapshotSaverequires it to be echoed back, any other host of@pascal-app/editorthat emitssnapshot:savedwithout therequestId, or skips captures that carry one (the oldif (cameraData.requestId) returnpattern), will now leave the overlay stuck on "Capturing…". Worth a note in the PR description so host implementers know to echo it. - Thumbnail behavior change. Before this, a manual shutter in the standalone editor also updated the project thumbnail. Now it only downloads. That seems intended from your description, just confirming it is.
Once the screenshots are in I'm happy to take another look.
Author
|
screenshots added in PR description |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
In the standalone editor, clicking the snapshot shutter captured an image but only uploaded it as the project's thumbnail. The host never emitted
snapshot:saved, leaving the overlay on “Capturing…” without exporting a file.Download user snapshots with a project-based filename and the image's actual extension, then acknowledge completion so the overlay shows “Saved” and exits. Keep automatic thumbnail uploads on their existing path. Correlate shutter requests with save/failure events so unrelated captures cannot complete the overlay, and show capture/download failures while enabling retry.
Host integration: the overlay now supplies a
cameraData.requestId; hosts must process manual captures before skipping background request IDs and echo the exact ID onsnapshot:saved. Return/reject the capture callback promise so failures can reach the overlay. See the package README's Snapshot completion section.URL lifetime: the standalone download's blob URL remains valid for 60 seconds, then is revoked. It is a temporary download URL, not persistent image storage. A regression test covers deferred cleanup.
Thumbnail behavior: intentionally, a manual snapshot downloads without replacing the project's thumbnail. Background thumbnail captures continue to upload as before.
How to test
bun install --frozen-lockfileandbun dev --filter=editor --ui=stream, then open a saved project.Validation completed:
bun run check(passes with existing repository warnings)bun run check-types(all 13 tasks passed)bun run build --filter=editor^...(all six dependency builds passed)bun test apps/editor/lib/snapshot-download.test.ts packages/editor/src/components/editor/snapshot-capture.test.ts packages/editor/src/components/editor/thumbnail-generator.test.ts(47 tests passed)Screenshots / screen recording
Generic demo room; no private house plan is shown.
16:9 capture completed
Error feedback and retry
Optional: attach

snapshot-review-export.webp, the actual downloaded 1920 × 1080 demo image.Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Changes the thumbnail/snapshot host contract and event correlation; hosts that skip manual captures or omit requestId handling could see stuck overlays or missing downloads.
Overview
Manual snapshot captures in the standalone editor now download a file (sanitized project name + timestamp + correct extension) instead of only uploading the scene thumbnail, and emit
snapshot:savedwith the shutter’srequestIdso the capture overlay can finish.The snapshot overlay assigns a
requestIdper shutter press, completes only on a matchingsnapshot:saved, and shows errors fromsnapshot:capture-failedso failed downloads/saves allow retry.isOverlaySnapshotSavenow requires that ID match (background thumbnail events no longer dismiss the overlay). Host integration is documented in the editor README;downloadSnapshotrevokes blob URLs after 60s.Reviewed by Cursor Bugbot for commit e954e86. Bugbot is set up for automated code reviews on this repo. Configure here.