Skip to content

fix(mobile): keep the sign-in email error clear of the continue button - #6396

Open
iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-signin-email-pasted-submit-the-same-error-bar-si-5bf10-1568
Open

iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-signin-email-pasted-submit-the-same-error-bar-si-5bf10-1568

Conversation

@iscekic

@iscekic iscekic commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • A missing or rejected email address now shows its message directly under the email field.
  • The message no longer floats over the Continue with email / متابعة primary action or clips it.
  • The primary action keeps its position while the message appears and while the sign-in request is in flight.
  • The reserved space fits the wrapped Arabic message, so the button does not move when the app language is Arabic.
  • Typing a correction clears the message, and submitting the corrected address proceeds to the code-entry screen.
  • When a rejected resend returns you from the code screen, the email field keeps the address you typed so you can correct it.

Changelog for maintainers

  • apps/mobile/src/components/login/idle-auth.tsx:84 — accepted: an address error returns the view to main, but the OTP branch unmounts the main subtree, so the uncontrolled field remounted blank. It now seeds defaultValue from the live email ref, so the rejected address stays visible under its inline error; the mounted-field test asserts that value.
  • Email sign-in exposes an inline emailError plus clearEmailError; empty, INVALID_REQUEST, and INVALID_EMAIL results stay beside the field, while other failures still use a toast.
  • Starting any sign-in action clears a stale email error.
  • FormField accepts optional reserveErrorMessages; it renders hidden full-width copies of the localized copy to reserve the tallest height, positions the live message over that band, and hides the copies from accessibility so the error is announced once.
  • IdleAuth reserves the empty-email, invalid-request, and invalid-email copy and returns to the main view when an address error arrives from a resend, so feedback is not hidden behind code entry.
  • Empty-email validation is reachable from the keyboard submit action as well as the button.
  • Review the reserved list when a field gains a new error message: a missing entry makes the layout shift.
  • The empty-field scenario on emulator-5554 (e1-scene.log) proves the inline message and replaces the retired pasted-address claim; the correction, code-entry, and Arabic-reserve stills stand, with the Arabic message on one line at this device's font scale.

E2E proof

[e1] Dark mode on emulator-5554: paste a non-address and tap متابعة — prior/e1-after.png

[e1] On the same screen, tap متابعة with the field empty: 'يرجى إدخال عنوان بريدك الإلكتروني.' shows under the field and the متابعة button does not move. — e2e-mobile-app/e1.png

[e1] On the same screen, tap متابعة with the field empty: 'يرجى إدخال عنوان بريدك الإلكتروني.' shows under the field and the متابعة button does not move. — e2e-mobile-app/e1-empty-before.png

[e3] tap متابعة with the field empty — prior/e3-after.png

[e2] On the same screen, after the inline error shows, type a correction: the message clears as you edit and tapping متابعة proceeds to the code-entry screen. — prior/e2-error.png

[e4] On the same screen, switch the app language to Arabic and repeat the pasted-address submit: the two-line Arabic message fits in the reserved space without moving the متابعة button. — prior/e4-clear.png

e1

Owner request

Explorer finding: signin-email-pasted-submit: The same error bar sits on top of the "متابعة" button, clipping the primary action instead of sitting clear of it.

The user-agent explorer found this while using the app like a user.
One finding per item; the explorer never edits product code.

Flow: signin-email-pasted-submit
Found on revision: d923ec3

Repro:

  1. set this state first: the device in dark mode
  2. open the app on emulator-5554
  3. reach the screen the capture names (signin-email-pasted-submit)
  4. the capture shows the defect named below

Observed: The same error bar sits on top of the "متابعة" button, clipping the primary action instead of sitting clear of it.
Expected: the screen renders without this defect

Evidence (from the device run):

E2E proof — log excerpts

[e1] On the same screen, tap متابعة with the field empty: the empty-email messag -> pass :: android emulator-5554: SCENE e1 OK; empty tap shows android.widget.TextView أدخل عنوان بريدك الإلكتروني. tappable [99,1470][981,1516] under the field and android.widget.Button المتابعة عبر البريد الإلكتروني tappable [99,1544][981,1659] (e1-scene.log); before-tap bounds="[99,1544][981,1659]" (e1-empty-before.xml) matches after-tap bounds="[99,1544][981,1659]" (e1-empty-after.xml).

Comment thread apps/mobile/src/components/login/idle-auth.tsx
@kilo-code-bot

kilo-code-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • apps/mobile/src/components/login/idle-auth.tsx
  • apps/mobile/src/components/login/__tests__/idle-auth.mounted.test.tsx
  • apps/mobile/src/lib/case-guard.test.ts
Previous Review Summary (commit c048725)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit c048725)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/login/idle-auth.tsx 84 A resend failure returns to the main view, but the uncontrolled email field remounts blank (initialEmail), so the inline error appears under an empty field while emailRef.current still resubmits the invisible rejected address.
Files Reviewed (6 files)
  • apps/mobile/src/components/login/idle-auth.tsx - 1 issue
  • apps/mobile/src/components/login/__tests__/idle-auth.mounted.test.tsx
  • apps/mobile/src/components/ui/form-field.tsx
  • apps/mobile/src/components/ui/form-field.mounted.test.tsx
  • apps/mobile/src/lib/auth/use-native-auth.ts
  • apps/mobile/src/lib/auth/use-native-auth.test.ts

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic marked this pull request as draft September 19, 2026 21:00
@iscekic
iscekic force-pushed the kwf/explorer-signin-email-pasted-submit-the-same-error-bar-si-5bf10-1568 branch from c048725 to 27c9640 Compare September 19, 2026 21:25
@iscekic
iscekic force-pushed the kwf/explorer-signin-email-pasted-submit-the-same-error-bar-si-5bf10-1568 branch from 27c9640 to 883c001 Compare September 19, 2026 21:58
@iscekic
iscekic marked this pull request as ready for review September 19, 2026 22:08
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 19, 2026
@iscekic iscekic self-assigned this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant