Commit 95e34ce
Scout web app: names, pagination, inline management & OP.GG Riot ID search (#1271)
* feat(scout-for-lol): web app names, pagination, inline editing & typeahead
Improve the authenticated dashboard (packages/app):
- Show guild name in the workspace header (reuses guild.listManageable)
- Resolve Discord IDs to names everywhere via a new discord.resolveUsers
batch + serializer enrichment; audit page uses a useDiscordNames hook
- Cache the real Riot ID (gameName#tagLine) on Account with a 24h refresh
(fetch-on-demand, await-on-null/background-on-stale) and show it in the
account table; resolves schema TODO #186
- Cursor-paginate subscriptions, competitions and the audit log with a
reusable LoadMore + useInfiniteQuery; fix a pre-existing off-by-one in
the listPlayers cursor (used the peeked overflow id, dropping a row per
page boundary) and add a pagination integration test
- Move the light/dark/system theme picker into a proper navbar; add a
"Report a bug" support link (Discord invite)
- Full-scope inline editing on the player detail page: rename, link/unlink
Discord, add/edit/delete account (new player.updateAccount mutation)
- Typeahead comboboxes (Radix popover) for Riot ID and Discord user across
the add/invite/admin flows, backed by riot.searchKnownAccounts,
riot.resolveRiotId and discord.searchMembers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(scout-for-lol): navbar dropdown, hide guild id, 3-source Riot search, drop Admin tab
Round 2 of web-app polish (packages/app), addressing demo feedback:
- Navbar: brand "Scout" + "Guilds" on the left; an @username dropdown on
the right holding the theme selector, "Report a bug", and "Sign out"
(new components/user-menu.tsx on the Popover primitive)
- Hide the raw guild snowflake entirely in the workspace header — show only
the guild name
- Riot ID typeahead now has three suggestion sources: our own self-healing
SummonerIndex (new table; populated on confirmed Riot resolutions +
backfill from Account/PrematchParticipantFact, evicted on a true 404),
OP.GG's unofficial search (proxied via its Next.js server action,
fail-soft), and Riot's exact resolve to verify/canonicalize the pick.
The empty "no results" dropdown is gone (popover only opens with results)
- Remove the Admin tab: rename/merge/delete-player, link/unlink Discord,
and add/edit/delete/transfer account are now all inline on the player
detail page. Deleted admin-tools + the admin form components
The official Riot API has no partial-name search; OP.GG searches its own
crawled index. The OP.GG proxy is contained to src/lib/riot/opgg-search.ts,
never persists data unverified, and degrades to the other two sources if
OP.GG changes its build-tied action id.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(scout-for-lol): record round-2 web-app refinements
* feat(scout-for-lol): proxy LoL icons, suppress browser autocomplete, OP.GG self-heal
Round 3 polish on the Riot ID search:
- Suppress Chrome's native form-history dropdown overlapping our combobox
(randomized input name + autoCorrect/spellCheck off + 1p/lp ignore)
- Show the League profile icon next to each suggestion, proxied through a
new session-gated, host-allowlisted GET /api/summoner-icon route so the
browser never hotlinks OP.GG's CDN
- Make the OP.GG action id self-healing: keep the (deploy-resilient) seed id,
and on a stale id best-effort re-discover the current one from OP.GG's
webpack chunk bundle (createServerReference ids → probe), gated by a
cooldown and fully fail-soft
Note: empirically OP.GG keeps old action ids working across deploys, so the
seed is fairly resilient on its own; discovery is a best-effort fallback and
the field always degrades to our own index + Riot exact-resolve.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(scout-for-lol): record round-3 search polish + OP.GG findings
* feat(scout-for-lol): auto-seed the summoner index on startup (incremental)
backfillFromExisting now inserts only PUUIDs not already indexed (batched
createMany), so it's cheap to re-run, and it runs automatically on backend
startup (background, fail-soft) instead of being a manual one-off. The manual
script remains for ad-hoc runs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(scout-for-lol): address greptile P1/P2 review on search & backfill
- opgg-search: make action-id rediscovery non-blocking. A stale cached id
now kicks off discovery in the background and the current request
fails-soft to [] immediately, instead of awaiting a 30s+ crawl+probe on
the autocomplete request path.
- resolve/riot-search/add: propagate Riot's canonical gameName/tagLine out of
resolveRiotIdToPuuid so resolveRiotIdExact and the subscription add path
store/display Riot-canonical casing on first write, not user-typed input.
- summoner-index: stream PrematchParticipantFact in id-cursor batches instead
of findMany({distinct:[puuid]}), bounding memory on the startup backfill.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(scout-for-lol): log PR #1271 conflict + greptile fixes
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* style(scout-for-lol): prettier-format subscription-fields + PR #1271 log
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(scout-for-lol): finalize PR #1271 session log
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jerred Shepherd <claude@sjer.red>1 parent 8a7e9f0 commit 95e34ce
71 files changed
Lines changed: 4030 additions & 947 deletions
File tree
- packages
- docs
- logs
- plans
- scout-for-lol
- packages
- app
- src
- components
- onboarding
- ui
- hooks
- lib
- routes
- backend
- prisma
- migrations
- 20260619000000_add_account_riot_id
- 20260619010000_add_summoner_index
- scripts
- src
- database/competition
- discord/commands/subscription
- lib
- audit
- discord
- player-admin
- riot
- subscription
- testing
- trpc
- router
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 160 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments