Repository navigation
feat: a Sign in with Lichess button in the header, and a sign-in prompt after a game - #362
Merged
Merged
Conversation
…n" text
The header's sign-in was small grey text ("Sign in" on a desktop, at the
bottom of the phone menu), easy to miss, and didn't say it was Lichess.
It's now a bordered "Sign in with Lichess" button with Lichess's logo
(LichessSignInButton, shared), in the desktop header and the phone menu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a game against Maia ends, a guest now sees, under Analyze game and Play again: "Sign in to keep your rating and games on any device, and to appear on the leaderboard." with a Sign in with Lichess button (source game_over). Each claim is what the backend does: a first Lichess sign-in keeps the guest's account (rating and games), the account is then the same on any device, and the leaderboard lists only Lichess accounts. The sign-in comes back to /play rather than the game's page, which without its game would start a new one. connectLichess takes that optional path. Signed-in players, and pages before the account has loaded, don't see the prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…claude/sign-in-prompts # Conflicts: # src/lib/analytics.ts
This branch was successfully deployed
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.
Stacked on #359 (it uses
connectLichess(source)and its events). Merge #359 first; this PR then retargets to main.Why
About 82% of people who play are guests (88% on phones). Only home-page sign-in clicks were measured, and most of those didn't end with the visitor playing signed in. Two changes, each with its own
source, so #359'slichess_sign_in_completedcan be counted for each.1. Header: "Sign in with Lichess" button (
source: header,header_menu)The header's sign-in was small grey "Sign in" text: top right on a desktop, at the bottom of the phone menu. It was easy to miss and didn't say it meant Lichess. It's now a bordered Sign in with Lichess button with Lichess's logo, in both places.
LichessSignInButtonis shared.2. After a game: a prompt for guests (
source: game_over)When a game against Maia ends, a guest sees this under Analyze game / Play again:
Each claim matches the backend (
auth/lichess_oauth.py,cron_update_leaderboards):lichess_id.Someone who had already signed in elsewhere switches to that account; the wording doesn't promise a merge.
The sign-in comes back to /play (the setup dialog). The game's page, without its game, would start a new one.
connectLichesstakes that optional path. The prompt isn't shown to signed-in players or before the account has loaded.Checked
Production build in Chromium (
loadperf/tools/sign-in-prompts.mjs, account and game requests faked):auth/lichess_login?redirect_url=…/play.PlayControls.test.tsx: guests only, after the game only, and the return path.npm test(268), tsc and eslint pass.Measuring it
Once #359 is live, compare
lichess_sign_in_completedbysource(game_over,header,header_menu,homepage,analysis_lichess_tab) with the week before.🤖 Generated with Claude Code