You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README and CLAUDE.md with all v0.9.0 features
README: add ARAM bench swap, win probability, overlay improvements
CLAUDE.md: full rewrite reflecting current architecture, commands,
patterns, data sources, and known issues
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+38-19Lines changed: 38 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,58 +6,77 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
6
6
7
7
```bash
8
8
# Start Tauri app in dev mode (Rust backend + Vite hot-reload frontend)
9
-
npm run tauri dev
9
+
pnpm tauri dev
10
10
11
11
# Build production binary
12
-
npm run tauri build
12
+
pnpm tauri build
13
13
14
14
# Frontend-only dev server (no Tauri shell, runs on localhost:1420)
15
-
npm run dev
15
+
pnpm dev
16
16
17
-
# Type-check + build frontend only
18
-
npm run build
17
+
# Type-check frontend only
18
+
npx tsc --noEmit
19
+
20
+
# Rust type-check only
21
+
cd src-tauri && cargo check
22
+
23
+
# Release a new version (bumps version in 3 files, commits, tags, pushes)
24
+
./scripts/release.sh 0.X.0
19
25
```
20
26
21
27
There are no tests configured in this project.
22
28
23
29
## Architecture
24
30
25
-
**QueryLoL Desktop** is a League of Legends companion app built with Tauri 2 (Rust backend) and React 19 (TypeScript frontend).
31
+
**QueryLoL Desktop** is a League of Legends companion app built with Tauri 2 (Rust backend) and React 19 (TypeScript frontend). Supports Windows and macOS.
26
32
27
33
### Backend (src-tauri/src/)
28
34
29
-
-**lib.rs** — Tauri app setup, command handlers, and the main `watcher_loop`/`poll_loop`. The watcher continuously detects the League client, and the poll loop (1s interval) tracks game phase transitions (lobby → champ select → in-game → post-game), triggering builds, recommendations, and auto-apply actions.
30
-
-**lcu.rs** — League Client Update (LCU) API integration. Connects via lockfile (`riot:password` + port over HTTPS with self-signed cert). Handles all client interactions: reading game state, applying runes/spells/items, pick/ban actions, match history, post-game stats.
31
-
-**opgg.rs** — OP.GG API integration (`https://lol-api-champion.op.gg/api`). Fetches builds, counters, ban suggestions, pick recommendations (scored 0-100), and game predictions with early/late phase analysis.
32
-
-**models.rs** — All serde-serializable data structures shared between backend and frontend.
-**lcu.rs** — League Client Update (LCU) API integration. Connects via lockfile (platform-specific paths for macOS/Windows). Handles: game state, applying runes/spells/items, pick/ban, match history, post-game stats, live game data, ARAM bench swap. Also contains `poll_live_game_data()` for the Live Client Data API (port 2999) and `compute_phase_stats()`/`compute_gold_timeline()` from snapshot data.
37
+
-**opgg.rs** — OP.GG API integration. Fetches builds, counters, ban suggestions, pick recommendations, game predictions, ARAM win rates.
38
+
-**models.rs** — All serde-serializable data structures. Key types: `AppState`, `LiveGameState`, `LivePlayerStats`, `PostGameStats`, `PlayerSnapshot`, `AramBenchChampion`.
33
39
-**config.rs** — Persistent user config (region, toggles, LP history) saved to `{app_data_dir}/config.json`.
34
40
35
41
### Frontend (src/)
36
42
37
-
-**App.tsx** — Single-file monolith containing all components (~1500 lines). No component splitting — everything from the LP chart to post-game scoreboard lives here.
38
-
-**App.css** — Dark theme styled with CSS variables (no preprocessor). League of Legends aesthetic with gold/blue/red accents.
43
+
-**main.tsx** — Entry point. Detects overlay vs main window via `getCurrentWebviewWindow().label` and renders the appropriate component.
44
+
-**App.tsx** — Single-file containing all components (~2900 lines). Includes: champion select views, live game with spell tracking, post-game analysis, overlay, tooltips, ARAM bench, improvement panel, matchup analysis, damage composition, win probability model, and all static data (champion traits, power curves, elo benchmarks, spell cooldowns).
45
+
-**App.css** — Dark theme with CSS variables. League of Legends aesthetic with gold/blue/red accents. Custom scrollbar, overlay styles, position icons.
39
46
40
47
### State Flow
41
48
42
49
1. Rust backend detects game phase change via LCU polling
5. Overlay window polls state via `invoke("get_state")` every 1s as fallback
46
54
47
-
All HTTP requests happen in Rust only — the frontend never calls external APIs directly. Frontend communicates with backend via `invoke("command_name", { args })` for user-initiated actions (apply build, pick/ban, change settings).
55
+
All HTTP requests happen in Rust only. Frontend communicates with backend via `invoke("command_name", { args })` for user-initiated actions.
| CommunityDragon | Rank emblems, stat shard icons, position icons |
76
+
77
+
## Known Issues
78
+
79
+
-**macOS Accessibility**: Overlay (TAB hold) requires Accessibility permission. In dev mode, the binary changes on each compile, invalidating the permission. In production (DMG), it persists.
80
+
-**LCU match details**: `timeline.lane` field is unreliable for position detection. We use Smite detection + role heuristics as fallback.
81
+
-**LCU ranked stats**: The endpoint returns 0 losses for other players — we hide W/L when data is incomplete.
82
+
-**OP.GG ARAM tier list**: Returns different JSON format than ranked — we fallback to the ranked tier list with ARAM position filter.
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ Built with **Tauri** (Rust) + **React** (TypeScript). Lightweight (~15MB), no Ov
36
36
-**One-click pick/ban** — click any recommendation or ban suggestion to lock it in
37
37
-**Auto-lock** — optionally auto-lock your champion selection
38
38
-**Full draft visualization** — ally/enemy picks, bans, and positions with role icons displayed in a 3-column layout
39
+
-**ARAM bench** — shows available bench champions sorted by ARAM win rate, click to swap
39
40
40
41
### Lobby
41
42
-**Improvement priorities** — top 3 areas to improve based on your ranked history vs elo benchmarks, with visual bars and actionable advice
@@ -61,7 +62,8 @@ Built with **Tauri** (Rust) + **React** (TypeScript). Lightweight (~15MB), no Ov
61
62
-**Power spike alerts** — "400g to [item]" for your next core item, and "Enemy completed [item]" when enemies buy key items
62
63
-**Objective timers** — Baron buff (3:00), Elder Dragon buff (2:30), and Dragon Soul tracking with countdown and team indicator
63
64
-**Objective feed** — dragons, baron, herald, turrets, inhibitors, and multikills with timestamps
64
-
-**In-game overlay** — hold TAB to show a compact overlay with gold diff, enemy KDA/spells, and objective timers (Windows, borderless windowed mode)
65
+
-**Win probability** — real-time win % estimate based on gold diff, game time, dragons, and baron (displayed in gold bar and overlay)
66
+
-**In-game overlay** — hold TAB to show a compact overlay with win probability, lane gold diffs, and objective timers (borderless windowed mode, configurable position)
65
67
-**Player profiles** — click any player to view their match history in an overlay
66
68
67
69
### Post-Game Analysis
@@ -75,7 +77,7 @@ Built with **Tauri** (Rust) + **React** (TypeScript). Lightweight (~15MB), no Ov
75
77
-**MVP badge** — awarded to the top performer based on a composite score
76
78
-**Multikill badges** — triple, quadra, and penta kill indicators
77
79
-**Final items** — complete end-game item build for each player with tooltips
78
-
-**Gold advantage timeline** — SVG chart showing gold diff over time with death markers
80
+
-**Gold advantage timeline** — SVG chart showing gold diff over time with death markers and win probability curve overlay
79
81
-**Elo comparison** — your CS/min, vision/min, KDA, damage share, KP, and gold/min compared against your rank's average with percentage deltas
80
82
-**Performance by phase** — CS/min, gold/min, and KDA broken down by early (0-14m), mid (14-25m), and late (25m+) game phases
81
83
-**Player profiles** — click any player name to view their ranked info and match history
0 commit comments