Repository navigation
Load the browser page behind Strata's loading shell - #65
Merged
Merged
Conversation
The page used to show "Loading env-lib-cpp on Strata..." while the engine downloaded. It now loads behind the Strata web kit's loading shell (strata-loader.js, vendored at Strata 901e6c9 with its PIN, SHA256SUMS, LICENSE and update.sh): the /play trailer's first frame as a blurred backdrop, in the page's colours, and byte-accurate progress with the size. The loader streams envlib-strata.wasm and hands the bytes to the engine, so nothing downloads twice. When the view can't run (no WebGL 2, the renderer fails, the engine stops, a lost WebGL context does not come back) the shell plays the trailer and says why; under prefers-reduced-motion it shows the still. A device drawing under 12 frames a second is offered the clip without losing the live view; that watch is skipped in automated browsers and ?bench runs. strata/web/strata-boot.js bridges this classic (non-MODULARIZE) build to the loader: emcc's script tag is kept inert in a template, the bridge starts it, and the engine waits in Module.instantiateWasm for the loader's bytes. After each link strata/web/strata_page.cmake puts the loader and the bridge inline in the page, so the site is still the same four files, and stamps the download's size, since the arcade compresses on the fly with no Content-Length. The smoke test now checks that the shell finishes, and that without WebGL 2 it says why and downloads nothing of the engine. drafted by Claude on behalf of Daniel Stephenson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeuo5Ry76i84tz6WXQSE
drafted by Claude on behalf of Daniel Stephenson Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYNeuo5Ry76i84tz6WXQSE
Member
Author
|
Review of PR #65 (adopted by a Gardener tend run; no prior review was recorded on this PR). Rubric:
Non-blocking notes:
Verdict: ready to merge. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The browser page used to show "Loading env-lib-cpp on Strata…" while the engine downloaded. It now loads behind the Strata web kit's loading shell (
strata-loader.js, from Strata'sweb/kit/, vendored at 901e6c9 instrata/web/strata-kit/withPIN,SHA256SUMS,LICENSEandupdate.sh, the same way gardener vendors the kit):https://danielstephenson.dev/trailers/.role=progressbar. The loader streams the.wasmand hands its bytes to the engine, so nothing downloads twice.prefers-reduced-motion, the still is shown instead of the clip.?benchruns.How it is wired
strata/web/strata-boot.jsbridges this classic (non-MODULARIZE) build to the loader. emcc's{{{ SCRIPT }}}tag sits inert in<template id="strata-glue">. The bridge starts the glue, and the engine waits inModule.instantiateWasmfor the loader's bytes.strata/web/strata_page.cmakeruns after each link. It puts the loader and the bridge inline in the page, so the site is still the same four files and the workflow is unchanged. It also stamps the download's size on the template, because the arcade compresses on the fly and sends noContent-Length.strata/web/(strata-kit/,strata-boot.js,strata_page.cmake), next to the page.#loadingbox now only shows in-page errors.window.envlib,?world=and?benchare unchanged.Checked locally
The build used emsdk 6.0.11 and Strata c2d7ee4. It was served by a local server that gzips on the fly with no
Content-Length, as the arcade does.strata/web/smoke/smoke.cjspassed on desktop and phone (iPhone 13), including the new shell checks.strata/web/smoke/bench.cjs ?bench=3passed on desktop and phone.ctest(wasm under Node) passed: 1/1.envlib.status().tickadvancing, the canvas not blank, and the shell gone.Drafted by Claude on behalf of Daniel Stephenson.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LYNeuo5Ry76i84tz6WXQSE