cmux NEXT: host real SwiftUI preview leaf

Merged
TE
13d ago
+687-132

The native UI-layer host previously rendered a local copy of its chrome, so edits to real cmux NEXT SwiftUI modules could not appear in the host. This adds a Debug-only CmuxNextUiLayerPreview leaf product, reuses production CmuxNextDesign and CmuxNextIcons views, and maps the existing read-only projection into that surface. The checked-in vnode watcher follows the host and imported leaf-module roots, then terminates and restarts only the small host after a save; it never injects code into a running cmux app.

Before/after from the same fleet package harness:

  • Before: 0 real CmuxNext SwiftUI modules linked by UiLayerHost; host view was copied chrome.
  • After: 1 real preview leaf product linked (CmuxNextUiLayerPreview), with 3 production SwiftUI primitives (HairlineDivider, Icon, CmuxDialogActionButton) in the rendered path.
  • Fleet compile: cmux-ci compile-check job 407fe2a93c491f3282666f42 passed CmuxNext at exact head aa4d74934c4 in 86 s (controller-selected worker; no worker was pinned).
  • Warm capture slot on cmux-mac-mini-cua-5 at the host-seam predecessor: a one-line comment save in CmuxNextUiLayerPreview/UiLayerPreviewView.swift reached the first rendered frame in 1.653 s (ui-layer.reload to ui-layer.frame); a warm no-op swift build completed in 6.03 s. The host's read-only debug.window_record wrote 59 frames plus frames.json at 60 Hz without Screen Recording permission. The final socket-isolation/async-IO fix preserves this rendering path.

UiLayerHost real leaf preview recording

Full quality:

No capture: UiLayerHost is a standalone Debug SwiftPM executable; the packaged-app cmux-ci capture tour cannot launch this host, so the host-side recording above uses its own read-only debug.window_record socket.

Setup: docs/cmux-next/native-ui-host.md. Use CMUX_UI_LAYER_TRACE=1 to record ui-layer.reload and the first completed AppKit display pass (ui-layer.frame rendered_at_ns=...) in one stream. The preview product is off by default, excluded from CmuxNextApp and release app targets, and uses only read-only sample data or read-only attach methods.

agent-identity footer
Agent session: Air-Blue