Viewer: no selection outlines while walking, project name in preview, show-only scene theme - #983
Conversation
…t name in editor preview The default SelectionManager kept routing hover/click through building/level/zone while walking (pointer lock keeps raycasting from the frozen cursor), outlining whole levels on live scenes. GlbScene already gates on walkthroughMode; mirror it. Editor preview mounted ViewerOverlay without a project name, so the header fell back to 'Untitled'. Add an Editor projectName prop and pass it through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m
sceneTheme stays the one value every renderer reads; savedSceneTheme is the user's pick and the only one persisted. showSceneTheme(id) lets a host open a page in its own mood (a contest entry at night) and showSceneTheme(null) returns to the saved theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: a8e120df-764a-4479-ba84-e147504d909e |
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 55f66e1. Configure here.
| } | ||
|
|
||
| const onLeave = (event: NodeEvent) => { | ||
| if (useViewer.getState().walkthroughMode) return |
There was a problem hiding this comment.
Walkthrough leaves leftover hover outlines
Medium Severity
Walkthrough gating ignores enter and leave but never clears an existing hoveredId. OutlinerSync still outlines that id, so a building, level, or zone hovered before Walk can stay outlined for the whole walkthrough unless an interactable overwrites it.
Reviewed by Cursor Bugbot for commit 55f66e1. Configure here.


What does this PR do?
Three small viewer fixes/additions:
SelectionManagerkept routing hover and click through building → level → zone while walking. Pointer lock keeps raycasting from the frozen cursor, so whole levels and zones got outlined.SelectionManagernow ignores node enter/leave/click and pointer-missed whilewalkthroughModeis on, mirroring whatGlbScenealready does for baked scenes. Door and interactable highlights still work, becauseFirstPersonControlssetshoveredIditself.PreviewStagemountedViewerOverlaywithout a name, so the header showed "Untitled".Editorgets aprojectNameprop that is passed through.showSceneTheme(id | null)on the viewer store.sceneThemestays the one value every renderer reads. A newsavedSceneThemeis the user's pick and the only one persisted. Hosts can open a page in its own theme without overwriting the visitor's saved preference. Community uses this for Halloween contest entries (night).How to test
bun test packages/viewer/src/store/use-viewer.test.ts: a shown theme renders without replacing the saved one, and picking a theme while one is shown saves the pick.Screenshots / screen recording
Preview header verified locally (shows the project name). I could not drive the walkthrough check under pointer lock from automation, so it still needs a manual pass.
Checklist
bun devbun checkto verify)mainbranch🤖 Generated with Claude Code
https://claude.ai/code/session_01VMczFMfWJtZDbBdTARy88m
Note
Low Risk
Localized UX and preference-layer changes; walkthrough gating mirrors existing baked-scene behavior and theme persistence is covered by new unit tests.
Overview
Three viewer/editor tweaks: walkthrough no longer drives building/level/zone selection outlines, editor preview shows the host project name, and scene themes can be shown temporarily without overwriting saved preferences.
During
walkthroughMode,SelectionManagerskips hover, click, and empty-canvas deselect routing so pointer-locked raycasts do not outline whole levels/zones; first-person interactable highlights are unchanged.Editoraccepts optionalprojectNameand passes it throughPreviewStagetoViewerOverlayso preview is not stuck on “Untitled”.The viewer store adds
savedSceneTheme(persisted user pick) andshowSceneTheme(id | null)to render a temporary theme and restore the saved one when cleared;setSceneThemeupdates both. Persistence now writessavedSceneThemeonly, with merge logic to hydrate it from legacysceneTheme.Reviewed by Cursor Bugbot for commit 55f66e1. Bugbot is set up for automated code reviews on this repo. Configure here.