Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): Auth pages update (#9124)
There are UX and design issues with current auth pages; `login`, `signup` and `reset_password` (including change password). ### Changes 🏗️ ![auth](https://github.com/user-attachments/assets/56dfbae3-5c12-4324-a29a-846d091d9501) *Missing `s` on the login's password error is fixed. Important changes in bold. #### All auth pages - **Split `/login` into `/signup`** - UI Redesign that adheres to Figma designs - General code cleanup and improvements - Fix feedback: it's now shown when needed and clear (e.g. "~~String~~ Password must be...") - All action functions use `Sentry.withServerActionInstrumentation` - `PasswordInput` "eye button" shows password only when mouse button is hold and doesn't capture tab #### Login page - **Removed agree to terms checkbox** (it's only on signup now) - Move provider login function to `actions.ts` #### Signup page - **Requires to type password twice** - Shows waitlist information on *any* database error #### Reset password page - **Password update requires to type password twice** - **When request to send email is processed then the feedback is: Password reset email sent if user exists. Please check your email.** - Email sent feedback is black, error is red - Move send email and update password functions to `actions.ts` - Disable button when email is sent #### Other - Update zod schema objects and move them to `types/auth` - Move `components/PasswordInput.tsx` to `/components/auth` - Make common UI elements separate components in `components/auth` - Update `yarn.lock` (supabase packages) - Remove redundant letter in `client.ts` - Don't log error when user auth is missing in `useSupabase`; user is simply not logged in ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Form feedback: - [x] Login works - [x] Signup works - [x] Reset email works - [x] Change password works - [x] Login works - [x] Signup works - [x] Reset email is sent - [x] Reset email logs user in and redirects to `/reset_password` - [x] Change password works - [x] Logout works - [x] All links across auth pages work Note: OAuth login providers are disabled and so untested. <details> <summary>Example test plan</summary> - [ ] Create from scratch and execute an agent with at least 3 blocks - [ ] Import an agent from file upload, and confirm it executes correctly - [ ] Upload agent to marketplace - [ ] Import an agent from marketplace and confirm it executes correctly - [ ] Edit an agent from monitor, and confirm it executes correctly </details> #### For configuration changes: - [ ] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details> --------- Co-authored-by: Zamil Majdy <[email protected]>
- Loading branch information