feat: add scoreboard with player names, per-category leaderboards, and themed tables

Add player_name column to games (migration included), with regex-based
validation and anti-abuse sanitization. New /scoreboard page shows recent
games from localStorage, popular categories with play counts, and top-10
per-category leaderboards sorted by completion time. Also includes
two-click reverse word matching, base URL prefix support for reverse-proxy
hosting, BasePageHandler refactoring, themed table CSS for all 5 themes,
and comprehensive test coverage for player names and scoreboard API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mathew Sir Guest the best
2026-05-07 10:38:19 -06:00
co-authored by Claude Opus 4.6
parent 9319f08875
commit 36c3c712fe
27 changed files with 3038 additions and 24 deletions
+33
View File
@@ -0,0 +1,33 @@
import pytest
from app import make_app
@pytest.fixture
def app():
return make_app()
async def test_homepage_returns_200(http_server_client):
response = await http_server_client.fetch("/")
assert response.code == 200
async def test_game_returns_200(http_server_client):
response = await http_server_client.fetch("/game")
assert response.code == 200
async def test_howtoplay_returns_200(http_server_client):
response = await http_server_client.fetch("/howtoplay")
assert response.code == 200
async def test_about_returns_200(http_server_client):
response = await http_server_client.fetch("/about")
assert response.code == 200
async def test_scoreboard_returns_200(http_server_client):
response = await http_server_client.fetch("/scoreboard")
assert response.code == 200