Skip to content

Onboarding at events: translate /onboard, use "community" wording, and handle failed invite lookups #653

Open

Description

@elliotBraem

Ported from NEARBuilders/citynode.app#386 (open), where this was fully implemented in PR NEARBuilders/citynode.app#389 before the local auth-ui plugin was removed in favor of this repo's published auth plugin.

The reference implementation (diffs, tests, i18n keys) is preserved on that PR branch: fix/386-onboard-i18n-lookup-errors — files originally lived under plugins/auth-ui/src/ here (now plugins/auth/ui/src/).

Problem

plugins/auth/ui/src/routes/_public/onboard.tsx — the /onboard?code= page used at events — has gaps for new community members:

  1. English only. All strings are hardcoded. The auth.onboard.* translation keys do not exist in this repo yet (citynode's old plugins/auth-ui/src/i18n/messages/auth.ts had full en/es/fr/zh coverage; this repo's plugins/auth/ui/src/i18n/catalogs.ts has no onboard keys).
  2. Wrong wording. The page says "organization" instead of "community" ("Join the organization", "Could not join this organization").
  3. Stuck loading. If the invite-code lookup fails (network error, 429, 5xx), the page shows "Loading invitation…" forever — no error state, no retry. A failed join ends on a panel whose only action is "Explore communities".

Proposed fix (mirroring the reference implementation)

  • Add auth.onboard.* keys to the i18n catalogs (en/es/fr/zh) and render the onboard page (and its sign-up / display-name steps) through the login i18n runtime (LoginI18nProvider + useLoginTranslation in plugins/auth/ui/src/i18n/runtime.tsx).
  • Replace "organization" with "community" everywhere in the flow.
  • Map lookup/join failures to distinct status panels with reasons and next steps: lookup error → Retry (not an endless spinner); join failures → communityNotOpen, communityFull, codeRevoked, codeExpired, codeUsedUp, codeInvalid copy with "contact the organizer" / "explore" actions.
  • Port the vitest coverage from plugins/auth-ui/src/routes/_public/-onboard.test.tsx on the reference branch (568 lines: language rendering, retry paths, join-failure panels).

Acceptance criteria

  • /onboard?code= renders in es/fr/zh per the selected language.
  • No "organization" wording remains in the onboarding flow.
  • A failed invite lookup shows an error with a Retry button instead of an endless spinner.
  • Failed joins show a specific reason and next step.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions