fix(login): persona click signs in directly + friendly error copy #3

Merged
shad merged 1 commits from fix/login-resilience into main 2026-06-14 21:26:01 +00:00
Owner

Closes two concrete user-visible bugs found by the live dogfood:

  1. Persona chip click now actually signs in. Before, clicking "Mariana Cole · CEO" only populated the email field — the operator then had to also click the dev-login button. The live qa/full_dogfood.mjs was failing on ceo_persona_dev_login_lands_on_landing for exactly this reason.

  2. Auth errors are human-readable. Before: "Login failed: 502 <html>...Bad Gateway...". After: "Developer sign-in unavailable: the EA2 backend is not reachable from this environment right now. Try again shortly." The mapping covers 502/504 (proxy/EA2 unreachable), 503 (auth-service down — matches the real demo behaviour), 404 (route not wired), 401/403 (rejected). Aligns with the business-as-code mandate: a regional store manager should not see an HTTP body dump.

31/31 vitest tests pass. tsc -b + vite build green.

Out of scope: the underlying cluster issue that's returning 502 on the canvas proxy. That requires kubectl and is documented in qa/evidence/REPORT.md.

Closes two concrete user-visible bugs found by the live dogfood: 1. **Persona chip click now actually signs in.** Before, clicking "Mariana Cole · CEO" only populated the email field — the operator then had to also click the dev-login button. The live `qa/full_dogfood.mjs` was failing on `ceo_persona_dev_login_lands_on_landing` for exactly this reason. 2. **Auth errors are human-readable.** Before: `"Login failed: 502 <html>...Bad Gateway..."`. After: `"Developer sign-in unavailable: the EA2 backend is not reachable from this environment right now. Try again shortly."` The mapping covers 502/504 (proxy/EA2 unreachable), 503 (auth-service down — matches the real demo behaviour), 404 (route not wired), 401/403 (rejected). Aligns with the business-as-code mandate: a regional store manager should not see an HTTP body dump. 31/31 vitest tests pass. `tsc -b` + `vite build` green. Out of scope: the underlying cluster issue that's returning 502 on the canvas proxy. That requires kubectl and is documented in `qa/evidence/REPORT.md`.
shad added 1 commit 2026-06-14 21:25:54 +00:00
fix(login): persona click signs in directly + friendly error copy
build-and-publish / test (pull_request) Has been cancelled
build-and-publish / image (pull_request) Has been cancelled
1f419dc078
- Persona chips (Mariana CEO, Aisha HR, Rohan IT) now run dev-login on
  click instead of just populating the email field. Closes the dogfood
  failure 'ceo_persona_dev_login_lands_on_landing'.
- api.ts: replace 'Login failed: 502 <html>...502 Bad Gateway...' with
  a human-readable friendlyAuthError() mapping (502/504/503/404/401)
  so a regional store manager sees 'auth service temporarily down' not
  an HTTP status dump. Aligns with the business-as-code mandate.
- api.test: ping() failure assertion widened to match the new copy.

31/31 vitest tests pass. tsc + vite build green.
shad merged commit 300024964f into main 2026-06-14 21:26:01 +00:00
shad deleted branch fix/login-resilience 2026-06-14 21:26:01 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shad/canvas-frontend#3