Skip to content

feat: settings slot anchors for module-contributed pages - #180

Draft
HexaField wants to merge 3 commits into
feat/billing-uifrom
feat/bundled-modules-export
Draft

feat: settings slot anchors for module-contributed pages#180
HexaField wants to merge 3 commits into
feat/billing-uifrom
feat/bundled-modules-export

Conversation

@HexaField

Copy link
Copy Markdown
Contributor

Adds $slot resolution in template route/settings content, enabling modules to contribute settings nav items and pages through the slot registry.

Changes

  1. slotRegistry.tsresolveTemplate() + resolveRoutes(): walks a template schema's routes array (alongside children/props/slots) so $slot markers in route-level content resolve before the renderer sees them.

  2. TemplateLayout.tsxShellOverlayInner passes shell-view schemas through slotRegistry.resolveTemplate() before rendering.

  3. Settings.schema.ts — Three new slot anchors:

    • settings-nav: after the Developer nav item — modules contribute nav entries here
    • settings-pages: /ext/:page route — modules render their own settings pages (gated on routeStore.segments[1])
    • account-content: inside the Account section — modules contribute account-level chrome (billing, usage, etc.)
  4. shared/index.ts — exports bundledModules from the shared barrel so host apps (platform) can register modules at boot.

Stacked on

#177 (feat/billing-ui) — which already has the global flag on SlotContribution. The duplicate commit from this branch was dropped during rebase.

Context

The platform module defines billing/usage/account settings pages contributed via slots, but the slot anchors in Settings didn't exist yet. This unblocks those contributions.

HexaField and others added 3 commits September 2, 2026 14:05
Lets deployments register their own modules via the bundledModules map
before PlatformProvider runs initializeIntegrations. The map was already
importable from its deep path; this adds it to the shared barrel so
external consumers (platform frontend, custom deployments) can import
from @we/app-shell/shared instead of reaching into internals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- slotRegistry: resolveAnchors now walks routes (resolveRoutes); added
  resolveTemplate() for shell view templates that bypass nodes()
- TemplateLayout: ShellOverlayInner calls resolveTemplate before render
  so $slot markers in settings/profile templates get resolved
- Settings.schema: two new slot anchors — settings-nav (nav column) and
  settings-pages (route /ext/:page) — let modules inject nav items and
  page content without platform-specific code in WE

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extension point for module-contributed account content (email, tier,
billing link) alongside the WE-native DID display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HexaField
HexaField requested a review from jhweir as a code owner September 2, 2026 04:07
@HexaField
HexaField marked this pull request as draft September 2, 2026 12:39
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