Skip to content

test(e2e): facade content_fs theming via fs:// + co-located fixtures#12

Open
AndrewKirkovski wants to merge 10 commits into
masterfrom
feat/facade-theming-e2e
Open

test(e2e): facade content_fs theming via fs:// + co-located fixtures#12
AndrewKirkovski wants to merge 10 commits into
masterfrom
feat/facade-theming-e2e

Conversation

@AndrewKirkovski

@AndrewKirkovski AndrewKirkovski commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What

End-to-end verification of the facade's content_fs theming (paired with wippyai/framework#62).

  • e2e/theming.spec.ts — asserts /api/public/facade/config resolves fs://custom-css.facade.css + fs://css-variables.facade.json to file content, and /api/public/facade/variables.css returns generated text/css with Cache-Control: public, max-age=3600. 4/4 passing.
  • static/{custom-css,css-variables}.facade.{css,json} — fixtures co-located with login.html (served at /app); *.facade.* naming convention.
  • src/app/deps/_index.yaml — facade dep wired with content_fs: app:app_fs + fs:// theming values (declarative, no CLI overrides).
  • src/app/_index.yaml.json / .svg static MIME types.
  • src/app/agents/debug_agent_prompt.luaraw_spec :: table assertion across the any-typed get_by_id boundary (wippy lint fix; verified against vendor source that get_by_id always returns a table).
  • wippy.lock — drop wc-voice (voice 0.1.2's tts_token.endpoint ships without router metadata and aborts boot).
  • .gitignore — ignore test-results/.

Verification

wippy lint → "No issues found". Booted on :8086; both fs:// (global, via deps) and file:// (children, via -o) branches resolve through content_fs; /app/css-variables.facade.json serves application/json.

Note

This branch also bundles in-progress agent/model/frontend changes from concurrent work (not part of the theming change) so the working tree is captured in one place.

The "Why 'use PrimeVue + Tailwind only'" section had the right content
but read as a suggestion. Rewrote as "The theming rule — non-optional.
Read first, follow vigorously."

Key changes:
- Imperative tone: MUST, NEVER, "no exceptions, no per-module carve-outs".
- Scope stated upfront: this applies to ALL FE components, both
  micro-frontend embedding technologies — page apps in iframes AND web
  components in shadow DOM. Both consume the proxy API, both receive
  the facade's `cssVariables` / `customCSS`, both are bound by the same
  rule.
- Four vocabularies (`--p-*`, PrimeVue, Tailwind, generic element
  selectors) framed as the only ones universally known across every
  Wippy consumer. Everything else is layer-local in effect.
- Two-question test (semantic vs decorative; layer-local vs shared)
  presented as a checklist to apply BEFORE writing any CSS.
- Closing reinforcement: rigidity is the feature, not a limitation.

This is the canonical version of the rule; lattice/CLAUDE.md and
gen-2-chat/THEMING.md carry consistent versions that reference this.
Verifies the facade resolves fs:// CSS/JSON theming references through
content_fs at request time.

- e2e/theming.spec.ts: asserts /facade/config resolves fs://custom-css.facade.css
  and fs://css-variables.facade.json to file content, and /facade/variables.css
  returns generated text/css with Cache-Control
- static/{custom-css,css-variables}.facade.{css,json}: fixtures co-located with
  login.html (served at /app); `*.facade.*` naming convention
- src/app/deps: facade dep uses content_fs=app:app_fs + fs:// theming values
- src/app/_index.yaml: add .json/.svg static MIME types
- src/app/agents/debug_agent_prompt.lua: assert raw_spec :: table across the
  any-typed get_by_id boundary (wippy lint fix)
- wippy.lock: drop wc-voice (voice 0.1.2 tts_token.endpoint lacks router metadata)
- .gitignore: ignore test-results/

Also bundles in-progress agent/model/frontend changes from concurrent work.
Brings master in: Web Research demo, README + screenshots, :8080 default,
refreshed models, keeper dependency.

Conflicts resolved:
- agents/debug_agent_prompt.lua: both sides added `raw_spec :: table`; kept the
  explanatory comment
- deps/_index.yaml: kept BOTH the wc-mermaid/markdown/chartjs deps and master's
  new keeper dep
- frontend/.../app.ts: took master's addIcons(addCollection) helper for icon
  registration (handles deprecated `icons` + canonical `iconSets`)
- models/_index.yaml: took master's refreshed model set

Reverted 57b786a's removal of the iframe-demo / nested-nav pages: restored
frontend/applications/main/src/pages/{iframe-demo,nested-nav}.vue and turned
master's /components-tab redirects back into real component routes + nav items,
while keeping the new /research page.
@AndrewKirkovski AndrewKirkovski marked this pull request as draft June 4, 2026 19:34
The master merge surfaced 3 pre-existing vue-tsc errors, all OUTSIDE the new
pages (research.vue / components.vue were already clean):

- app/app.vue: define the missing `NavItem` interface used by navigate()
- router/index.ts: type the `on` param as `ProxyApiInstance['on']` so the
  canonical `createAppRouter(host, instance.on, …)` call type-checks (drops
  the over-strict hand-rolled OnSubscription)
- pages/users.vue: `host.confirm()` takes `message`, not `html`
  (LimitedConfirmationOptions omits it) — switched to a plain-text message

Also `eslint --fix` on pages/research.vue (attribute-per-line formatting).
`npm run type-check` now exits 0; lint is error-free.
All 9 frontend package.json files (2 apps + 7 web components) now reference
the published @wippy-fe/* 0.0.35 packages. Run a clean reinstall + rebuild
(make.bat clean-build) to pull them into node_modules / static bundles.
Fix the Make/Windows build so a full clean rebuild covers all 9 packages
and resolves a @wippy-fe/* version bump cleanly:

- make.ps1: clean-build now iterates the same apps+wcs set as `build`
  (was a separate $cleanBuildItems list that had drifted and omitted
  the iframe-demo app)
- Makefile: add the missing iframe-demo line, and wipe package-lock.json
  alongside node_modules (a stale lockfile pins the OLD @wippy-fe versions
  and breaks `npm install` after a bump)
- Regenerated all 9 package-lock.json against @wippy-fe/* 0.0.35

Ran the fixed `clean-build`: all 9 bundles rebuilt cleanly (exit 0).
- build_artifacts_catalog: read the camelCase projected descriptor
  (wippy.tagName / .props / .events, browser)
- wippy.lock: replace wippy/views with the local ../wippy-framework/src/views
  checkout (mirrors the facade replacement) so the app serves camelCase views
- main app nav cleanup: remove "Iframe Demo" from the left sidebar and the
  "Nested Navigation" tab from /components so each demo lives in one place;
  the iframe-demo route/page and the /nested-nav page are kept
…rsions

- every frontend package.json @wippy-fe/* dep -> ^0.0.36, with lockfiles
  regenerated via `make clean-build` (clean reinstall)
- static/login.html CSS assets 1.0.26 -> 1.0.36 (real pre-auth reference)
- main + iframe-demo app.html dev-proxy.js 1.0.32 -> 1.0.36

Verified live against the deployed CDN 1.0.36 host: app boots, web components
load via the camelCase /components/list path, zero console errors.
Drop the local ../wippy-framework/src/{facade,views} replacements and resolve
both from the hub: facade 0.6.8 -> 0.6.10 (0.6.10 republishes the broken 0.6.9
pack correctly, with public_files embedded), views 0.5.0 -> 0.5.1 (camelCase
component/page API).

Verified live: BE boots clean (no facade:static error), app loads on the
webcomponents-1.0.36 host, web components render via the camelCase
/components/list path, zero console errors.
@AndrewKirkovski AndrewKirkovski marked this pull request as ready for review June 8, 2026 09:37
login.html is served standalone (pre-auth, outside the Wippy host), so it now
pulls the app theme from the facade instead of hardcoding it:
- link /api/public/facade/variables.css — the facade CSS-variables endpoint
  built for non-host pages (converts the app's css_variables JSON, incl. the
  @dark scope -> prefers-color-scheme media query, into a :root stylesheet)
- link /app/custom-css.facade.css — the same global custom CSS the host
  applies (content_fs file, linkable directly from static/)
- drop the hardcoded --p-primary and Poppins @import so the facade theme wins

Verified live: both resources return 200, the app's css_variables (--e2e-*)
and custom CSS load on login.html, page renders, zero console errors.
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