Skip to content

[Maintainer] Editor layout: menu names, side column (from #1258 by @philpitus) - #1279

Merged
Aymericr merged 27 commits into
mainfrom
cursor/editor-layout-from-1258-acc6
Nov 12, 2026
Merged

Aymericr merged 27 commits into
mainfrom
cursor/editor-layout-from-1258-acc6

Conversation

@Aymericr

@Aymericr Aymericr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

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):

  • The side menu shows every tool by name, grouped under section headings, with a host footer (sideMenuFooter) and a Hide menu / Menu toggle.
  • One side column: the host's column tab (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.
  • A single Plugins entry (pluginsMenuSection picks its heading) opens a panel listing the project's plugins plus Browse plugins. On a phone, plugins also leave the tab bar.
  • Opening a project frames what it holds (buildings and scans), or the site's saved view, then yields to any camera move or command.

On top of Phil's work, this branch:

  • Resolves the merge conflict in editor/index.tsx by keeping main's @pascal-app/viewer imports and adding PLUGINS_MANAGER_PANEL_ID.
  • i18n: ran bun run i18n:extract. The new es/fr/ja/zh-CN drafts get their Source-Hash and stay fuzzy with Review: required. Catalogs are back in sync.
  • Bugbot fix: closing the tool column disarms any tool. Previously only build mode 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.
  • Bugbot fix: the hidden chat column releases focus. It is now inert while 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 / openSidebarPanel with 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.
  • Narrow desktops: the chat and tool columns are capped at 40% of the window. Next to the new 176px menu, a persisted 600px chat used to leave the stage a sliver just above the phone breakpoint.
  • Only real plugin panels fold under Plugins. Folding also requires a pluginId now, so a host panel whose heading happens to read "Plugins" keeps its own entry.
  • The opening frame leaves hidden objects out. Box3.expandByObject also walks invisible objects, so a hidden building used to widen the frame.
  • Phone to desktop: a project opened on a phone keeps its tab and tool when the window later widens past the desktop breakpoint. Before, it was forced onto the column tab.
  • Picking a floor while a project opens ends the opening frame. Before, the 1.5s and 4s re-checks could pull the camera back after a level or level-mode change. If drei rebuilds the camera controls during the opening, the opening frame is re-applied instead.
  • Walking or previewing as a project opens settles the opening. Before, leaving first person or preview later started the follow and pulled the camera away.

How to test

  1. Open a project in the v2 layout on a desktop. The side menu lists tools by name under their headings.
  2. With a host that passes columnTabId (the standalone app doesn't; to try it locally, add a tab and pass columnTabId), the chat shows beside the menu. Pick Build: its panel replaces the chat. Press Escape or click X: the chat comes back.
  3. Type in the chat, then pick a tool, then press Escape. The tool panel closes, and the keystrokes never went into the hidden chat.
  4. Open Paint, then close the panel. The brush is put down, and a click on the 3D view selects.
  5. Click Plugins: the panel lists the project's plugins and Browse plugins. Each plugin opens its own panel in the column.
  6. Click Hide menu: a Menu button appears at the start of the view bar and brings the menu back.
  7. Narrow the window to about 900px: the stage keeps a usable width.

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 columnTabId to 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

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Original PR: #1258 by @philpitus.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

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.

philpitus and others added 22 commits November 10, 2026 19:26
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]>
…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]>
…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]>
…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]>
# 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.
@Aymericr Aymericr added the bot:maintainer label Nov 12, 2026 — with Cursor
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T21:40:18.545465Z fd6658e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +97 to +105
): { 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],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +113 to +115
if (node.type !== 'building' && node.type !== 'scan') continue
const object = sceneRegistry.nodes.get(node.id)
if (object) bounds.expandByObject(object)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

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.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

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.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ 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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 25493f4. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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,
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 25493f4. Configure here.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 Aymericr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

[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.

@Aymericr
Aymericr merged commit 99ebcf8 into main Nov 12, 2026
8 checks passed
@Aymericr
Aymericr deleted the cursor/editor-layout-from-1258-acc6 branch November 12, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants