#000.#446
Conversation
… files Summary Fixed an issue where floors became impossible to drag or delete after importing JSON configuration files created in versions prior to 0.9.1. Root Cause The migration process was executing elevator parent migration before all level nodes had their children fully normalized. As a result, imported scenes could end up with inconsistent parent-child relationships, causing floor management operations such as dragging and deletion to fail. Changes Made Refactored migrateNodes() into a two-pass migration process. Added normalization for level nodes: Ensures level values are valid finite numbers. Removes references to missing child nodes. Preserves only valid children during migration. Moved elevator migration logic to a dedicated second pass: Elevator parent migration now runs only after all level.children relationships have been stabilized. Prevents invalid hierarchy reconstruction when importing legacy JSON files. Result Imported layouts from versions prior to 0.9.1 now correctly preserve floor hierarchy, allowing floors to be dragged, reordered, and deleted as expected.
O default π/2 significa que CCW 90° a partir de +X aponta para +Z — portanto +Z é Norte. Isso é o inverso do que o two-bedroom.ts declarava ("positive z points south"). A limpeza do template abaixo corrige esse comentário para refletir a nova convenção canônica.
Updated coordinate system description for clarity.
This file implements a Zustand store for managing the north bearing state, allowing external React components to access the current bearing without using the Zustand viewer store.
| * Default (π/2) means world +Z points north, world +X points east — | ||
| * consistent with the two-bedroom template and standard north-up site plans. | ||
| */ | ||
| northDirection: z.number().default(NORTH_DIRECTION_DEFAULT), |
There was a problem hiding this comment.
Default northDirection contradicts −Z north
High Severity
The northDirection property's default π/2 value has conflicting interpretations for "True North." Despite being defined as radians CCW from world +X, the documentation, templates, and surveyor conversion inconsistently describe π/2 as pointing to +Z north, +Z south, or -Z north.
Reviewed by Cursor Bugbot for commit 0c5c16b. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit af1beac. Configure here.
| return typeof dir === 'number' ? dir : NORTH_DIRECTION_DEFAULT | ||
| } | ||
| } | ||
| return NORTH_DIRECTION_DEFAULT |
There was a problem hiding this comment.
Site north from wrong node
Medium Severity
useNorthDirection returns the first site from Object.values(nodes), while other editor code resolves the canonical site via rootNodeIds[0]. If more than one site exists or iteration order differs from the root, the compass can use the wrong northDirection.
Reviewed by Cursor Bugbot for commit af1beac. Configure here.


.