Skip to content

Content_fs theming with fs:// scheme#62

Merged
AndrewKirkovski merged 8 commits into
masterfrom
feat/facade-content-fs-theming
Jun 8, 2026
Merged

Content_fs theming with fs:// scheme#62
AndrewKirkovski merged 8 commits into
masterfrom
feat/facade-content-fs-theming

Conversation

@AndrewKirkovski

@AndrewKirkovski AndrewKirkovski commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What

Adds file-backed facade theming resolved at request time via a content_fs filesystem entry.

  • theming_helpers.luafile_ref_path + resolve_css/resolve_json (resolve fs:///file:// refs against content_fs) + build_variables_css
  • css_vars_handler.luaGET /api/public/facade/variables.csstext/css (:root + @media prefers-color-scheme), Cache-Control: public, max-age=3600
  • config_handler.lua — three theming scopes (global/host/children) resolved through content_fs
  • README.md — file-based theming how-to, the *.facade.* naming convention, and the fs:// rationale
  • tests — theming_helpers_test + config_handler_test (fs:// + file:// coverage)

Why fs:// and not file://

The wippy registry loader interpolates file:// at load time (reads it relative to the _index.yaml dir and inlines it), so a file:// written in a YAML requirement param never reaches the facade — and a path that doesn't resolve from the YAML's own dir rejects the whole file. fs:// passes through untouched so the facade resolves it itself. file:// is still accepted for non-YAML values (env / -o / runtime registry).

Verification

Verified end-to-end against the app-template-raw e2e harness (separate PR): /facade/config returns resolved customCSS/cssVariables, /facade/variables.css is text/css, both fs:// (global, via deps) and file:// (children, via -o) branches resolve. wippy lint clean.

Note: the module's test/ harness can't execute these tests via wippy run test because exclude_meta: type:[test] strips them on replacement-load (framework-wide — bootloader behaves identically). The unit tests are lint-valid; runtime behavior is verified via the e2e + probes.

Updates the `fe_facade_url` default + Makefile sync target + README + test
fixtures from `webcomponents-1.0.30` to `webcomponents-1.0.34`.

Tracks Wippy Web Host 1.0.34 release (installVueWarnSuppressor + bridge
sync-throw fix + normalizeError hardening). See gen-2-chat CHANGELOG.

Run `make sync` in src/facade/ after this lands to refresh the vendored
`public/@wippy-fe/loading.js`.
Resolve `fs://`/`file://` theming references against a content_fs
fs.directory at request time (theming_helpers.resolve_css/resolve_json).
`fs://` is the canonical scheme for YAML requirement params — the wippy
loader reserves `file://` for its own load-time interpolation, so a
`file://` written in YAML never reaches the facade; `file://` is still
accepted for non-YAML values (env / -o / runtime registry).

- theming_helpers.lua: file_ref_path + resolve_css/resolve_json + build_variables_css
- css_vars_handler.lua: GET /facade/variables.css (text/css, Cache-Control)
- config_handler.lua: three theming scopes (global/host/children) resolved via content_fs
- README: file-based theming how-to, fs:// rationale, `*.facade.*` naming convention
- tests: theming_helpers_test + config_handler_test (fs:// + file:// coverage)
@AndrewKirkovski AndrewKirkovski changed the title feat(facade): content_fs theming with fs:// scheme Content_fs theming with fs:// scheme Jun 4, 2026
@AndrewKirkovski AndrewKirkovski marked this pull request as draft June 4, 2026 19:34
fe_facade_url default, Makefile WEB_HOST_CDN, README examples, and the
config_handler_test fixture now point at the deployed 1.0.35 Web Host bundle.
Brings in views 0.5.0 projection layer (bundled_meta.lua reads bundled
wippy-meta.json with YAML-over-bundle per-field precedence), find-by-tag
endpoint updates, and wc-content-kit FE rebuild.

Conflicts: facade CDN version files (Makefile, README.md, _index.yaml,
config_handler_test.lua) — kept HEAD's webcomponents-1.0.35 (this branch
is intentionally ahead of master's 1.0.32 on the Web Host CDN bump).
…tent fixture bug

The bundled_meta projection tests were doubly dead:

1. Structurally no-op. bundled_meta_test.lua used the inline form
   `test.run_cases(outcomes)` (outcomes = {}) with describes called
   inside run(), which registers cases but never executes/enforces
   them — a broken assertion still reported PASS. Converted to the
   working `test.run_cases(define_tests)` + run(options) wrapper used
   by every other views test (env_loader/component_registry/
   page_registry/resource_registry).

2. Never registered. Added the bundled_meta_test entry to
   src/views/_index.yaml (the file shipped in 0.5.0 but was never
   wired into the manifest, so `wippy run test` never saw it).

Running it for the first time then surfaced a latent fixture bug in
"falls back to bundled meta when YAML omits a field": it placed the
entry under `wippy.path` and expected it as the component entry_point,
but components source entry_point from top-level `browser` (wippy.path
is page-only — the next case asserts it's ignored for components, and
the spec/README agree). Fixed the fixture to use top-level `browser`.

Also added a regression test pinning the nil-vs-empty contract
(explicit `{}`/`""` in YAML overrides the bundle; only an omitted key
falls through), and added the missing `description` row to the views
README component field-mapping table.

Verified: full suite 14/14 green against the real bundled_meta library,
with a negative control confirming assertions now execute.
Make the views HTTP API emit a uniform camelCase wippy-component-1.0
descriptor so the FE consumes it directly with no re-assembly. The
registry/YAML stays snake_case; the projection layer (bundled_meta) is
the single snake->camel boundary, and YAML always overrides the bundle.

- project_component_response: nested camelCase descriptor
  (baseUrl, browser, wippy.{tagName,type,props,events,autoRegister})
- project_page_response: deep-merge meta.proxy over bundle wippy.proxy,
  then backfill { enabled = true } so the FE owns injection defaults
- list_components / find_by_tag / list_pages: camelCase response types
  (groupIcon / groupOrder / groupPlacement)
- render.synthesize_from_registry: proxy = page.proxy or { enabled = true }
- tests + README updated to the camelCase contract
Delete the self-contained wc-content-kit module (the wippy-mermaid /
wippy-markdown / wippy-chartjs auto-registered components, their Vite
frontends, and the built public/ bundles). Nothing else in the repo
referenced it — no dangling imports or registry entries remain.
fe_facade_url default (+ the Makefile / README / config_handler_test
examples) now point at web-host.wippy.ai/webcomponents-1.0.36, matching the
deployed gen-2-chat 1.0.36 host. Was 1.0.35.
@AndrewKirkovski AndrewKirkovski marked this pull request as ready for review June 8, 2026 09:08
@AndrewKirkovski AndrewKirkovski merged commit a38d6d3 into master Jun 8, 2026
18 checks passed
@AndrewKirkovski AndrewKirkovski deleted the feat/facade-content-fs-theming branch June 8, 2026 09:43
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