The object menu lived only on the hierarchy rows. Now a right-click in
the scene view opens the same menu for the object under the cursor.
- The menu moves out of HierarchyPanel into src/editor/objectMenu.ts.
Hierarchy and scene view call the same function, so their entries
cannot drift apart. Only the hierarchy adds "Expand all" and
"Collapse all".
- Which object the menu is for follows the press rule from #203. A
selected object under the cursor, even a hidden one, keeps the
selection and the menu acts on all of it. Otherwise the topmost
object is selected first.
- The rule is the pure function menuTargetOf in src/viewport/pick.ts,
next to pressOn.
- Empty space, including an empty tilemap cell, opens no menu.
- The container tab gets the same, because ContainerCanvas extends the
scene view.
Tests:
- ./check.sh: 142 files, 2094 tests, exit 0 (was 2090)
- e2e 39,40 fresh: ALL PASSED, 80 checks
- e2e 1-16,39,40 fresh: ALL PASSED, 565 checks
- New block 40r (3 checks): menu on a hidden selected crate, topmost
object without a selection, no menu on an empty cell.
- Counter-check: a right-click that always takes the topmost object
fails 2 unit tests and the hidden-crate e2e check.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>