build_leaderboard, player_session_series, and session_breakdown_series
in the player detail and players routes were all called without
league.break_even_cents, so win/loss/even classification always used
the $1.00 default regardless of per-league settings.
Migration 0003_league_settings was chained to 0002 but the DB was already
at 0003_site_admin (an applied migration with no version file). Added a stub
for 0003_site_admin to satisfy the chain and updated the down_revision on
0003_league_settings accordingly. Columns eligible_min_sessions and
break_even_cents now apply cleanly on top of the existing schema.
Add two configurable leaderboard settings per league, replacing the global
constants with per-row DB columns:
- eligible_min_sessions (default 3): minimum sessions before a player ranks
on the main leaderboard rather than showing as provisional
- break_even_cents (default 100 = $1.00): sessions within ±this of $0 net
are classified as break-even rather than a win or loss
Changes:
- Migration 0003 adds both columns with server defaults for existing leagues
- League DB model gains eligible_min_sessions and break_even_cents columns
- net_result_bucket() and build_leaderboard() accept optional tolerance param
- summarize_player_runs() passes tolerance to net_result_bucket for streaks
- League leaderboard route reads values from the league row instead of config
- League settings form exposes both fields with validation (1-100 sessions,
$0.00-$100.00 threshold)
Add a search bar to the sessions list panel that filters rows in real time.
Searches display label, ISO date, month/year, and session notes. The count
badge updates to show matching/total; a no-results message appears when the
query has no matches.