Skip to content

docs: Architecture, QuickStart, ADRs; correct stale dual-path docs#3

Merged
dfattal merged 1 commit into
mainfrom
docs/architecture-quickstart-adr
Apr 21, 2026
Merged

docs: Architecture, QuickStart, ADRs; correct stale dual-path docs#3
dfattal merged 1 commit into
mainfrom
docs/architecture-quickstart-adr

Conversation

@dfattal
Copy link
Copy Markdown
Contributor

@dfattal dfattal commented Apr 21, 2026

Summary

Tackles the four doc items flagged in the "adequacy for devs/agents" review:

  1. Architecture.md (new) — one-page class hierarchy, per-frame data flow, module map. Anchor for agents needing a mental model before touching session/device/compositor code.
  2. QuickStart.md (new) — install runtime → install plugin → press Play in ~10 min.
  3. ADR-001/002/003 (new) — decision records for direct runtime loading, zero-copy atlas handoff, and UE-native off-axis projection. Stops agents from re-proposing the rejected alternatives.
  4. Verified `DISPLAYXR_USE_UNREAL_OPENXR` — it was a phantom flag. Only referenced in docs, never defined in source or `Build.cs`. Platform selection is `#if PLATFORM_WINDOWS / PLATFORM_MAC / PLATFORM_LINUX` inside `FDisplayXRSession` and `FDisplayXRCompositor`. Corrected every stale reference.

Corrected stale docs

Several docs described a dual-path architecture (`IOpenXRExtensionPlugin` on Win/Android vs `FDisplayXRDirectSession` on Mac, toggled by `DISPLAYXR_USE_UNREAL_OPENXR`) that never existed in code. The actual architecture is one unified `FDisplayXRSession` that loads the DisplayXR OpenXR runtime directly on every platform. Fixes:

  • `CLAUDE.md` — "Dual-Path OpenXR Integration" section → unified session
  • `README.md` — drop "two code paths at compile time" line
  • `Docs/DisplayXR/README.md` — drop Platform Architecture dual-path table, restructure into sections
  • `Docs/DisplayXR/MacSetup.md` — rewrite; removes references to `FDisplayXRDirectSession`, `FDisplayXRSceneViewExtension`, and the phantom flag. Now focuses on actual Mac quirks (active-runtime manifest, no UE OpenXR plugin on Mac)
  • `Docs/DisplayXR/TODO.md` — drop `DISPLAYXR_USE_UNREAL_OPENXR=0` from the macOS validation bullet

Files

Added

  • `Docs/DisplayXR/Architecture.md`
  • `Docs/DisplayXR/QuickStart.md`
  • `Docs/DisplayXR/adr/README.md`
  • `Docs/DisplayXR/adr/ADR-001-direct-runtime-loading.md`
  • `Docs/DisplayXR/adr/ADR-002-zero-copy-atlas-handoff.md`
  • `Docs/DisplayXR/adr/ADR-003-ue-native-off-axis-projection.md`

Modified

  • `CLAUDE.md`
  • `README.md`
  • `Docs/DisplayXR/README.md`
  • `Docs/DisplayXR/MacSetup.md`
  • `Docs/DisplayXR/TODO.md`

Test plan

  • `lint.yml` passes all three checks
  • Manual: all internal links resolve
  • Manual: Architecture.md accurately describes the actual code (see verification note below)

Verification note on the phantom flag

```
$ grep -rniI --exclude-dir=.git "DISPLAYXR_USE_UNREAL_OPENXR" .

Only matches are in docs (now corrected); zero matches in Source/

```

`FDisplayXRSession.h` comment explicitly states: "Replaces both FDisplayXRExtensionPlugin (Windows/Android OpenXR hook path) and FDisplayXRDirectSession (Mac direct path) with a single unified session." That comment is the ground truth; the stale docs missed the memo.

- Add Docs/DisplayXR/Architecture.md (class hierarchy, ownership,
  per-frame data flow, module map)
- Add Docs/DisplayXR/QuickStart.md (install runtime → install plugin →
  press Play in ~10 min)
- Add Docs/DisplayXR/adr/ with three ADRs:
    * ADR-001 Direct OpenXR runtime loading (no UE OpenXR plugin)
    * ADR-002 Zero-copy atlas handoff via single D3D12 device
    * ADR-003 UE-native off-axis projection over Kooima projection_matrix

Correct stale docs that described a dual-path architecture that never
existed in code:

- CLAUDE.md: "Dual-Path OpenXR Integration" → unified session
- README.md (top-level): drop "two code paths at compile time"
- Docs/DisplayXR/README.md: drop Platform Architecture dual-path table
- Docs/DisplayXR/MacSetup.md: rewrite — no FDisplayXRDirectSession,
  no FDisplayXRSceneViewExtension, no DISPLAYXR_USE_UNREAL_OPENXR;
  explains Mac-specific quirks (active runtime manifest, no UE
  OpenXR plugin on Mac) instead of inventing a separate architecture
- Docs/DisplayXR/TODO.md: drop DISPLAYXR_USE_UNREAL_OPENXR reference
  from the macOS validation bullet

Verified DISPLAYXR_USE_UNREAL_OPENXR appears nowhere in source code
or Build.cs — it was a phantom flag only referenced in docs. Platform
selection is #if PLATFORM_WINDOWS / PLATFORM_MAC / PLATFORM_LINUX
inside FDisplayXRSession and FDisplayXRCompositor.
@dfattal dfattal merged commit 54652ba into main Apr 21, 2026
1 check passed
@dfattal dfattal deleted the docs/architecture-quickstart-adr branch April 21, 2026 03:22
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.

1 participant