19 Commits
Author SHA1 Message Date
shinyobjectz d81049d925 a layout read's settling and the stall guard (runtime/react settle and commits, runtime/shared stall and calls), with bench/realtime's stage and docs/layout-reads.feature 2026-11-17 19:52:34 -08:00
shinyobjectz d679fa1cc4 LR10, LR11: done. LR0 lists the gap left after LR1-LR10 (23 of 33 pass; the 10 still off are LR10's list, each with its cause); #54 is closed with the harness's before and after and the cost per read, and #13 is answered with what now matches Chrome; the skills' motion router (raea-skills #50) merges into raea-skills main when 0.1.2 is published 2026-11-12 22:06:32 -08:00
shinyobjectz 09eeb21fe9 LR10: getBoundingClientRect through a perspective is the box of the four corners as drawn, as Chrome's is. blitz-dom's transformed_bounds took each node's affine transform only, so a card turned under a perspective (its Projection) read at its flat size and place; one in a preserve-3d context maps from its context root's parent. A blitz-dom test holds Chrome's numbers for a 400x200 card under a 1000px perspective, rotateY(60deg), flat (379.05, 379.05, 206.19, 241.90) and in a world turned rotateX(10deg). transformed_rect maps any rect in a node's box, and a render manifest text's ink goes through it. snapcn 21 -> 23 of 33: card-rail 161.4 px off -> 0.6, announce-title 11504 -> 43.5, punch-lines and text-rewrite pass; P26 unchanged (185 of 215, every frame at the same SSIM) 2026-11-12 21:45:09 -08:00
shinyobjectz 869318073a LR10: a family raea/text's loadFont asked for gets Google's faces in the page even where raea bundles faces of that name, as a linked stylesheet's @font-face shadows a local font in Chrome. Inter is bundled (static 400 and 700), so it was never a missing family and Google's never came: 300, 400 and 500 drew alike ("snapcn" at 100px 345.45 px; Chrome 340.39, 345.47, 350.45) and 600 as 700. Now 340.33, 345.45, 350.48, 355.38, 360.45. snapcn 18 -> 21 of 33 (wordmark-cut, text-select, hero-launch pass; punch-lines 18.1 -> 0.9, text-rewrite 7.4 -> 0.2); P26 unchanged (185 of 215, every frame at the same SSIM). LR10 records the read cost: the first read in a frame about 0.39 ms, each further one about 0.01 ms (300 frames, median of 6), and karaoke-captions' reads under the run's noise 2026-11-12 21:21:05 -08:00
shinyobjectz 6abeb6ed43 LR10: a Google family from raea/text's loadFont is fetched when loadFont is called, and a canvas's measureText and svg text have it. The page fetched it at the first layout that named it, after a component's first effect had measured (its canvas found the fallback), and a family the page fetched first was cached without ever reaching usvg's font database, so document.fonts.load found it already known and gave the canvas nothing. Figtree's "scene" at 600 64px measured 145.72 (the fallback) against Chrome's 171.25; now 171.26. blitz-dom leaves out an app-bundled svg face of a family the page already gave (Geist fetched at import came before the bundled Geist, and both stayed; tested). snapcn 17 -> 18 of 33: bloom-lockup passes (40.8 px off before), word-gather 25.5 -> 1.2; P26 unchanged (185 of 215, every frame at the same SSIM) 2026-11-12 21:04:41 -08:00
shinyobjectz 5189132ef8 LR10: a canvas's system-ui and BlinkMacSystemFont are macOS's SF ("System Font", variable in weight and optical size), as Chrome's canvas takes them. fontdb knew neither name, so a font list headed by them (snapcn's '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif') was measured and drawn in Helvetica, about 10% wider at 72px, and 600 measured as 700. -apple-system alone stays as it is: Chrome's canvas finds no face for it either. text-build, which places its words from measureText, goes from 9 px off Chrome to 1.3; the rest is SF's trak table, which CoreText applies and usvg doesn't 2026-11-12 20:30:01 -08:00
shinyobjectz 0f9da00368 LR10: kerning across spans, hidden inline words, and a render manifest read as Chrome draws. blitz-dom gave every composition span a border edge (with border-style none a border's computed width is still medium, and inline_edges read the width alone), so each plain span got a spacer box at both ends and parley split the shaping there: a line set a letter a span lost its kerning (AVAWATAVAWAT 632 px, Chrome 578; snapcn's word-flip 5.6 px wide). sdk/ui/parity's p13-text/kerning-spans holds it. blitz-paint doesn't draw a visibility: hidden inline element's glyph runs, though they keep their place (#13: word-flip's strut drew as a fake word). A still drawn again after an all-black first draw replaces its manifest entry instead of adding one (every later frame was listed a place late), and check.sh finds frames by number. A manifest text's ink spans its glyph runs and inline-blocks, not the padding at a line's ends. snapcn 12 -> 17 of 33 (word-flip, text-reveal, text-swell, karaoke-captions, word-captions); P26 unchanged (185 of 215, the same frames at the same SSIM). The web-components guide lists innerHTML and outerHTML as missing 2026-11-12 20:30:01 -08:00
shinyobjectz 53d5f94888 LR2: every host that runs a composition answers its layout reads. Live play (preview, raea play, the app's stage, an exported game) answers from its live page, synced mid-settle as a render's is. Live play's lite runtime set no refs (a ref was null, a canvas drawn through one drew nothing): its hosts now keep bevy-react's BevyElement, BevyCanvasElement and BevyTextNode linked as React's tree is and set and clear refs, and entry_lite installs canvas2d and the DOM reads. raea world answers from the page it lays its frames out with; a baked timeline (raea play --baked) refuses a read plainly instead of baking it as 0. #54's repro played live puts "here" at x 342 (x 0 before); every layout-reads probe played live is its render's frame (SSIM 1.000), and the games replay (pong, platformer, lite against React) stays 1.000. A read costs a live frame about 1.5 ms (step p50 0.4 -> 1.9 ms, one read a frame on a 40-line page) 2026-11-12 20:30:01 -08:00
shinyobjectz a504787ad3 LR11: where the docs stand (the manual's web-components guide, raea-skills #50 held until 0.1.3 is published) and what's open (#54, #13) 2026-11-12 20:30:01 -08:00
shinyobjectz 734b172d34 LR8: done, 11-12: ResizeObserver from the page's layout, the silent observers, holds in passes that draw nothing, and the harness's Chrome that renders 2026-11-12 16:16:09 -08:00
shinyobjectz b30eb6aa88 LR7: done, 11-12: document, createElement, ranges, svg text measures and URL faces, as built and measured 2026-11-12 16:16:09 -08:00
shinyobjectz fb4572f284 LR6: done, 11-12: measureText and getImageData from the page's fonts and pixels, as built and measured 2026-11-12 16:16:09 -08:00
shinyobjectz eb8d3ad795 LR5: done, 11-12: el.style's writes and getComputedStyle's page values, as built 2026-11-12 16:16:09 -08:00
shinyobjectz b3fe2699d0 LR9: "raea" exports delayRender(label?, { timeoutInMilliseconds }), continueRender(handle) and cancelRender(error) on the frame hold <R3F> already uses: the frame isn't marked done while a hold is open, and the last release draws it, so a composition that measures after a font, a fetch or a timer has that frame taken, not the one before. A hold not continued within its timeout (30 s) fails the render naming its label; cancelRender fails it at once, as a throw does. Settle lets a held frame wait up to HOLD_SECS (120 s) instead of failing it at its 20 s stall guard, so the hold's own named failure comes first. probes/hold.tsx sets its words after a timer under a hold and matches Chrome; a never-continued hold fails in 2.6 s naming it. The manual has its page (reference/sdk/hold.md) 2026-11-12 14:45:00 -08:00
shinyobjectz 8a2f9c78ab LR4: a composition's refs have the tree a web component walks and queries: children and childNodes, the first, last and sibling nodes, parentElement, tagName, nodeName and nodeType, id, className, classList, dataset, getAttribute, textContent, contains, matches, closest, querySelector and querySelectorAll, answered in JS from bevy-react's committed instances (sdk/raea's dom-tree, installed from the entry with dom-reads). Selectors cover tag, *, #id, .class, attributes, descendant and child, comma lists, :first-child, :last-child, :only-child, :nth-child and :not; anything else throws a SyntaxError, as Chrome's does. el.id is the id attribute as on the web: the bevy-react patch renames its reconciler id to nodeId, and canvas2d, dom-reads and useEntity read that. probes/tree.tsx prints every answer and matches Chrome's words 2026-11-12 14:26:20 -08:00
shinyobjectz 2d869d719b LR3: a composition's refs have the geometry a web component reads, from the page that draws the frame: getBoundingClientRect (a DOMRect, transforms included), getClientRects, offset* and offsetParent (untransformed, whole px, from the positioned ancestor's padding edge), client* and scroll*, each as Chrome answers it. bevy-react 0.8.1 gets a patch (sdk/react/js/patches, applied by bun install) that makes its instances a tree, BevyElement and BevyTextNode with their parent, children and committed props; sdk/raea's dom-reads puts the reads on BevyElement from the entry. #54's repro now puts "here" where Chrome does (x 342, was 0), and probes/geometry.tsx prints every read and matches Chrome's words. The bundle crate's stylesheet url() rewriter moves to raea-runtime-cssurls to leave it under 2000 lines 2026-11-12 14:18:19 -08:00
shinyobjectz 7fb2194503 LR1: A composition reads its layout synchronously from the page that draws its frame (#54). Its JS asks page.layout and blocks; settle wakes on the ask as on a flush, applies the commits already sent, and the host lays its page out at the frame's time and answers every element's boxes at once, keyed by React id: raea-sys-page's snapshot (now runtime/dom's too), with offsets from blitz-dom's offset_rect and offsetParent. settle_with takes the host's answer; plain settle says the host lays no page out. Each runtime has its own ask (a render's 3D pre-pass and a bake's workers run beside it). The still, 3D and fed renders answer from their page; the sound pass and the 3D rows' pre-pass answer no boxes. sdk/raea's page-layout keeps the answer until the next commit or frame, so a composition that never reads makes no snapshot 2026-11-12 13:54:53 -08:00
shinyobjectz fc7bfa3a0c LR0: bench/layout-reads, compositions that measure their text and layout against headless Chrome: check.sh runs a corpus (modules exporting Comp, conf and props) at its first, middle and last frames in raea and in Chrome (React DOM in raea's Clock, mounted once its fonts are in), and compare.jq pairs their text runs by words (raea's manifest against boxes.ts, made the same way), box and ink within 1 px. probes/ is raea's own corpus, #54's repro first ("here" at x 0 where Chrome puts it at 342); snapcn's 33 run through the private tree's adapter. The baseline, recorded in docs/layout-reads.feature: 3 of snapcn's 33 pass (all hold-only); 13 of the 27 that measure throw and the rest drift up to 87 px 2026-11-12 13:42:42 -08:00
shinyobjectz 593ebb5226 LR0: Layout reads, the plan (docs/layout-reads.feature): compositions measure text and layout as Chrome does (#54), answered synchronously from the Blitz page that draws the frame; LR0 the snapcn harness against headless Chrome, LR1-LR2 the layout call and every host, LR3-LR8 the DOM on refs and document, LR9 delayRender, LR10-LR11 the bar, docs and the issues 2026-11-12 13:42:42 -08:00