Skip to content

Adopt retained HTML API with sharp rendering defaults - #83

Merged
petekp merged 5 commits into
pkp/surface-api-refactorfrom
codex/api-hardening
Sep 7, 2026
Merged

Adopt retained HTML API with sharp rendering defaults#83
petekp merged 5 commits into
pkp/surface-api-refactorfrom
codex/api-hardening

Conversation

@petekp

@petekp petekp commented Sep 6, 2026

Copy link
Copy Markdown
Owner

React components now keep their original HTML, state, focus and selection when moving between the page and a Three.js scene. Stationary text retains native display clarity.

Stacked on #32 (pkp/surface-api-refactor). Replaces that branch's public API and migrates the lab and Home/postcard consumers.

<Surface inScene={selected}>
  <Card />
</Surface>

Explicit Root/HTML/Scene/Mesh composition, SceneSurface, and element capture cover custom scenes and shaders. Named canvases are selected with canvasId, matching SurfaceCanvas id.

The review follow-up fixes keyed lists, shared capture readers, resizing anchors, preparation clipping, attribute validation, observer scheduling and Logo easing. The reported focus-loss sequence passes a permanent regression test.

Local verification Result
Tests 1,528 passed across 117 files
Four typechecks, lint, package and lab builds Passed
Rename verification Six Chrome routing cases, four capability/fallback cases, and a live starter round trip passed
Postcard at rest, native DPR 2 Zero native/mesh pixel difference
Six postcard cycles 9.4 ms maximum unrecorded frame gap; 18.6 ms limit
Companion pixels Zero boundary error; 0.000139 maximum spike; 0.5 limit
Scroll and form input 0.025 CSS px drift; original field retained at desktop/mobile widths
Placement, Knobs, Flight, Genie and Logo reruns Passed

Review retained-node lifetime, pixel ownership and render-pass ordering. The aggregate postcard runner intermittently fails during recorder/Chrome teardown; individual probes pass. Evidence and dispositions record the verification limits and React Doctor warnings.

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