Skip to content

notes-demo: browser app validating the webrun no-bundle CSS pipeline - #1

Merged
mkotelnikov merged 5 commits into
mainfrom
phase4-notes-demo
Aug 5, 2026
Merged

notes-demo: browser app validating the webrun no-bundle CSS pipeline#1
mkotelnikov merged 5 commits into
mainfrom
phase4-notes-demo

Conversation

@mkotelnikov

Copy link
Copy Markdown
Contributor

notes-demo — browser app validating the webrun no-bundle CSS pipeline

Adds apps/notes-demo (@statewalker/webrun-notes-demo): a plain-DOM/TypeScript note-taking app served with no bundler through @statewalker/webrun-modules-build. Its purpose is to validate the Phase-3 CSS features (Tailwind v4 + F2 @import chains + F3 url() assets) in a real browser.

Verified in a real browser

  • Tailwind v4 + @theme — utilities render; the custom bg-brand token (#4f46e5) applies to the logo chip + "New" button.
  • F2 @import at runtime — a plain (non-Tailwind) chain theme.css → @import "./palette.css" keeps the @import in the emitted <style> injector; it resolves against <base href="/~/"> to the real emitted /~/palette.css, whose --note-line: #c7d2fe colors the .note-card border. (The Tailwind entry instead inlines its @import, so the plain chain is what exercises the runtime case — the F2 runtime-base concern is thereby answered: it resolves when the document base is the tree root.)
  • F3 asseturl("./logo.svg") → byte-identical /~/logo.svg.
  • No-bundle — the browser loads /~/main.js as a plain ES module; the whole graph (guest + npm deps) is served from the static build tree.

Design notes

  • Vanilla, not React. React's no-bundle instance-sharing (react-dom reaching react's shared internals) is a separate, hard concern orthogonal to the CSS features under test; plain DOM keeps the demo focused and reliable. (A React no-bundle limitation is worth a separate investigation — see the program notes.)
  • Swappable storesrc/store.ts is FilesApi-only; default persists via a localStorage-backed MemFilesApi, ?mem boots a clean in-memory store (auto-testable).
  • Excluded the sandbox's unrelated experimental packages from the umbrella link so the install stays lean.

Tests / gate

test/build.test.ts (MemFilesApi, no network) 4/4 — asserts the emitted tree: Tailwind utilities + bg-brand/#4f46e5, real /~/tokens.css (F2), byte-identical /~/logo.svg (F3), /~/main.js entry. tsc + biome clean.

Depends on webrun-files#5 (project .js.ts/.tsx resolution) — a build bug this demo surfaced. Do not auto-merge — Ready to review per the PR-gate.

🤖 Generated with Claude Code

mkotelnikov and others added 5 commits August 5, 2026 17:19
…F3 url() asset, swappable FilesApi store)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
build.ts runs newProjectBuild(src→dist); serve.ts is a node:http static
server for the emitted tree; index.html sets <base href="/~/"> (F2/F3
deployment requirement). test/build.test.ts asserts the emitted /~/ tree
(Tailwind utilities + @theme bg-brand, real /~/tokens.css F2, byte-identical
/~/logo.svg F3, /~/main.js entry) with MemFilesApi — no network.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
README covers what it demonstrates, pnpm build/serve, the ?mem param, and the
<base href="/~/"> F2/F3 note. css-modules.d.ts makes `import "./styles.css"`
typecheck (tsc --noEmit clean).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…browser

Rewrites the guest UI as plain DOM/TS (drops React — its no-bundle instance
sharing is a separate concern from the CSS features under test). Renames to
@statewalker/webrun-notes-demo (a name collision existed with webrun-wire).
Adds a PLAIN @import chain (theme.css → palette.css) to exercise F2 at RUNTIME:
the injected <style> keeps @import "./palette.css", which resolves against
<base href="/~/"> to the real emitted /~/palette.css (verified: #c7d2fe borders
.note-card). Tailwind + @theme (bg-brand #4f46e5) and the F3 url() asset also
verified in a real browser. MemFilesApi build test 4/4 green; tsc + biome clean.

Requires webrun-files fix/resolve-project-ext (project .js→.ts/.tsx resolution).
@mkotelnikov
mkotelnikov merged commit baa7c13 into main Aug 5, 2026
1 check failed
@mkotelnikov
mkotelnikov deleted the phase4-notes-demo branch August 5, 2026 22:19
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