Skip to content

fix(TASK-24847): show Log in as a button at once on the app landing, drop the iOS auto login - #4085

Merged
kushagrasarathe merged 3 commits into
mainfrom
hotfix/TASK-24847-landing-login-visible
Nov 13, 2026
Merged

kushagrasarathe merged 3 commits into
mainfrom
hotfix/TASK-24847-landing-login-visible

Conversation

@kushagrasarathe

@kushagrasarathe kushagrasarathe commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

P1 on the native app landing, since 0311620 (ui#3972, Sprint 167 / v1.25.0).

  • Android (Konrad's report): no Log in button for several seconds. The landing hid Log in until the passkey check answered. The plugin answers unknown on Android below 14, without permission, or when Credential Manager is slow, and unknown was ignored, so Log in appeared only at the 5 s deadline.
  • iOS (TASK-24847 video): the system Sign In sheet keeps popping up during signup. Every Landing mount started a new automatic passkey login, so going back from Claim username opened the sheet again, and a pending attempt could open the sheet over the username step.

What changed

src/components/Setup/Views/Landing.tsx

  • On the native layout, Log in is always the full secondary button again, as before 0311620. It shows from the first frame, also during hydration.
  • The Android passkey availability check is removed from JS, because it only chose button or link.
  • The iOS automatic passkey login is removed. The only way to the passkey prompt is a tap on Log in. Evidence (PostHog): returning iOS devices in the same period log in at the same rate with and without the automatic prompt (57.6% old bundle vs 58.0% new bundle); 90% of automatic logins replaced a Log in tap; and the automatic attempt added a race where the sheet could open over the username step.
  • Removed with it: the mount effect, the auto-login refs and state, PASSKEY_CHECK_TIMEOUT_MS, and the SetupDocLink onBeforeOpen hook. Log in, Sign up, the recovery drawer and the recovery link call login / signUp directly. Sign up is disabled on native while a login is in flight.
  • src/utils/landing-passkeys.ts is deleted (nothing uses supportsIOSImmediateLogin or cancelIOSImmediateLogin any more).
  • src/hooks/useLogin.tsx, src/hooks/useZeroDev.ts: the immediateSignal / immediateDeadline / cancelSignal options and the login_auto ceremony purpose are removed, because only the automatic login passed them. The manual login path is unchanged.

Unchanged: Sign up, the recovery link and drawer, error handling, analytics, and the web layout (blockSignup).

Delivery

JS only, no native change. git diff --name-only origin/main...HEAD lists nothing under android/, ios/, patches/ or capacitor.config.ts. An OTA update reaches every affected app on v1.25.0 or later.

Dead native code left

These stay until a store build, because removing them changes the binary or a native patch:

  • The Java PasskeyAvailabilityPlugin is no longer called from JS.
  • The immediateLogin bits in patches/@capgo__capacitor-passkey.patch (getConfiguration().immediateLogin, cancelRequest).
  • The immediateSignal / immediateDeadline support in patches/@zerodev__webauthn-key.patch.
  • JS: the cancel option of guardPasskeyCeremony and CeremonyCancelledError in src/utils/passkeyCeremony.utils.ts have no caller now. Left in place because they are shared ceremony code.

Tests

  • Landing.passkeys.test.tsx: the iOS automatic login tests and the landing-passkeys / landing-auto-login mocks are deleted with the code. Cases:
    • On android, ios, old ios and hydrating, the secondary Log in button is visible and enabled at once.
    • On iOS native, no passkey ceremony starts on mount (10 s of timers); a tap on Log in starts it once.
    • On native, Log in and Sign up are disabled while a login is in flight; on the web Sign up stays enabled.
    • Keep-web users see the full Log in button and login starts only on tap.
  • Landing.test.tsx: the landing-passkeys mock is removed.
  • Gate on the sandbox: prettier, npm run typecheck, npm test -- --maxWorkers=4 (1331 suites, 19541 passed, 5 skipped) and npm run build are all green.

Screenshots

375×667, logged out, Playwright with faked native bridges. Before = origin/main, after = d92808e. In the before shots, a "SIMULATED iOS system Sign In sheet" overlay marks where the real iOS sheet would open by itself. Assets live on branch pr-assets-4085, deleted after merge.

Android with a Peanut passkey

Before After
0.5 s
2 s
6 s

Android without a passkey

Before After
0.5 s
2 s
6 s

Android 13 and older (check unsupported)

Before After
0.5 s
2 s
6 s

Android, slow passkey check

Before After
0.5 s
2 s
6 s

iOS, automatic login build

Before After
0.5 s
2 s
6 s

iOS, older app build

Before After
0.5 s
2 s
6 s

Android, back from the username step

Before After
first landing (2 s)
username step
back on landing, 0.5 s
back on landing, 2 s
back on landing, 6 s

iOS, back from the username step

Before After
first landing (2 s)
username step
back on landing, 0.5 s
back on landing, 2 s
back on landing, 6 s

Web browser

Before After
0.5 s
2 s
6 s

Overlap

ui#4077 also edits the iOS auto login in Landing.tsx; whichever merges second needs a rebase.

🤖 Generated with Claude Code

…auto login once

Since 0311620 (ui#3972) the native landing hid Log in until the passkey
check answered or 5 s passed. Android often answers 'unknown' (below 14,
no permission, slow Credential Manager), so Konrad saw no Log in for
seconds. Each Landing mount restarted the check, so going back from
Claim username hid it again, and on iOS opened the system sign-in sheet
again; the unmount cleanup did not retire that attempt, so its sheet
could show over the next step.

Log in now starts as the link and upgrades to the full button only when
Android confirms a passkey before the deadline. The iOS automatic login
runs at most once per app launch, never after a Sign up or Log in tap,
and unmount aborts it and frees the native slot. The once-per-launch
module matches the one in ui#4077 so the two merge cleanly.
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
peanut-wallet Ready Ready Preview Nov 13, 2026 6:41am UTC

Request Review

@notion-workspace

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 11195.97 → 11191.07 (-4.9)
Findings: -2 net (+14 new, -16 resolved)

🆕 New findings (14)

  • high hotspot — src/hooks/useZeroDev.ts — 71 commits, +806/-553 lines since 6 months ago
  • high complexity — src/components/Setup/Views/Landing.tsx — CC 34, MI 60.45, SLOC 144
  • medium high-mdd — src/hooks/useZeroDev.ts:87 — useZeroDev: MDD 77.8 (uses across many lines from declarations)
  • medium high-dlt — src/hooks/useZeroDev.ts:87 — useZeroDev: DLT 74 (calls 74 distinct functions — high context load)
  • medium high-mdd — src/components/Setup/Views/Landing.tsx:35 — LandingStep: MDD 65.6 (uses across many lines from declarations)
  • medium high-mdd — src/hooks/useZeroDev.ts:336 — : MDD 34.4 (uses across many lines from declarations)
  • medium high-dlt — src/components/Setup/Views/Landing.tsx:35 — LandingStep: DLT 32 (calls 32 distinct functions — high context load)
  • medium complexity — src/hooks/useLogin.tsx — CC 12, MI 63.1, SLOC 63
  • low high-dlt — src/hooks/useZeroDev.ts:336 — : DLT 24 (calls 24 distinct functions — high context load)
  • low high-dlt — src/hooks/useZeroDev.ts:255 — handleLogin: DLT 22 (calls 22 distinct functions — high context load)
  • low high-mdd — src/hooks/useLogin.tsx:31 — useLogin: MDD 17.5 (uses across many lines from declarations)
  • low high-mdd — src/utils/webauthn-ceremony-telemetry.ts:194 — commit: MDD 16.6 (uses across many lines from declarations)
  • low high-mdd — src/hooks/useZeroDev.ts:255 — handleLogin: MDD 12.3 (uses across many lines from declarations)
  • low high-mdd — src/utils/webauthn-ceremony-telemetry.ts:271 — trace: MDD 11.4 (uses across many lines from declarations)

✅ Resolved (16)

  • src/components/Setup/Views/Landing.tsx — CC 74, MI 59.79, SLOC 262
  • src/hooks/useZeroDev.ts — 70 commits, +795/-526 lines since 6 months ago
  • src/components/Setup/Views/Landing.tsx:42 — LandingStep: MDD 86.4 (uses across many lines from declarations)
  • src/hooks/useZeroDev.ts:87 — useZeroDev: MDD 82.0 (uses across many lines from declarations)
  • src/hooks/useZeroDev.ts:87 — useZeroDev: DLT 75 (calls 75 distinct functions — high context load)
  • src/components/Setup/Views/Landing.tsx:42 — LandingStep: DLT 46 (calls 46 distinct functions — high context load)
  • src/hooks/useZeroDev.ts:352 — : MDD 34.4 (uses across many lines from declarations)
  • src/components/Setup/Views/Landing.tsx:42 — CC 15 SLOC 96
  • src/hooks/useLogin.tsx — CC 13, MI 62.22, SLOC 67
  • src/hooks/useZeroDev.ts:352 — : DLT 24 (calls 24 distinct functions — high context load)
  • src/hooks/useZeroDev.ts:255 — handleLogin: DLT 23 (calls 23 distinct functions — high context load)
  • src/hooks/useLogin.tsx:31 — useLogin: MDD 18.0 (uses across many lines from declarations)
  • src/utils/webauthn-ceremony-telemetry.ts:195 — commit: MDD 16.6 (uses across many lines from declarations)
  • src/components/Setup/Views/Landing.tsx:78 — : MDD 16.2 (uses across many lines from declarations)
  • src/hooks/useZeroDev.ts:255 — handleLogin: MDD 15.5 (uses across many lines from declarations)
  • src/utils/webauthn-ceremony-telemetry.ts:272 — trace: MDD 11.4 (uses across many lines from declarations)

📈 Painscore deltas (top movers)

File Before After Δ
src/components/Setup/Views/Landing.tsx 11.1 9.8 -1.3
src/utils/landing-passkeys.ts 3.6 0.0 -3.6

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • ✅ unit: 19546 ran, 0 failed, 0 skipped, 7.4m

📊 Coverage (unit)

metric %
statements 87.7%
branches 80.6%
functions 81.9%
lines 89.2%
⏱ 10 slowest test cases
time test
🐢 17.8s scripts/__tests__/screens-adapter.test.js › runs the existing synthetic screen adapter Node acceptance suite
🐢 11.0s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with pointer
🐢 10.2s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with Space
🐢 9.7s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › keeps unavailable Argentina searchable and opens its residence explanation with Enter
🐢 9.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › Network failure keeps loading while retries remain, then shows the generic error
🐢 5.7s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › preserves ordinary Argentina selection for residence null
🐢 5.4s scripts/__tests__/indexable-urls.test.ts › excludes missing locale files, drafts, redirects, and retired pages from crawl and submission lists
🐢 5.4s scripts/__tests__/signup-attribution-paths.test.ts › includes newly published articles and locale fallbacks without editing the manifest
4.9s src/features/deposit-accounts/__tests__/AddMoneyArgentinaCountry.acceptance.test.tsx › preserves ordinary Argentina selection for residence AR
4.0s src/app/(mobile-ui)/qr-pay/__tests__/qr-pay-states.test.tsx › MANTECA_MERCHANT_RECENT_REFUND fails fast with copy that names the real cause
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🖼 Visual diff — 8 screens moved

13 of 558 shots changed · 545 identical · baseline 7e3d0d5 → head d92808e

worst % screen widths
8.00% avatar-picker 320, 430
4.51% history-request-pot-closed-short 430
3.03% paperwork-verification-closed-unknown 320, 430
2.97% paperwork-verification-closed-nationality 320, 430
2.72% paperwork-verification-closed-tax 320, 430
2.34% paperwork-verification-closed-residence 320, 430
1.10% full-maintenance 320
0.08% home-card-info-failed 430

job summary · before/after/diff images — artifact

Fixture screenshots, no backend. Advisory — this check never blocks a merge. Posted from the default branch by ds-shots-comment.yml; the report it renders is untrusted data.

…p landing

Kush decided Log in must never change shape. The Android passkey check only chose
between the button and a link, so it goes too. The native PasskeyAvailability plugin
stays until a store build, because removing it changes the binary.
returning iOS devices log in at the same rate with and without the auto prompt
(57.6% old bundle vs 58.0% new), 90% of auto logins only replaced a Log in tap,
and the auto attempt could open the sheet over the username step. Log in is now
the only path to the passkey prompt, so the auto-login state, the per-launch flag,
the iOS capability probe and the immediate/cancel options in useLogin/useZeroDev go.
@kushagrasarathe kushagrasarathe changed the title fix(TASK-24847): show Log in at once on the app landing, run the iOS auto login once fix(TASK-24847): show Log in as a button at once on the app landing, drop the iOS auto login Nov 13, 2026
@kushagrasarathe
kushagrasarathe marked this pull request as ready for review November 13, 2026 08:35

@chip-peanut-bot chip-peanut-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chip review — no blocking findings — this is not an approval

No findings.

Findings

  • MAJOR · src/components/Setup/Views/Landing.tsx:248 · Copy now wrong: product/app.md still says Log in is hidden on Android without a passkey, appears as a link after 5 seconds, and iOS opens a sign-in sheet by itself
    After this change: On the app welcome screen, Log in is always a visible button below Sign up on every device, and no passkey sign-in sheet opens on its own when the screen appears.

These places still say otherwise:

  • mono:product/app.md:80 — "1. Welcome — "Earn anywhere. Spend worldwide." The user taps Sign up. In the app, Log in depends on the device. On Android it shows as a button when the phone has a saved Peanut passkey and stays hidden when the phone reports none. On i" → 1. Welcome — "Earn anywhere. Spend worldwide." The user taps Sign up. In the app, Log in is always a button below Sign up, on Android, iOS and web alike. Nothing opens a passkey sign-in sheet on its own when the screen appears; the user

Fix them in this pull request, or say where the fix goes. mono: copy ships to mono main as its own content change, never inside a code PR.

Checked clean

  • Confirmed the supplied head SHA and exact merge base; reviewed the native landing, login hooks, removed auto-login path, and updated tests.
  • Checked the design-system button guidance; the changed secondary login action uses the existing Button component.
  • Unit and typecheck passed at this SHA. The ds-shots regression failure is in the unrelated marketing-directory viewport spec, outside the changed setup/auth files.

Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.

Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.

Copy check by claude-haiku-5-5: 1 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.

Exact head: d92808eae255 · Context: repo, design · Took 3m

Comment thread src/components/Setup/Views/Landing.tsx Resolved
@kushagrasarathe
kushagrasarathe merged commit bfe2e73 into main Nov 13, 2026
83 of 84 checks passed
innolope-dev added a commit that referenced this pull request Nov 13, 2026
… into the release

Conflicts in Landing, useLogin, useZeroDev and the Landing tests: main's
behaviour wins on Log in (always the secondary button, no passkey check
wait) and on the dropped iOS automatic login; the release keeps the
Welcome headline test, recovery after a failed login, the signup draft
reset and the username hold. The once-per-launch auto-login helper and
the landing passkey helpers had no callers left and are removed.

This branch was successfully deployed

1 active and 1 inactive deployments
content-publish — d92808ea Deployed Nov 13, 2026 by kushagrasarathe via approve-and-merge #8024
Preview — d92808ea Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants