Skip to content

fix(xr): opaque, depth-tested panels so content behind never reads through - #68

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

aMonteSl merged 2 commits into
v1.2.1from
claude/project-thread-kvvyg6-panels

Conversation

@aMonteSl

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Summary

Fixes the bug in the maintainer's screenshot: opening a directory's info card in front of a virtual screen or the guide mixed the text of both panels. Story S1 of the XR review epic; audit findings PANELS-1, 2, 4 and 6 (docs/xr-audit/panels.md, PR #67).

Cause. The info card drew every surface with depthTest: false, and A-Frame 1.7.1 draws transparent objects in DOM order rather than by distance (sortTransparentObjects: false). Virtual screens and the guide are appended to the end of the scene, so they were drawn after the card and painted over it; only the card's own glyphs wrote depth, which is why the texts interleaved.

Changes

  • Shared tooltip card (codexrCommonRuntime.js): no depthTest: false on any surface; the background is opaque and carries babiaxraycasterclass, so a click on the card no longer falls through to the screen's Share button behind it (opt out with raycastClass: '').
  • Opaque backings for the dependency-graph path chip, the virtual-screen frame, the "Virtual screens" list, the guide, the controller panel, the comparison card and the evolution overlay.
  • The virtual-screen status line now wraps inside the frame (frame width − 0.3) instead of overhanging it by 1.4 m.
  • CHANGELOG [1.2.1] → Fixed entry (behaviour change, as agreed for this epic).

Test plan

  • npm test (typecheck, lint, compile-tests, unit): 1068/1068.
  • New test/analysis/xrPanelLayering.test.cjs: forbids depthTest: false in every shipped runtime and pins the opaque backings; new tooltip test in codexrCommonRuntime.test.cjs (materials + raycast class).
  • Screen-chrome characterization in virtualScreenRuntime.test.cjs re-recorded; I diffed the old and new transcripts and the only changes are the frame material and the status width.
  • test:xr-harness, test:xr-mode-harness, test:project-evolution-harness, test:xr-immersive-harness green.
  • Headless Chromium with real A-Frame 1.7.1, same layout as the screenshot: the card now hides the screen behind it, and a raycast through the card's centre hits the card first (before: the Share button).
  • Maintainer: open a dependency-graph analysis, pin a directory card in front of the default screen and the guide, in the browser and in a headset.

Generated by Claude Code

…rough

Info cards drew every surface with depthTest:false, and A-Frame 1.7.1 draws
transparent objects in DOM order rather than by distance, so virtual screens
and the guide (appended later) painted over a card in front of them and the
two texts interleaved (audit PANELS-1). Panel backings were also 3-34%
transparent (PANELS-2), clicks passed through cards to the Share button
behind them (PANELS-4), and the idle status line was 1.4 m wider than its
screen (PANELS-6).

- common tooltip: no depthTest:false; opaque background that carries the
  raycaster class (opt-out with raycastClass: '').
- dependency-graph path chip, virtual-screen frame, screen manager list,
  guide, mapping panel, comparison card and evolution overlay: opaque.
- virtual-screen status width = frame width - 0.3.
- tests: tooltip material/raycast assertions, a scan that forbids
  depthTest:false in every runtime and pins the opaque backings; the screen
  chrome characterization re-recorded (only the frame material and status
  width differ).

Verified headless with real A-Frame: the card now hides the screen behind
it and the ray's first hit is the card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
@aMonteSl aMonteSl self-assigned this Nov 25, 2026
…(Windows CI)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FkKtAtQus8TVjhG9bhytC
@aMonteSl
aMonteSl merged commit f017b8d 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants