[PR #136·137·139·140] Polishing the Customer App Login: Mockup Look, Keyboard, Input Limits, and a Request Timeout
Android device testing (on a real phone) kept turning up things to fix on the customer app’s login screen. This post combines the two pieces of work that fixed them. The first (PR #136) is the screen’s look and the keyboard; the second (PR #137) is input limits and a request timeout. The second piece was re-submitted as PR #139 and #140 for a reason explained below. Those two have no work logs of their own; they are PRs that edited the log for PR #137.
At a glance
| PR | Covered | Final result |
|---|---|---|
| #136 | Mockup look, keyboard handling, font | Six input screens wrapped in a scroll frame; wording matched to the mockup (the font was reverted in #137) |
| #137 | Input limits, request timeout, progress text, font revert | Number up to 11 digits and code up to 8; 15-second request limit (first 1 minute); “Logging in…” and “Checking…” |
| #139·#140 | Re-submission of #137 | Some commits never reached main, so the same code and the later commits were submitted again |
PR #136: Matching the login screen’s look and handling the keyboard
- What happened: Two things came up. The app had no logo or styling, so it looked different from the login mockup. And with the font size at maximum, the keyboard covered the input fields and buttons on the login and invite code screens, and the screen could not scroll. I combined the two jobs into one plan and approved it.
- What was done: Claude implemented it.
- Six screens with input fields (login, invite code, invite password, recovery start, recovery new password, contact us) were switched to a shared
Screenframe. The frame is aScrollView(a scrollable area) wrapped inKeyboardAvoidingView(a component that adds bottom spacing equal to the keyboard’s height when it appears). - The order of the login screen stayed the same; only the look was matched to the mockup: a text logo, intro text, the yellow Kakao button, and a notice at the bottom.
- Wording was changed to match the mockup (“Continue with Kakao” → “Kakao login”, and so on). The related tests and the device test guide were updated too.
- The font for the whole app was changed to Noto Sans KR (regular, medium, bold). This font is reverted in the PR #137 section below.
- Naver and Google buttons were built but stay hidden because a setting in the code (
social-providers.ts) is turned off. - Two decisions of mine were moved into the decision log: the mockup wording and font are approved, and managing the suspension contact info from the admin web is a separate job.
- Six screens with input fields (login, invite code, invite password, recovery start, recovery new password, contact us) were switched to a shared
- Chosen approach and dropped options:
- For the keyboard, the cheapest approach (a shared frame plus
KeyboardAvoidingView) came first. It adds no new native part (a part that touches phone features directly), so the existing development build can test it. If that does not work, the next steps are computing from keyboard events directly, then adding a library (which needs a new development build). - The logo in the mockup was text drawn in a font embedded in the mockup. I rendered that text in that font and exported it as transparent PNGs (1x, 2x, 3x). SVG would need a new package, so it was dropped.
- The font embedded in the mockup holds only some Korean characters, so it was not used.
@expo-google-fonts/noto-sans-kr, which the Expo documentation recommends, was used instead; its license files confirm MIT and SIL OFL 1.1. Each weight is about 6 MB, so the files were not put in the repository, and the package supplies them instead. - The social buttons are hidden by a code constant, not an environment variable, because a forgotten environment variable could ship them turned on. Even if turned on, the server would not accept them, so the buttons are
disabled. - The mockup’s pale text color has too little contrast for small text on white, so a slightly darker color was used. This was judged by eye, not calculated (not verified).
- For the keyboard, the cheapest approach (a shared frame plus
PR #137 (+ #139 and #140): Input limits, request timeout, and progress text
- What happened: While testing on the phone, I pointed out two things: the phone number and code fields had no length limit, and entering a wrong number or code only turned the button gray, with no message. For the second, the suspected cause is that requests had no time limit, so a request that never reaches the server waits forever. That has not been reproduced and confirmed on the phone.
- What I decided: The request time limit, the progress text, and the new wording for the invite code error. The time limit started at 1 minute and I later shortened it to 15 seconds.
- What was done: Claude implemented it.
- The number field takes digits only, up to 11. Hyphens, spaces, and letters are removed,
+82 10…becomes010…, and then it is cut. The code field takes digits only, up to 8, and applies to login, invite code, and recovery start alike. The cleanup lives in one function. - The request time limit is set in the single
sendplace that every request passes through, usingAbortController(the standard way to cut an in-flight request). When exceeded, the existing connection error message appears and the button becomes pressable again. The final value is 15 seconds. - While a request is running, the button text changes to “Logging in…” or “Checking…”.
- The error message for a wrong number or code was changed. The server returns the same response for an unknown number and a wrong code, so there is one message.
- The number field takes digits only, up to 11. Hyphens, spaces, and letters are removed,
- Fixes after phone testing: The first version of the cleanup still let more than 11 and 8 digits through on the phone. The likely reason is that when the cleaned value equals the previous value, the screen is not redrawn, so the extra characters stay in the field (the cause was not confirmed directly on the phone). So when the field’s text differs from the cleaned value, it is overwritten with
setNativeProps(a way to change the field’s text directly), andmaxLengthwas added to the code field. The number field has nomaxLengthbecause pasting010-1234-5678would cut off the last digit. - Reverting the font: On the phone, the bottom of some characters was clipped with the Noto Sans KR font (I could not narrow down which character), so I decided to go back to the previous font. The font-loading code was removed, and the shared text component now uses the device’s default font as is.
- Chosen approach and dropped options:
- Putting a timeout on each screen was dropped. Putting it in the one place every request passes through leaves no screen out.
- Checking only at submit time was dropped, because it cannot stop users from typing more than 11 digits.
- The phone normalization function itself does not truncate. If it did, a 12-digit input would be cut to 11 and pass as a valid-looking number.
- Why the PR went up three times: PR #137 was merged into the old branch of PR #136, which was already merged, so some commits never reached main. The same code was re-submitted as PR #139, and the later commits (the 15-second limit and others) as PR #140. This reason comes from the PR pages, not from the work log.
Checking
- Tests came first. In both pieces of work, tests were written first and seen failing before the implementation. #136 tested that all six input screens are a
ScrollViewinsideKeyboardAvoidingView, plus the login wording and touch-target sizes. #137 tested the cleanup function, the input limits, the progress text, and, with a fakefetchthat never answers and fake timers, that a request is not cut just before the limit and gives a connection error once the limit is exceeded. - Results: App tests passed (165 for #136, 175 for #137), and so did the type check. When many tests ran at once they timed out, so concurrency was limited to 2.
- Not checked:
- Whether the keyboard no longer hides the fields on a real Android device. The automated tests only check that the frame exists.
- Whether the error message appears after 15 seconds on a real phone with the server turned off.
- The explanation that the window does not shrink because the screen uses edge-to-edge (full screen) mode was not confirmed in the official documentation.
- iOS could not be built on Windows, so it was not checked.
- Server tests were not run because that computer lacked a required program; CI is the reference.
What I learned
- Put input limits inside the input field, and think about when the screen does not redraw. Cleaning the value did nothing when it equaled the previous value, so the extra characters stayed.
- Give waiting an end. Without a time limit, a request that never reaches the server waits forever and the user only sees a gray button. Putting the limit in the one place every request passes through leaves no screen out.
- Do not assert causes for problems only seen on the phone. The clipped-text problem was handled by reverting the font because the cause could not be narrowed down, and the suspected cause of the leaking input limit was written down as a suspicion.
- When stacking one PR on another, check the branch state after the lower PR is merged. Merging into an old branch keeps commits from reaching main.