Skip to content

Front refactor: SP1 — login + register no design novo#142

Merged
BrunooMoniz merged 4 commits into
mainfrom
front/view-login
Jun 18, 2026
Merged

Front refactor: SP1 — login + register no design novo#142
BrunooMoniz merged 4 commits into
mainfrom
front/view-login

Conversation

@BrunooMoniz

Copy link
Copy Markdown
Owner

Login e register em /app/login e /app/register (Refined Editorial), guarda repontada. 223 testes, 103 e2e.

🤖 Generated with Claude Code

BrunooMoniz and others added 4 commits June 18, 2026 11:34
useLogin/useRegister/useRequestInvite mutations over apiFetch, plus
isLikelyEmail (regex verbatim from the legacy portal login.js, on trimmed
input). Unit-tested. These power the new public /app/login/ + /app/register/
routes, which live outside the (app) Protected group.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Public auth routes at /app/login/ and /app/register/ (siblings of the (app)
group, so NO Protected guard; they inherit only the root Providers layout).
Refined Editorial: AuthCard (brand → public /, serif title), EmailField,
LinkSentPanel.

- Login: client-side email gate (no API call when invalid), "Enviar link de
  acesso" → busy "Enviando…", success panel, "Sem conexão" on network fail,
  server {error} surfaced; link "Solicitar convite →" → /app/register/.
- Register: "Tenho convite" (invite_code+email → POST /portal/register → #sent)
  and "Pedir convite" (email+note → /portal/request-invite) tabs; prefill from
  ?invite/?email and ?error=link expired notice (useSearchParams, Suspense-wrapped
  for output:export).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 401 handler (apiFetch default + Protected) now redirects to /app/login/
instead of /login, since the new login page lives inside the /app build as a
public route. The api.test.ts default-handler reset is self-contained and
asserts no specific path, so it is unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Builds against the static export (out/app/). Mocks /portal/login,
/portal/register, /portal/request-invite. Asserts: client validation blocks
an invalid email (no POST), a valid email → "Link enviado", a network failure
→ "Sem conexão", register invite happy → #sent, ?invite/?email prefill +
invite-tab activation, ?error=link expired notice, waitlist request. No
horizontal overflow on both routes at 360px and 1440px.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BrunooMoniz BrunooMoniz merged commit 9fb988c into main Jun 18, 2026
3 checks passed
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