feat(cms): the home page can be a module page or any path - #191
Merged
Conversation
… CMS page The selector listed published CMS pages and nothing else, so an install whose front door should be a MODULE page — /marketplace, /docs, a storefront — had no way to say so. The only workaround was rebuilding that page's content as a CMS page and keeping the two in sync. `tiger.site.home_page` now holds a CMS page_id (unchanged), a PATH beginning with "/", or '' for the built-in landing. Existing values are page_ids, so this is backward compatible by construction. FORWARDED, never redirected. The content has to be served AT "/" or it isn't the home page, it's a signpost pointing away from it. Resolution mirrors Tiger_Controller_Plugin_RouteOverride: a module's public page is usually a registered pretty prefix, so the override table is matched first (which is what makes /marketplace work rather than only the long canonical path), falling back to a module/controller/action parse. Segments are sanitized to the dispatcher's own [a-zA-Z0-9_-] shape, and an unresolvable path falls through to the theme home / built-in landing rather than 404ing the site's front door. The dropdown is generated from Tiger_Routing_Overrides — the registry where a module declares its public alias — so it cannot drift from what is actually routable. File-like prefixes are filtered out: robots.txt, sitemap.xml and llms.txt serve plain text, and offering one as a home page could only ever be a mistake. A "custom path" option reveals a validated free-text field for anything else, and a stored path that is not in the offered list still round-trips through the form instead of silently resetting the site's home page. The option list is now grouped (content pages / module pages / custom), so FormsTest flattens before asserting a page label — the labels moved one level down into their optgroup. i18n: 5 keys across all six locales, parity held at 199. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WXgMENcwa4Q8yCJaHpjHpf
Merged
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.
Why
The home-page selector listed published CMS pages and nothing else. An install whose front door should be a module page —
/marketplace,/docs, a storefront — had no way to say so. The only workaround was rebuilding that page as a CMS page and keeping the two in sync forever.What
tiger.site.home_pagenow holds one of three things:''page_id/marketplace/Existing values are page_ids, so this is backward compatible by construction.
Forwarded, never redirected. The content has to be served at
/or it isn't the home page — it's a signpost pointing away from it.Resolution mirrors
Tiger_Controller_Plugin_RouteOverride: a module's public page is usually a registered pretty prefix, so the override table is matched first (that's what makes/marketplacework rather than only the long canonical path), falling back to amodule/controller/actionparse. Segments are sanitized to the dispatcher's own[a-zA-Z0-9_-]shape, and an unresolvable path falls through to the theme home / built-in landing rather than 404ing the site's front door.The dropdown
Generated from
Tiger_Routing_Overrides— the registry where a module declares its public alias — so it can't drift from what's actually routable. On dev-com that yields/marketplace,/docs,/shop,/checkout,/billing.Non-page endpoints are filtered out:
robots.txt,sitemap.xmlandllms.txtserve plain text, and offering one as a home page could only ever be a mistake.A "custom path…" option reveals a validated free-text field for anything else. A stored path that isn't in the offered list (an ad-hoc route, or a module since deactivated) still round-trips through the form rather than silently resetting the site's home page.
Tests
5 new: the module list comes from the routing registry, non-page endpoints are excluded, the built-in landing and custom escape hatch are both offered, a typed path must be rooted (rejects
marketplace,https://evil.test/x,/x?y=1), and the sentinel can never be mistaken for a path or for the built-in landing.The option list is now grouped (content pages / module pages / custom), so
FormsTestflattens before asserting a page label — those labels moved one level down into their optgroup.i18n: 5 keys in all six locales, parity at 199. Full suite 2096, 0 failures, 15 deprecations (baseline). Coverage 72.6% (floor 72).
CAPABILITIES.mdcurrent.