Repository navigation
Fix #426–#437: ui catalog, homeUrl, CSP providers, UserContext.permissions, scaffold and settings fixes - #438
Merged
Merged
Conversation
The ui namespace was registered only when <project_root>/packages/ui/locales existed, which is true only inside the framework monorepo, so every scaffolded app rendered raw ui.* keys. The catalog now lives in the hosting package and is registered unconditionally. Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
register_csp_sources runs before DB settings hydrate and the policy was frozen at boot. registry.add_provider(fn) lets a module return (directive, source) pairs from in-memory state on each response; finished policies are cached by the pairs returned, invalid pairs and raising providers fail closed to the static policy, and an app with no providers keeps the precomputed header. Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
…#436) A principal can carry permissions directly (an API token scoped to one permission) instead of encoding them as roles. Round-tripped through the session (old cookies decode to []), merged by both the async and the sync resolver, and the wildcard is always dropped so a token or IdP claim can never grant everything. Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
…e on a provider build A provider reading an admin-edited setting could return a source the regex accepted but the header encoder cannot carry (non-ASCII, control bytes), which would 500 every response, including the settings page needed to fix it. Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
view_prefix="" is both the default (no views) and "mounted at /", so the truthiness check skipped root-mounted modules and is-not-None would have matched every API-only one. wire_module_routes now records each module whose view router actually received routes (app.state.sm.view_prefixes), and the login fallback and dashboard stats read that map, turning "" into /. Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
…fix, 300-line cap) Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
…S3 extra message; monkeypatch in dashboard test Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
- doctor's locale checks read the ui catalog from its new home (#426) - host supplies a homeUrl default (Dashboard, else /) for installs without the users module, so Keycloak installs keep their home link (#427) - document that CSP sources are ASCII (punycode for IDNs) (#434) Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
- error, landing, accept-invite and reset-password pages follow homeUrl too (#427) - reject an unknown s3_signature_version at config time (#432) Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
- useHomeUrl accepts same-origin paths only, else / (#427) - default footer caption has no trailing space for a blank app name (#428) Claude-Session: https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4
Deploying simple-module-python with
|
| Latest commit: |
568d214
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3e89e4de.simple-module-python.pages.dev |
| Branch Preview URL: | https://feat-issue-batch-426-437.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Fixes the twelve issues reported while building Kuri on simple_module 0.0.35. Design:
docs/superpowers/specs/2026-10-11-issue-batch-426-437-design.md, plan:docs/superpowers/plans/2026-10-11-issue-batch-426-437.md.Changes
uicatalog moves frompackages/ui/localesintosimple_module_hosting/ui_locales/and is always registered, so scaffolded apps stop rendering rawui.*keys. Doctor's locale checks read the new location.homeUrlshared prop. Users publishes its landing URL; the host falls back to Dashboard, then/(covers Keycloak installs).useHomeUrl()accepts same-origin paths only. Used by AdminLayout, SidebarLayout, PublicLayout, Error, Landing, AcceptInvite, ResetPassword.© {year} {appName};BRAND_LICENSEremoved.app.tsxcallsinitTheme()and wirestitleviaformatTitle/setTitleAppName.manage_url) and opens on the first one shown.effective_route_paths.s3_signature_versionsetting (defaults3v4, validated tos3v4/s3) passed as botocoreConfig.import-from-envlayers.envunderos.environ(real env wins), with a naming hint when nothing matched.CspSourceRegistry.add_provider(fn): settings-driven origins evaluated per response, cached by value, failing closed to the static policy. Sources must be printable ASCII (punycode for IDNs), so an admin-edited value can never break header encoding. Apps without providers keep the precomputed header.view_prefix=""is both "no views" and "mounted at /", so the host now records modules whose view router actually got routes (sm.view_prefixes); the login fallback and dashboard links use it.UserContext.permissions, round-tripped through the session (old cookies decode to[]) and merged by both resolvers;*is always dropped.role="alert".Also: a RUF071 suppression with a reason in
_route_guard.py(the new ruff flags an intended character-wise prefix;mainfailsmake lintwithout it), and theimport-from-envtests are isolated from a developer's.env.Verification
make lint✓ ·make test✓ (3952 Python, 536 JS) ·make doctor0 errors ·npm run build✓tests/e2e/test_shell_home_and_signin.pyOut of scope: #317 (needs the external design deck).
Closes #426, closes #427, closes #428, closes #429, closes #430, closes #431, closes #432, closes #433, closes #434, closes #435, closes #436, closes #437
https://claude.ai/code/session_01NJyEUshNM4K1e66dRgbyj4