Skip to content

feat(facade): tanstack passthrough + theme persistence; Web Host CDN 1.0.41 (EE2-2265, EE2-2274)#66

Merged
AndrewKirkovski merged 3 commits into
masterfrom
feat/facade-tanstack-query-config
Jun 29, 2026
Merged

feat(facade): tanstack passthrough + theme persistence; Web Host CDN 1.0.41 (EE2-2265, EE2-2274)#66
AndrewKirkovski merged 3 commits into
masterfrom
feat/facade-tanstack-query-config

Conversation

@AndrewKirkovski

@AndrewKirkovski AndrewKirkovski commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

EE2-2265 — facade tanstack param + CDN 1.0.40

Rebased onto current master (preserves the strict security policies from 9d624bc / f01b29d). Adds, on top:

  • tanstack requirement (default {}) → config_handler returns it as top-level tanstack in /api/public/facade/config ({ default?, content?, lists? } — global + per-role TanStack Query defaults). Mirrors the api_routes / axios_defaults JSON-requirement pattern.
  • Web Host CDN ref 1.0.391.0.40 (_index.yaml fe_facade_url default, Makefile, README, config_handler_test).
  • README + a config_handler_test case for the tanstack decode.

EE2-2274 — theme persistence (cookie / localStorage / none) + Jet SSR shell

Facade-owned theme persistence; the Web Host stays persist-agnostic (it only emits a new themeChanged event). Published as wippy/facade@0.6.17.

  • Config: two new requirements surfaced via /api/public/facade/configtheme_persist (none default | cookie | localStorage) → themePersist; theme_storage_key (default @wippy-theme-mode) → themeStorageKey. Clamped (unknown value → none, empty key → default) with config_handler_test coverage.
  • Generated snippet: theme_persist_handler.lua serves GET /facade/theme-persist.js (application/javascript) with KEY/MODE baked in — early-applies the w-theme-* class from storage and exposes window.wippyThemePersist { mode, key, read, write, apply }. One render-blocking <script src> integrates any page, including non-Wippy-hosted ones.
  • Jet SSR shell: index.jet + index_handler.lua read the theme cookie server-side and bake class="w-theme-dark" / color-scheme onto <html> for zero-flash in cookie mode, and seed the persisted value into initWippyApp. The host applies it via the existing applyThemeMode — no host persist logic.
  • CDN ref 1.0.401.0.41 (_index.yaml fe_facade_url, Makefile, README, config_handler_test).

…ppConfig.tanstack

Expose a `tanstack` JSON requirement (default "{}") that the config handler
decodes and returns as top-level `tanstack` in /api/public/facade/config, so the
Web Host can apply TanStack Query defaults globally and per role-based category
(content/lists). Mirrors the api_routes/axios_defaults JSON-requirement pattern.

- config_handler.lua: read tanstack via non_empty_map_or_nil(get_req_json_any),
  add `tanstack` to the returned config table
- _index.yaml: tanstack ns.requirement → wippy.facade:tanstack .default
- config_handler_test.lua: tanstack in REQ_NAMES + defaults; default + decode tests
- README: tanstack row in the optional JSON parameters table

Stacked on the theme_mode facade branch (config_handler already returns themeMode).
Point fe_facade_url default (+ Makefile/README/config_handler_test) at the
1.0.40 host bundle, matching the tanstack + postMessage-hardening release.
Pairs with the facade tanstack requirement on this branch (publish 0.6.13).
- New `theme_persist` (none|cookie|localStorage, default none) + `theme_storage_key`
  (default @wippy-theme-mode) requirements, returned by /facade/config. Opt-in.
- Generated script at GET /facade/theme-persist.js (theme_persist_handler) with the
  key + mode baked in: early-applies the stored theme class and exposes
  window.wippyThemePersist (read/write/apply). One <script src> integrates any page.
- Shell converted to a Jet-rendered endpoint (index.jet + index_handler): in cookie
  mode it reads the cookie server-side and bakes the w-theme-* class onto <html>
  (no flash); seeds the persisted value into initWippyApp and persists changes via
  the host's themeChanged event.
- Bump Web Host CDN ref 1.0.40 -> 1.0.41 (fe_facade_url in _index.yaml, Makefile,
  README.md, config_handler_test.lua).

Verified: facade test suite green; cookie SSR + endpoints validated against a real
consumer (app-template-raw, 6/6 Playwright e2e green).
@AndrewKirkovski AndrewKirkovski changed the title feat(facade): tanstack param + Web Host CDN 1.0.40 (EE2-2265) feat(facade): tanstack passthrough + theme persistence; Web Host CDN 1.0.41 (EE2-2265, EE2-2274) Jun 29, 2026
@AndrewKirkovski AndrewKirkovski merged commit 92019de into master Jun 29, 2026
35 of 36 checks passed
@AndrewKirkovski AndrewKirkovski deleted the feat/facade-tanstack-query-config branch June 29, 2026 14:49
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