Repository navigation
Conversation
Add driver.GPUEnabler and a table per backend for a GPU view's item, resize, frame and release entry points, and connect the frame submitter only when an app mounts a GPU view. Android's minimal app links neither glsl nor the frame path now. On macOS, Linux, Windows and the web the minimal app still links its writer: the pipeline types name writer types (macOS, Linux), and the glass and effect paths compile a program without a GPU view (Windows, web). The minimal-app link test fails on those four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirror the writers' pipeline types locally, so a struct kept by an interface no longer names msl or glsl, and register Linux's GPU GL callbacks when a GPU view mounts instead of at start. The minimal-app link test now passes on macOS, Linux and Android; Windows and the web still link their writer through the glass and backdrop effect paths, which compile a program without a GPU view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Route a glass effect's program and a shader effect's backdrop picture through the glass and shader tables, mirror the writers' register and slot types locally so an interface-kept struct does not name them, and enable the glass table from style resolution. The minimal-app link test passes on every target now, and the feature app still links all three writers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS refuses GPU views when the environment has no GPU, and its enabler said nothing about it. The guard also keeps the macOS and iOS enablers from being the same copy, which the duplicate backend check refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each group's demo list moves out of the tab assembly into a file of its own with a build tag, and a build named with gallery_group and gallery_<group> carries only that group: Go's linker drops the demos the assembly no longer names. The default build registers every group, so the gallery the site publishes is unchanged (119 tests pass), and a single group's web wasm is 52.0 MB against the full build's 96.6 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
build-gallery.mjs builds each group's web app with its tag and writes an index.json the shell reads. The shell lists the groups and loads the selected one's app.html on demand behind the platform chrome, with ?group= deep links; the old app.html and loader.html addresses redirect to it. A first visit fetches one group, 12.1 to 16.1 MB gzipped, against the 20.7 MB bundle it fetched before, and switching groups fetches only that group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link naming no group, or one the build no longer has, opens the first group; the address now says which one, so a shared link returns to what the visitor saw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The iframe's address carried the page's own query text, which the DOM-XSS query flags at the src assignment. Every part now comes from a constant list: the platforms, and the languages and appearances the app takes as debugging flags, and the group the build's index names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shell read its groups from index.json, so the address the iframe loads still traced back to the page. The build writes the list into the shell now, as it writes the icon, and the theme is a constant index. Every part of the iframe's address is then build-time or from a constant list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The radio and the group select handed their values straight to the frame's state, so the address built from them traced back to the page. Both now pass through their constant lists, and each part of the address is URI-encoded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
A first visit to
/gallery/fetched one 20.7 MiB gzipped web bundle that held every demo. It now fetches a shell and one group's app, 12.1 to 16.1 MiB.examples/galleryregisters each group's demos in a file of its own with a build tag, so a build named withgallery_groupandgallery_<group>carries that group alone and the linker drops the rest. The default build registers every group, so nothing about the gallery's own build changes (119 tests pass).website/scripts/build-gallery.mjsbuilds each group with its tags, writes each group'sapp.htmlfrom the loader, and writes the group list into the shell as the icon is written.website/scripts/gallery-frame.htmllists those groups and loads the selected one'sapp.htmlbehind the platform chrome, with?group=deep links. Switching groups replaces the frame; the platform choice works as before. The iframe's address is assembled from build-time and constant values only, which CodeQL's DOM-text check requires./gallery/app.htmland/gallery/loader.htmlredirect to the shell, so old links keep working.Measured locally, web, gzip -9:
The engine and the components every demo shares are about 12 MiB gzipped, so groups are the useful unit; going below that needs the gallery to link less of the framework, which is a separate change. Demo-level deep links (
?demo=) need the gallery app to read such a parameter; this does not add it yet.Part of #2512.
Targets
core,base,ui,tsx, thensgotool)The change is the gallery example and the website's gallery scripts.
Screenshots
None. The shell keeps its layout; a group select joins the platform control.
Verification
go tool nsgo check— exit 0.go tool nsgo test ./examples/gallery— 119 passed, 0 failed, 23 skipped; tab, group and demo order unchanged.bun scripts/build-gallery.mjsinwebsite/— 14 groups built in about 2m20s, each group directory has itsapp.html,<wasm>.gzip,nsgo.jsandwasm_exec.js, and the shell holds the group list it writes.public/gallerylocally and checked: the shell names<group>/app.htmlfrom its built-in list;apps/app.htmlreferences its ownapp.wasm.gzip;/app.htmlredirects to the shell.node --check, andbuild-gallery.mjsandweb-build.mjsparse withnode --check.bun run buildinwebsite/— not run:node_modulesis not installed on this machine, so Astro's check and build were not exercised. The website workflow builds the site.Checklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.No
changelog.dfragment: this changes the site's gallery, not the framework an app author uses.🤖 Generated with Claude Code