Repository navigation
[Maintainer] Editor layout: menu names, side column (from #1258 by @philpitus) - #1279
Conversation
The v2 rail is icons only, with each name in a hover tooltip, and plugin tools sit apart from the rest under a divider. Show names by default and list every tool together. A small icon at the bottom closes the rail back to icons for more room, and the choice is remembered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The v2 layout put every surface in one sidebar: opening Build, Paint or Items replaced the host's chat, and the rail could close to icons only. It now has three columns on a desktop: - A side menu that always shows each tool's name, grouped under the headings the host gives (`SidebarTab.section`); plugin panels list under Plugins, with the plugin directory as "Add plugin" at the end. A host footer (`sideMenuFooter`) is pinned under the entries. The icon-only toggle is gone. - A column for one host tab (`columnTabId`, e.g. the chat), resizable and always on screen. Showing that tab leaves the tool panel as it is. - The work area: the view tabs over the stage, with the picked tool's panel docked over the stage's left edge. The panel has a title and a close button, and Escape closes it once there is no tool in hand or selection to cancel. The level selector and hints move beside it, a host view in the first pane starts after it, and the tool menu stays centred on the pane under its foot. On a phone the layout is unchanged: the column tab is one more sheet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The camera started at a fixed pose 20 m from the origin, so a large project (a scanned house about 28 m across) opened with the eye on its roof. Once the scene reports ready, the camera now fits the bounds of the project's buildings and scans at the opening angle, and follows them for a few seconds while scans and models finish streaming in. A view saved on the site or a building is used instead, and nothing moves once a pose has been applied (a followed collaborator, a preview's return) or the person has moved the camera. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…el is docked Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hide With the chat column always on screen, a tool panel docked over the stage left the 3D view well under half the window. A tool's panel now takes the chat's place in that column; closing it (or picking the chat in the menu, where it is now listed) brings the chat back. The chat stays mounted while hidden, so a running turn keeps streaming. The side menu has a Hide menu button; a Menu button ahead of the view tabs brings it back, and the choice is remembered. The stage offsets that existed only for the floating panel are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The layout and the menu read the shown panel from the same tab list, so they no longer pull it two ways. A project opens on the column's tab (the chat), with the tools one click away, and the Menu button that brings a hidden menu back leads the view bar row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ost's footer right after the entries Co-Authored-By: Claude Opus 5.5 <[email protected]>
…set with the menu hidden The opening frame reset only once per mount, so a second project never framed. The side menu's shortcuts, Paint follow and build-tool reset lived in the menu, so hiding it stopped them, and going back to the chat left a build tool in hand. They now run whether the menu shows or not, and any return to no tool panel puts the build tool down. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mands; a lone column tab still shows The load's fit-scene framed node bounds, without scans, and could override the opening frame, whose follow then pulled the camera back. During the opening, a fit now runs through the opening frame (a saved view stays the opening), and focus, view, frame, top view, orbit or capture end the follow. A host passing only the column's tab now gets its column. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…them never reframes Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ad, across preview Preview swaps the layout and camera controls out, so state kept in them reset on return: the opening frame ran again and moved the camera, and the layout put the chat back over an open tool. The opening's end now lives in the editor store (cleared by each load), and the editor opens on the column's tab once per load, after the saved layout is restored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pen on the chat as loading starts Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # packages/editor/src/components/editor/editor-layout-v2.tsx # packages/editor/src/components/editor/index.tsx # packages/editor/src/components/ui/sidebar/tab-bar.tsx
…e site's saved view opens first Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # packages/editor/src/components/editor/index.tsx
Generated by bun run i18n:extract: the side menu and Plugins panel drafts get their Source-Hash and stay fuzzy with Review: required.
The chat and an open tool panel share one column, so ignoring a request for the chat while a tool was open left the chat hidden. showSidebarPanel and openSidebarPanel now pick it, which closes the tool in its place; they still never reopen a closed tool panel for it.
… lets go of focus Closing the tool panel (or picking the chat) only put a build tool down, so Paint's brush or the site editor stayed armed with their panel gone. Any mode but select now returns to select. The chat column stayed CSS-hidden behind an open tool with focus possibly still in its composer, so typing went nowhere visible and Escape never closed the tool panel. The hidden column is now inert and drops focus as it hides.
…desktop Beside the new 176px side menu, a persisted 600px chat or a 520px tool panel left the stage a sliver just above the phone breakpoint. Both columns now take at most 40% of the window, while resizing and on screen.
The fold matched any rail panel whose heading read "Plugins", so a host panel under a heading with the same text vanished into the Plugins list. It now also needs a pluginId.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd6658eda0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ): { position: [number, number, number]; target: [number, number, number] } | null { | ||
| const position = node.camera?.position | ||
| const target = node.camera?.target | ||
| if (!(position && target) || position.length < 3 || target.length < 3) return null | ||
| const values = [...position.slice(0, 3), ...target.slice(0, 3)] | ||
| if (!values.every((v) => typeof v === 'number' && Number.isFinite(v))) return null | ||
| return { | ||
| position: [position[0], position[1], position[2]] as [number, number, number], | ||
| target: [target[0], target[1], target[2]] as [number, number, number], |
There was a problem hiding this comment.
Restore the saved camera projection and lens
When a site or building has a saved camera with mode: 'orthographic', a custom perspective fov, or an orthographic zoom, opening the project restores only its position and target, leaving the viewer's current projection and lens unchanged. This makes the saved opening view appear substantially different, especially after switching from a project using the other camera mode; preserve the complete node.camera settings or route the saved camera through the existing pose-application path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Leaving this as is in this PR. The opening applies a saved view the way the editor already does when you view a node's saved camera (handleNodeView sets position and target only, in the current projection). Switching projection or lens on open would be a separate behavior change, and it should apply to both paths together.
| if (node.type !== 'building' && node.type !== 'scan') continue | ||
| const object = sceneRegistry.nodes.get(node.id) | ||
| if (object) bounds.expandByObject(object) |
There was a problem hiding this comment.
Exclude hidden objects from opening bounds
For projects containing a hidden building or hidden descendants, Box3.expandByObject still traverses their mounted geometry without honoring Object3D.visible, so the opening frame can zoom out to include content that is not drawn. This contradicts the helper's “as drawn” behavior and is especially noticeable when an invisible building is far from the visible model; calculate bounds only from visible objects and visible ancestry.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 0afe3b9: the opening bounds now come only from visible objects. They mirror Box3.expandByObject per object, skip anything with visible === false, and skip everything under it.
Box3.expandByObject walks invisible objects too, so a hidden building or hidden parts widened the opening frame to content that is not drawn. The bounds now come from visible objects only.
The open-on-column effect skipped phones without recording the project, so widening past the desktop breakpoint later forced the column tab and put the tool in use down.
The level follow moved the camera without ending the opening, so a later re-check could pull the camera back after the person chose a floor, level mode or camera.
Fresh controls alone (drei swapping the camera) also took the level follow path and ended the opening, leaving the load fit to frame hidden objects. They now re-apply the opening frame instead; a level or level mode change still ends it.
With first person or preview already on when the scene became ready, the opening never settled, so leaving that mode later started the follow and pulled the camera away.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 25493f4. Configure here.
| // generator's synchronous stacked→restore levelMode round-trip. | ||
| if (Math.abs(currentTarget.y - targetY) < 1e-3) return | ||
| // Like any other camera command: the opening follow must not pull it back afterwards. | ||
| if (floorPicked && openingFrame.current === 'framing') settleOpening() |
There was a problem hiding this comment.
Floor pick may not end opening follow
Medium Severity
A floor or level-mode change while the project is still opening only calls settleOpening after the orbit pivot actually moves in Y. When the new presentation keeps the same height, the 1.5s and 4s opening re-checks keep running and can pull the camera back, which is the follow this change was meant to stop.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 25493f4. Configure here.
There was a problem hiding this comment.
Leaving this as is. The opening yields to anything that moves the camera. A floor or level-mode pick that leaves the pivot at the same height doesn't move it, so there is no view of the person's for the re-checks to undo. The re-checks only refit when the drawn bounds grow (scans still streaming in), which is the follow's purpose.
| tabs: sidebarTabs, | ||
| enabled: showSideColumns, | ||
| toolOpen: openTool !== undefined, | ||
| }) |
There was a problem hiding this comment.
Widen from phone can drop the tool
Medium Severity
Crossing the desktop breakpoint with a persisted collapsed tool column treats the session as having no open tool, so useSideMenuBehavior switches any non-select mode back to select. A project that was opened on a phone can lose Paint, Build, or another armed tool even though the opening-on-chat path now leaves the tab alone.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 25493f4. Configure here.
There was a problem hiding this comment.
Leaving this as is. It needs the window to cross the phone breakpoint mid-session with a tool armed (a rotated tablet or a resized window). Even then, the desktop layout is consistent with its rule that no open tool panel means no armed tool, and nothing is lost: one click on the menu entry re-arms the tool.
Aymericr
left a comment
There was a problem hiding this comment.
[Tooling] LGTM at 25493f4.
CI is green. Bugbot's two open findings at this head are both Medium, not High: "Floor pick may not end opening follow" (custom-camera-controls.tsx:771) and "Widen from phone can drop the tool" (editor-layout-v2.tsx:546). Both have reasoned leave-as-is replies that I agree with. A same-height pick doesn't move the camera, so there's no view to undo, and re-arming after a breakpoint cross takes one click. Codex's open P2 (the saved projection and lens) matches how handleNodeView already behaves and is fine as a follow-up. Every other Bugbot and Codex finding is fixed in later commits. No blockers.


What does this PR do?
Brings @philpitus's editor layout work from #1258 into an in-repo branch so CI runs without the fork approval step. Phil's 16 commits are merged unchanged with his authorship. All credit for the layout goes to him; see #1258 for the full design discussion.
From #1258 (v2 desktop layout):
sideMenuFooter) and a Hide menu / Menu toggle.columnTabId, e.g. a chat) shows beside the menu, an opened tool panel takes its place, and closing the tool (X or Escape) brings the tab back. The editor opens on that tab once per project.pluginsMenuSectionpicks its heading) opens a panel listing the project's plugins plus Browse plugins. On a phone, plugins also leave the tab bar.On top of Phil's work, this branch:
editor/index.tsxby keeping main's@pascal-app/viewerimports and addingPLUGINS_MANAGER_PANEL_ID.bun run i18n:extract. The new es/fr/ja/zh-CN drafts get theirSource-Hashand stayfuzzywithReview: required. Catalogs are back in sync.buildmode was reset, so Paint's brush or the site editor stayed armed with its panel gone. Any mode other than select now returns to select.inertwhile a tool takes its place, and it drops focus as it hides. Before, typing could go into the hidden composer and Escape never closed the tool panel.showSidebarPanel/openSidebarPanelwith the column's tab bring the chat back. Previously they did nothing while a tool panel was open, and the chat stayed hidden behind it. That behavior dated from before the chat and tool shared a column. They still never reopen a closed tool panel.pluginIdnow, so a host panel whose heading happens to read "Plugins" keeps its own entry.Box3.expandByObjectalso walks invisible objects, so a hidden building used to widen the frame.How to test
columnTabId(the standalone app doesn't; to try it locally, add a tab and passcolumnTabId), the chat shows beside the menu. Pick Build: its panel replaces the chat. Press Escape or click X: the chat comes back.Ran locally:
bun run check,bun run check-types,bun run test,bun run i18n:check,bun run skills:validate.Screenshots / screen recording
These were taken with a temporary placeholder chat tab passed as
columnTabIdto the standalone app (not committed), so the column is visible.Chat column beside the named side menu:
Chat column
A tool panel in the chat's place:
Tool column
The Plugins panel:
Plugins panel
Menu hidden, with the Menu button ahead of the view tabs:
Menu hidden
A narrow desktop window:
Narrow window
Checklist
bun devbun checkto verify)mainbranchOriginal PR: #1258 by @philpitus.
To show artifacts inline, enable in settings.
Note
Medium Risk
Large UX/layout refactor plus camera auto-framing on load; regressions could affect navigation, focus, plugin discovery, and first-open camera behavior.
Reviewed by Cursor Bugbot for commit 25493f4. Bugbot is set up for automated code reviews on this repo. Configure here.