Repository navigation
Read materialized player boards and accept Warden mode in army links #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Inline shared base data | ||
|
|
||
| Requires DevKit migration 021. Images, votes and downloads are stored on the shared `bases` row; `base_images` and `base_votes` are removed. Personal saves stay in `user_saved_bases`. | ||
|
|
||
| Dashboard create/edit/read, mobile library reads, bot vote/remove-vote, legacy resolution and image staging now use the inline fields. Existing response shapes remain unchanged, so App, Dashboard and Bot clients do not require a contract migration. Voter identities are not added to public responses. | ||
|
|
||
| Images use ordered URLs (up to four), with internal empty slots supported during legacy staging. Votes use a user-ID keyed JSON object holding vote and its existing update timestamp. Downloads retain their immutable first-download map. SQL updates change only the relevant field/key, so votes cannot overwrite downloads or images. | ||
|
|
||
| Cutover must drain old base traffic, apply 021, deploy this API and resume traffic. Old base handlers cannot run against 021 because their tables are removed. The existing leaderboard rollout prerequisites for migration 020 still apply. No production migration or deployment is part of these commits. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Player leaderboard snapshot rollout | ||
|
|
||
| The Town Hall and league endpoints keep their existing response shape and 500-row maximum. Instead of sorting `basic_player` per request, they read DevKit migration 020's `player_townhall_leaderboards` and `player_league_leaderboards`. Tracking refreshes both every six hours, with an extra refresh after its guarded Monday trophy reset. Clan display data still comes from `basic_clan`. | ||
|
|
||
| Deploy in this order: DevKit migration 020, Tracking population, then this API. Both materialized views must report `ispopulated=true` in `pg_matviews` first. There is no fallback to a live sorting query if the migration/population is missing. No production changes are performed by this PR. | ||
|
|
||
| TH snapshots sort ranked league descending, trophies descending, then tag. Exact league snapshots sort trophies descending, then tag. Unknown and unranked leagues are excluded; zero-trophy ranked players remain eligible. The snapshots cover TH 7–18 and league IDs 105000001–105000036. Live Legend endpoints are unchanged. | ||
|
|
||
| Army-link normalization now accepts and preserves Warden mode, for example `h2m1p16e5_41`. This fixes the API's matching validation gap alongside Tracking's fix. Family matching still ignores mode; no new response fields or database mode columns are introduced. | ||
|
|
||
| Validation: full unit suite, workspace typecheck/lint, and `public-data.test.ts` against the schema-owned disposable Timescale harness. The PostgreSQL test proves that a profile change does not alter the board until refresh, then does after refresh. Cloudflare guidance was followed by retaining the existing request-scoped SQL layer and parameterized values; no Worker bindings were added. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an accepted code contains otherwise-identical hero entries that differ only by mode, the comparator returns zero while the newly emitted value includes
mode, so input order leaks into the supposedly canonical result:h2m1-h2m0andh2m0-h2m1normalize differently. Because the normalized string is used for exactarmy_family_members.share_codelookups, a reordered equivalent query can incorrectly miss its family; include mode in the comparator or reject duplicate hero IDs.Useful? React with 👍 / 👎.