Skip to content

Decouple: EC-shaped onboarding (artist / professional flags) #20

Description

@chubes4

Coupling

The onboarding flow assumes Extra Chill's user shape — user_is_artist and user_is_professional boolean flags, hardcoded copy, EC-specific username-pick UX.

Affected files:

  • src/auth/context.tsxcompleteOnboarding(username, userIsArtist, userIsProfessional) signature
  • app/onboarding.tsx — UI for the flags + EC-branded copy

This is genuinely platform-specific data. The flags map to community.extrachill.com user roles. They have no meaning on a generic WordPress install.

Target shape (abilities-first)

The shell exposes onboarding as a slot + ability name, not a fixed flow:

  1. Generic onboarding scaffold in the shell — handles the route, the auth check, the "must complete onboarding before app entry" gate, and invokes a configured ability.
  2. Consumer-supplied onboarding screen — the actual UI is the consumer's responsibility. The screen calls client.execute(config.onboarding.ability, args) with whatever shape that ability expects.
// extrachill.config.ts (consumer side)
export const config: WPNativeConfig = {
  onboarding: {
    enabled: true,
    ability: 'extrachill/user.complete-onboarding',
    screen: ExtraChillOnboardingScreen,
  },
  ...
};

ExtraChillOnboardingScreen lives in this repo as a normal RN component. It's free to ask for userIsArtist / userIsProfessional / whatever, then call the configured ability with that payload. The shell never sees those EC-specific fields.

The corresponding server-side ability extrachill/user.complete-onboarding is registered by an EC plugin (probably extrachill-users). The Abilities API auto-exposes it via REST, MCP, chat, CLI — and now mobile.

Acceptance

  • Shell has no user_is_artist / user_is_professional references
  • Onboarding screen is consumer-supplied via config
  • Onboarding ability name is consumer-supplied via config
  • Shell handles the gate logic (auth + onboarding check) generically
  • EC's onboarding flow lives in this repo as a normal screen, calls client.execute() with the configured ability name
  • Server-side: confirm EC has an ability registered for completing onboarding (or register one)

Related

Part of the wp-native extraction effort. See chubes4/wp-native ROADMAP M5/M7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wp-native-extractionCoupling to extract for wp-native framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions