Conversation
The login form labels its first field "Email address", but the backend @cl.password_auth_callback receives any username string and the docs use `username`. Align the UI with the backend: relabel the field "Username or email" in all 23 locales, update the required-field message, and rename the frontend's `email` identifiers to `username` (the request payload already sends `username`). The placeholder "me@example.com" is left unchanged: it is a format example, not a restriction. Closes Chainlit#2902 Co-Authored-By: Claude <noreply@anthropic.com>
jianyx1
requested review from
asvishnyakov,
hayescode and
sandangel
as code owners
September 6, 2026 13:37
Contributor
There was a problem hiding this comment.
1 issue found across 25 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/LoginForm.tsx">
<violation number="1" location="frontend/src/components/LoginForm.tsx:109">
P2: Renaming the input's id from `email` to `username` breaks the Cypress e2e login flow in cypress/e2e/data_layer/spec.cy.ts:8, which still selects `#email` (`cy.get(SELECTORS.EMAIL_INPUT)` at line 35). This repo's verification (pnpm test / type-check / lint) doesn't cover Cypress, so the break ships unnoticed. Update the spec's SELECTORS.EMAIL_INPUT to `#username` (or keep the id stable) in the same change.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| </Label> | ||
| <Input | ||
| id="email" | ||
| id="username" |
Contributor
There was a problem hiding this comment.
P2: Renaming the input's id from email to username breaks the Cypress e2e login flow in cypress/e2e/data_layer/spec.cy.ts:8, which still selects #email (cy.get(SELECTORS.EMAIL_INPUT) at line 35). This repo's verification (pnpm test / type-check / lint) doesn't cover Cypress, so the break ships unnoticed. Update the spec's SELECTORS.EMAIL_INPUT to #username (or keep the id stable) in the same change.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At frontend/src/components/LoginForm.tsx, line 109:
<comment>Renaming the input's id from `email` to `username` breaks the Cypress e2e login flow in cypress/e2e/data_layer/spec.cy.ts:8, which still selects `#email` (`cy.get(SELECTORS.EMAIL_INPUT)` at line 35). This repo's verification (pnpm test / type-check / lint) doesn't cover Cypress, so the break ships unnoticed. Update the spec's SELECTORS.EMAIL_INPUT to `#username` (or keep the id stable) in the same change.</comment>
<file context>
@@ -102,24 +102,26 @@ export function LoginForm({
</Label>
<Input
- id="email"
+ id="username"
disabled={loading}
autoFocus
</file context>
Renaming the login field from `email` to `username` changed both the input's `id` and its `name` attribute, which broke the Cypress specs that selected `#email` / `input[name='email']`. Update all twelve selector references so the e2e suite matches the renamed field. Co-Authored-By: Claude <noreply@anthropic.com>
|
This PR is stale because it has been open for 14 days with no activity. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The login form labels its first field "Email address", but the backend
@cl.password_auth_callbackreceives any username string, and the docsuse
username— users are confused when the UI says "Email" while thebackend accepts any string.
Align the UI with the backend:
emailidentifiers tousername(the request payload already sends
username, so nothing changeson the wire)
The placeholder "me@example.com" is left unchanged: it is a format
example, not a restriction.
Non-English strings follow each locale file's existing wording and may
need native-speaker review.
Verification:
cd backend && uv run pytest --cov=chainlit→ 932 passedcd frontend && pnpm test→ 32 passed (5 files)pnpm type-check→ frontend + react-client passpnpm linton the changed files → cleanCloses #2902
Co-Authored-By: Claude noreply@anthropic.com
Summary by cubic
Relabels the login form's first field from "Email address" to "Username or email" so the UI matches the backend, which accepts any username string. The request payload already sends
username, so nothing changes on the wire.emailidentifiers tousername, including the input'sid/nameattributes.me@example.comunchanged as a format example.Closes #2902.
Written for commit 739365b. Summary will update on new commits.