Skip to content

fix(frontend): the login screen crashes on master, LoginForm lost its notice prop in merge 990b93f3 #893

Description

@alex-dembele

Problem

Nobody can sign in on master. The login screen renders the 500 error page ("Une erreur est survenue") instead of the form. The browser console shows:

ReferenceError: notice is not defined
    at LoginForm (src/features/auth/AuthScreen.tsx:102)

npx tsc -b --noEmit fails on master with the same cause:

src/features/auth/AuthScreen.tsx(45,20): error TS2322: Property 'notice' does not exist on type 'IntrinsicAttributes & { onRegister: () => void; }'.
src/features/auth/AuthScreen.tsx(102,38): error TS2304: Cannot find name 'notice'.

Cause

#872 added a notice prop to LoginForm (bce734cb: function LoginForm({ notice = '', onRegister }: { notice?: string; ... })). Then master was merged into the #872 branch (990b93f3), and that merge resolved the signature back to function LoginForm({ onRegister }: { onRegister: () => void }). The caller (<LoginForm notice={notice} …/>) and the body (useState(notice)) kept the prop. PR #880 brought this to master on 2026-10-02 at 14:05, and every master commit since then carries it (checked up to cefe453d).

Found during the live pass of #700 (frontend/e2e/session-tabs.spec.ts could not find login-email).

Acceptance criteria

  1. /login renders the sign-in form on master with no console error.
  2. npx tsc -b --noEmit in frontend/ passes.
  3. The notice fix(frontend): the MFA code screen does not tell users to sign in again or wait after too many wrong codes #872 introduced still reaches the form: after RegisterForm calls onRestart(message), the login form shows that message.

Definition of Done

  • Criteria 1–3 verified live in a browser, figures pasted
  • Fix is the restored signature only, no other change

Activity

  1. added this to the trust-v1 milestone on Oct 7, 2026
  2. added
    area:foundationProduct and platform foundations
    priority:P0Blocking: nothing else ships until this closes
    type:bugSomething is broken
    priority:P0-criticalProduction broken or exposed — work now
    tier:0-trustTrust: security, isolation, evidence integrity
    on Oct 7, 2026
  3. alex-dembele commented on Oct 7, 2026

    @alex-dembele
    MemberAuthor

    frontend-react — 2026-10-07

    Done: frontend/src/features/auth/AuthScreen.tsx, LoginForm gets its signature ({ notice = '', onRegister }: { notice?: string; ... }) back. Added a regression test to frontend/src/features/auth/__tests__/signup.test.tsx: sign-up, enrolment on an expired token, back to the sign-in form showing the reason. PR #894.

    Verified:

    • /login in Chromium (Vite on the branch): before, the 500 page with ReferenceError: notice is not defined; after, the form is visible with 0 console errors. Screenshot .playwright-mcp/893-login-fixed.png.
    • npx tsc -b --noEmit: before, TS2322 + TS2304; after, passes.
    • npx vitest run src/features/auth: before, 27 failed; after, 121 passed.
    • npx vitest run: 112 files, 1034 passed.
    • The new test fails without the fix (notice is not defined) and passes with it.

    Criteria: 1 ✅ · 2 ✅ · 3 ✅ (vitest; reaching the expired-enrolment path live would mean waiting 15 minutes on a real token, which was not done)

    Next: review and merge PR #894. It also unblocks the Playwright run of #700 (PR #896).

    Blocked on: nothing

  4. added a commit that references this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:foundationProduct and platform foundationsarea:frontendReact, /srcpriority:P0Blocking: nothing else ships until this closespriority:P0-criticalProduction broken or exposed — work nowstatus:in-reviewPR opentier:0-trustTrust: security, isolation, evidence integritytype:bugSomething is broken

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions