Skip to content

fix(auth): show registration-capacity block as a persistent inline notice with recovery - #225

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/fixauth-make-the-registration-capacity-59aa3b
Draft

fix(auth): show registration-capacity block as a persistent inline notice with recovery#225
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/fixauth-make-the-registration-capacity-59aa3b

Conversation

@posthog

@posthog posthog Bot commented Aug 13, 2026

Copy link
Copy Markdown

Problem

  • Sign-up dies silently on the capacity block: the 409 TENANT_REGISTRATION_BLOCKED (no cluster capacity for a new tenant) showed only a destructive toast that faded, leaving email, domain, terms, and the enabled submit button untouched — the UI told the user to retry while nothing about the attempt could succeed.
  • The live availability check had the same blind spot: it folded the 409 into a silent 'error' status that rendered no message, so the user could not learn registration was closed before pressing Create Account.
  • Nothing measured it. The project has no registration_blocked event, so the block emitted no telemetry and was only visible in session replay.
  • Two smaller issues in the same path: /auth/signup (the primary CTA target) was never prefetched, and two /auth paths were hard-coded instead of using the route registry.

Changes

  • Route the capacity block through the form's persistent inline domain-status slot (domainStatusMessage, warning variant) — where every other availability outcome already lives — and keep submit disabled while it holds. Clears on edit so the live check can re-evaluate.
  • useDomainAvailability now reports the 409 honestly (new registration-blocked status + backend message) instead of swallowing it as 'error'.
  • Add pushRegistrationBlocked() / registration_blocked funnel event so the block finally shows up in the data.
  • Prefetch routes.auth.signup; swap the two hard-coded /auth paths for the registry entries.
  • Extract a shared isTenantRegistrationBlocked(response) helper so the live check and the submit-time re-check read the same 409 envelope.

The capacity condition and the exact "try again in about 10 minutes" wording come from the backend in another repo; the frontend uses a fallback string only when the backend sends none.

Notes

  • Scope is the four auth files named in the report plus a shared helper and the analytics event.
  • npm run type-check and npm run lint:biome pass.

Agent context

  • Considered a form-level banner prop in the shared core lib (cleaner altitude for an environment condition), but that is an external repo and out of scope; the inline domain slot is the surface the report specifies and matches the existing availability UX.

Created with PostHog Desktop from this inbox report.

…tice

The 409 TENANT_REGISTRATION_BLOCKED capacity block was surfaced only as a
destructive toast that faded, leaving the form looking submittable with no
recovery path. Hold the block as a persistent inline notice next to the domain
field and keep the submit button disabled while it holds.

- Report the 409 from the live availability check instead of folding it into a
  silent 'error' status.
- Add a `registration_blocked` funnel event so the block emits telemetry.
- Prefetch the Sign Up step and route the two hard-coded `/auth` paths through
  the route registry.
- Extract a shared `isTenantRegistrationBlocked` helper for the 409 envelope.

Generated-By: PostHog Desktop
Task-Id: 3a994a9e-8b29-4da4-b62c-1eafa5f90265
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.

0 participants