Mount routes and apiRoutes at config root#46
Merged
wolfy-j merged 6 commits intofeature/v4from Apr 20, 2026
Merged
Conversation
Add page_registry mount_route support with validation, /pages/routes API endpoint, mountRoute in page list response. Move apiRoutes from hostConfig to config root in facade config_handler and index.html to match gen-2-chat schema change.
Refresh loading.js from gen-2-chat build output. Add loading.js.map for debugging facade error overlays.
Tracks gen-2-chat 1.0.22 / @wippy-fe/* 0.0.22 release.
9 tasks
- views/api/render.lua: rename emitted JSON field `customVariabled` -> `customVariables` (the snake_case YAML `custom_variables` was already correct; only the camelCase wire field had the extra `d`). Paired with gen-2-chat 1.0.23 rename. - facade: default `fe_facade_url` bumped to webcomponents-1.0.23 across `_index.yaml`, `README.md`, `Makefile`, and `config_handler_test.lua`.
Use type cast consistent with configOverrides pattern instead of ternary (which inferred as any and broke PageResponse type check).
- llm: cast json.decode(response.body or "") for nullable body handling - llm: google stream:read(4096) to satisfy required buffer arg - llm: cast google mapper_test map_tools results for index access - embeddings: cast results for embedding_repo_test index access - views: cast page.data_func and page.template_name at narrow-safe sites
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.
Summary
Part of the 1.0.22 / 0.0.22 three-repo release (gen-2-chat → @wippy-fe npm → wippy-framework facade).
Mount routes registry
New Lua module
src/views/page_registry.luabuilds the pageId ↔ mountRoute map for pages that claim a top-level URL (e.g./fooserved by a registered page). Comes with full unit coverage inpage_registry_test.lua.New HTTP endpoint
GET /pages/routes(src/views/api/list_routes.lua) exposes that map to the frontend so the Host can resolve mount routes at runtime. Wired into_index.yamlalongside the existinglist_pages/public_urlendpoints.list_pages.luatweaked to return the mount route alongside existing page metadata.apiRoutespromoted to config rootFacade config now emits
apiRoutesas a top-level field (was nested underhostConfig). Matches the Host'sAppConfiglayout wherefeature.apiRoutesis a first-class override, and lets the Host pick it up without reaching into a nested object.src/facade/config_handler.lua: drop thehost_config.apiRoutesassignment, surface asapiRoutesat the response rootsrc/facade/public/index.html: passcfg.apiRoutesthrough to the child AppConfigVendored loading.js refreshed
Pulled fresh
loading.jsfromweb-host.wippy.ai/webcomponents-1.0.22including the new source map — matches the source-maps-everywhere change from gen-2-chat 1.0.22.Version bump (1.0.21 → 1.0.22)
src/facade/Makefile—WEB_HOST_CDNdefaultsrc/facade/_index.yaml—fe_facade_urlrequirement defaultsrc/facade/README.md— documented default URLsrc/facade/config_handler_test.lua— test fixture URLRelated releases
webcomponents, published toweb-host.wippy.ai/webcomponents-1.0.22(source maps on every proxy/CDN bundle, subscription cleanup, console-noise fixes)Test plan
fe_facade_urldefault and serves index.html against 1.0.22 CDNGET /pages/routesreturns{ mountRoute: pageId }map for pages with top-level URLsapiRoutesat root when the facade config provides itpage_registry_test.luapasses