Content_fs theming with fs:// scheme#62
Merged
Merged
Conversation
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)
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.
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
Adds file-backed facade theming resolved at request time via a
content_fsfilesystem entry.theming_helpers.lua—file_ref_path+resolve_css/resolve_json(resolvefs:///file://refs againstcontent_fs) +build_variables_csscss_vars_handler.lua—GET /api/public/facade/variables.css→text/css(:root+@media prefers-color-scheme),Cache-Control: public, max-age=3600config_handler.lua— three theming scopes (global/host/children) resolved throughcontent_fsREADME.md— file-based theming how-to, the*.facade.*naming convention, and thefs://rationaletheming_helpers_test+config_handler_test(fs://+file://coverage)Why
fs://and notfile://The wippy registry loader interpolates
file://at load time (reads it relative to the_index.yamldir and inlines it), so afile://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/configreturns resolvedcustomCSS/cssVariables,/facade/variables.cssistext/css, bothfs://(global, via deps) andfile://(children, via-o) branches resolve.wippy lintclean.