Skip to content

fix(xr): one placement registry so panels never overlap (#81) - #92

Merged
aMonteSl merged 1 commit into
v1.2.1from
claude/project-thread-kvvyg6-panels
Nov 25, 2026
Merged

aMonteSl merged 1 commit into
v1.2.1from
claude/project-thread-kvvyg6-panels

Conversation

@aMonteSl

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Closes #81 (S9 of epic #72). Audit findings PANELS-3, 5, 7, 8, 9 (docs/xr-audit/panels.md).

What changes

  • Placement registry: a new virtual-screen runtime part, placementRegistry.js.
    • Obstacles are other screens, any shown entity tagged data-codexr-panel-obstacle, and #codexr-analysis-table-geometry extended upward by 2.2 m of chart headroom.
    • A panel registers by carrying the attribute. It drops out of the registry when it is hidden or removed, so a mode's panels leave with the mode.
  • Collision test: obstacles are now checked as oriented boxes with a separating-axis test. The old check sampled nine points of the screen, and two screens crossing at an angle (look-at turns them toward the user) could pass between those points.
  • + Add screen and Bring go to the nearest free spot: right, then left, then up, then further out in rings.
  • Follow now goes through the same bumper as drag instead of skipping collision.
  • Screens inside an obstacle: a screen that already sits inside one (for example, a panel appeared over it) can still move and turn. The bumpers no longer freeze it.
  • Added screens read the scene's screen config through readSceneConfig (the JSON script first, then the global). Their idle label shows the display name instead of the internal id.
  • Dependency graph:
    • pinned cards have a close button;
    • legendSlotPosition gained a maxRows option (set to 2), so six cards grow sideways instead of climbing through the ceiling;
    • the legend board and the evolution playback overlay register as obstacles.

Verification

  • npm test: 1,138 of 1,138 pass. ESLint warnings stay at 154 (budget 154).

  • New tests:

    • the manager's init config is read from the scene's JSON script and the idle label uses the display name (behavioural);
    • maxRows keeps 1 to 7 cards within two rows with no overlaps (behavioural);
    • source pins for the registry, the follow bumper and the close button.
  • Harnesses pass: test:xr-mode-harness, test:project-evolution-harness, test:xr-harness.

  • Real A-Frame 1.7.1 page in Chromium (scratch page, not committed):

    Case Before After
    Two added screens both at (0, 2.30, -10.20) (0, 2.40, -10.40) and (5.05, 2.40, -10.40)
    Table in front of the user not checked the screen goes above the chart volume (y 5.35)
    Following screen moved toward another screen not checked stops at it

Needs a manual check

  • Text sizes for VR legibility (needs a headset).
  • How the close button and the 3-card rows look in the dependency graph.
  • The evolution overlay keeps its fixed position. It is now an obstacle but is not moved.

Generated by Claude Code

- New virtual-screen runtime part placementRegistry.js: obstacles are other
  screens, any shown entity tagged data-codexr-panel-obstacle, and the
  analysis table plus 2.2 m of chart headroom; compared as oriented boxes
  with the separating-axis test instead of nine sampled points.
- + Add screen and Bring land on the nearest free spot (right, left, up);
  follow goes through the same bumper as drag; a screen already inside an
  obstacle is never frozen.
- Added screens read the scene's screen config (JSON script) and show
  their display name in the idle label.
- Dependency graph: pinned cards get a close button and the stack is capped
  at two rows (legendSlotPosition maxRows); the legend board and the
  project evolution overlay register as obstacles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
@aMonteSl aMonteSl added tfm Adds the issue to the TFM board automatically. Do not remove area: xr-scene Browser runtimes of the XR scenes and LivePanel (A-Frame/BabiaXR, templates/components) area: testing Test suites, harnesses, verification and inventories stream: xr-bugfix-1.2.1 Epic #72: review and fix the XR environment, shipped in 1.2.1 labels Nov 25, 2026 — with Claude
@aMonteSl aMonteSl self-assigned this Nov 25, 2026
@aMonteSl
aMonteSl merged commit ceae065 into v1.2.1 Nov 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: testing Test suites, harnesses, verification and inventories area: xr-scene Browser runtimes of the XR scenes and LivePanel (A-Frame/BabiaXR, templates/components) stream: xr-bugfix-1.2.1 Epic #72: review and fix the XR environment, shipped in 1.2.1 tfm Adds the issue to the TFM board automatically. Do not remove

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants