editor: light WebGPU preview and /editor scene redirect - #570
Conversation
Redirect MCP-style /editor/:id URLs to /scene/:id, open scenes with a lighter post-FX path for stable local WebGPU, and clarify the home blank-canvas banner vs the saved scenes list.
SceneLoader stayed mounted on same-route Light preview navigation, so shading never updated. Depend on useSearchParams so solid mode applies.
|
Addressed Bugbot finding L5 in the follow-up commit:
Same pitfall is noted as L5 in |
When ?disable=postFx is removed, set shading back to rendered so the viewer is not stuck on the solid/light path after client navigation.
|
Addressed the latest Bugbot finding (N3 / L8):
Previously we only set solid when flags were present. |
Pass disablePostFx from SceneLoader into Viewer so post-FX is actually skipped (not only solid shading). Light preview button re-applies solid shading even when the query is already active.
|
Addressed the latest Bugbot findings on light preview:
Query flags still toggle |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 003ac55. Configure here.
|
|
||
| const viewerCanvas = ( | ||
| <ViewerCanvas | ||
| disablePostFx={disablePostFx} |
There was a problem hiding this comment.
Preview mode ignores disablePostFx
High Severity
This PR passes disablePostFx into the main editor Viewer, but preview mode renders a second Viewer in previewViewerContent without that prop. On a light-preview scene, opening toolbar Preview turns post-FX back on and can reintroduce the WebGPU instability light preview was meant to avoid.
Reviewed by Cursor Bugbot for commit 003ac55. Configure here.


What does this PR do?
Improves the standalone
apps/editorlocal/MCP preview experience:/editor/:idto/scene/:idso MCPeditorUrllinks open saved scenes instead of 404.?disable=postFx,outline(existing viewer flags) and forces solid shading when that path is active; scene page exposes a Light preview control.No viewer package API changes; uses existing post-processing
disablequery flags.How to test
bun run --cwd apps/editor dev(or project equivalent) on port 3002 with a local scene store./editor/<existing-scene-id>— expect redirect to/scene/<id>and the scene loads./scenes— each card links with light-preview query; canvas should stay responsive (post-FX off)./still shows blank editor with link to saved scenes.Screenshots / screen recording
N/A for core logic (routing + existing viewer flags). Optional: short clip of
/editor/idredirect if desired.Checklist
mainbranchNote
Low Risk
Scoped to standalone editor routing, preview UX, and an optional Editor prop defaulting to false; no auth or persistence logic changes.
Overview
Adds a light preview path for local WebGPU stability and fixes MCP link routing for the standalone
apps/editorapp.Routing:
next.configredirects/editor/:id→/scene/:idso MCPeditorUrlbookmarks open saved scenes instead of 404.Light preview: Scene list links include
?disable=postFx,outline. On the scene page, URL query (orsafe=1) drivesdisablePostFxonEditor, solid vs rendered shading via the viewer store, plus a Light preview toolbar button that can re-apply settings or navigate withLIGHT_PREVIEW_QUERY.Editor package: New optional
disablePostFxonEditor/ViewerCanvas, forwarded toViewer(same effect as?disable=postFx).Copy/UI: Home banner clarifies blank canvas vs saved scenes under Scenes; banner layout wraps on small viewports.
Reviewed by Cursor Bugbot for commit 003ac55. Bugbot is set up for automated code reviews on this repo. Configure here.