3.0 KiB
UI Handoff Contracts
Future self-service and scope-admin UIs should consume user-engine through a transport adapter that preserves the service shapes below.
USER-WP-0014 adds RegistrationAccessManagementUi as the first implemented
headless UI contract facade. It returns transport-neutral screen models,
route definitions, responsive layout metadata, and an accessible HTML
verification renderer.
Self-Service Account UI
Required backend operations:
meto resolve the current actor, user, account, and identity links.RegistrationAccessManagementUi.start_registrationto create a UI-backed registration session.RegistrationAccessManagementUi.attach_factorto attach adapter-supplied factor evidence without rendering factor values.RegistrationAccessManagementUi.complete_registrationto enforce UI terms/consent and complete the headless registration flow.RegistrationAccessManagementUi.prepared_rights_reviewandaccept_prepared_claimto review and claim prepared rights.RegistrationAccessManagementUi.hat_selection_viewandselect_hatto show available hats and select active access context.effective_profilewith the actor tenant and optional application id.projectionwithSELF_SERVICEfor editable user-visible fields.set_profile_valuefor fields whose catalog mutability includesUSER.audit_recordsor a filtered audit transport for recent user-visible account activity.
Scope Admin UI
Required backend operations:
resolve_tenant_contextbefore all tenant-scoped screens.RegistrationAccessManagementUi.admin_dashboardfor registration, prepared-account, access-profile, and onboarding diagnostics.set_tenant_account_statusfor in-scope account state.add_membershipfor tenant/team membership changes.projectionwithADMINor a future admin transport projection.tenant_diagnosticsfor onboarding and support readiness checks.
UI Route Contract
RegistrationAccessManagementUi.api_contract() defines these route ids:
registration.startregistration.factorregistration.completeprepared_account.reviewprepared_account.acceptprepared_account.denyaccess_profile.select_hatadmin.dashboard
Transport adapters may map these ids to HTTP, RPC, desktop, or CLI routes. The route contract marks factor values, prepared-account factor matches, profile defaults, claim values, and hidden policy details as redacted.
Accessibility And Responsive Contract
render_html emits banner, navigation, and main landmarks. Section
navigation uses labels, controls expose aria-label, and screen models include
mobile and desktop layout metadata. Mobile screens use a one-column layout and
44px minimum touch target. Desktop screens use a two-column workbench layout.
Fixtures
Use user_engine.testing.scenarios for human, tenant admin, platform
operator, delegated agent, invalid, expired, local issuer, and missing-tenant
fixtures. UIs should keep fixtures at the transport boundary and avoid
embedding identity-provider logic.