Repository navigation
fix: implement sign-in modal wired to auth login/register - #1450
Merged
Conversation
|
@favourgit Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
chinweobtagaz
added a commit
that referenced
this pull request
Oct 18, 2026
…1454) * fix(frontend): restore type-check and lint after the latest merges - SignInModal: #1450 wired AuthGate and Header to a sign-in modal but never added it (the file was still a commented-out stub). Implement it against authContext login/register, accepting both open/onOpenChange and isOpen/onClose, with the test ids the sign-in e2e specs use. - Header: header-sign-in / header-username test ids; show the username. - authContext: fix the base644 typo in decodeJWT and a stray quote (#1450). - PlayGameEngine (#1449): pass ReconnectionBanner the isDisconnected flag it expects; ConnectionStatusIndicator takes optional reconnectAttempts, latency and className. * fix(frontend): make the Playwright E2E suite pass - Sign in: the app shell (ClientRoot) never rendered Header, so no page had a sign-in button. Add AuthButton (header-sign-in / header-username) to the shell; mock **/auth/login in both sign-in specs (the app calls $API_BASE/v1/auth/login, which neither mocked URL matched). - Landing: label the bots button so both /play bots/ and /play vs bot/ match. - Watch: target the 'Live games lobby' region (two regions matched). - Staking: sendXLM's fallback resubmitted the raw XDR string, which always threw "reading 'type'" and hid the real error; drop it. The Horizon mock now includes _links, which stellar-sdk needs to expose data_attr for its memo-required check. - Game vs bot: squares are labelled 'e4, White Pawn' / 'e4, empty'. * ci(frontend): add Linux screenshot baselines; set the test escrow at build time - Chessboard visual-regression baselines, rendered by the CI runner. - NEXT_PUBLIC_STAKING_ESCROW_ADDRESS is inlined by next build, so setting it only on the Playwright webServer left the staking spec with 'Staking escrow is not configured.' * test(e2e): use the settled emerald/Staunton screenshot as its baseline
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.
Overview
This PR restores the ability to sign in and create an account.
SignInModalwas fully commented out and nothing in the app calleduseAuth().loginorregister, so every auth-gated feature (dashboard Elo history, PGN archive, session manager, tournament registration) was unreachable. This change implements the modal, wires it into the header and an auth gate, and adds an e2e test that signs in against a mocked API.Related Issue
Changes
🔐 Sign-in / Create-account Modal
[MODIFY]
frontend/context/authContext.tsxlogin()andregister()are exposed and callable from the UI (per the issue's referencedauthContext.tsx:82-145), so the modal can drive real auth state instead of the previously unreachable paths.[ADD]
frontend/components/AuthGate.tsx[MODIFY]
frontend/components/Header.tsx🧪 E2E Coverage
frontend/e2e/sign-in.spec.tslogin()path works end to end.Verification Results
useAuth().loginandregisterHeader.tsxplusAuthGate.tsxfor auth-required pagesfrontend/e2e/sign-in.spec.tsCloses #1337