chore(followups): post-batch cleanup from 2026-05-24 review - #592
Merged
Conversation
Folds in the low-risk fold-in items captured in `pr_followups_2026_05_24.md` after the 19-PR batch review/merge: - Delete `PR_BODY.md` from the repo root (slipped in via #493). - Fix `EmbedContributionDay` test mocks in `renderIsometric3DSvg.test.ts` and `renderProfileEmbedSvg.test.ts` — both were missing the `totalTokens`/`totalCost` fields that #584 added to the type, so `bunx tsc --noEmit` had been red on main since the embed-templates PR. Both files type-check clean now. - Add a precedence-rule comment above `userHasToggledSort` in `LeaderboardClient.tsx` so the URL-`sortBy` → user-click handoff semantics survive future refactors. Each SortOption.onClick relies on flipping this ref; removing those lines silently regresses the URL param into a permanent override. - Document the `schemaVersion: 2` value introduced in `getSubmitDevice` with a comment listing all three known schema versions and the `GREATEST()` invariant on the submissions row. - Add a "vendor-reported" note to the README's Trae section explaining that cost figures come from Trae's `dollar_float` rather than tokscale's pricing engine, and a parallel disclaimer in the Subscription Usage section for the same reason. Constraint: keep the PR scope to safe, behavior-preserving changes Rejected: bundle env-overridable thresholds + ms/s normalization | both require design discussion and were left as separate followups Rejected: add last-owner-cannot-be-demoted unit test | needs a non-trivial mocking surface for the role route; production code is already correct on main Confidence: high Scope-risk: narrow Directive: do NOT remove the `userHasToggledSort.current = true;` lines in any SortOption.onClick — the comment now explains why Not-tested: README rendering (markdown only)
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Folds in the low-risk, behavior-preserving fold-in items captured during the 2026-05-24 batch review of #517 / #524 / #528 / #543 / #545 / #555 / #563 / #582 / #584 / #493.
Nothing here changes runtime behavior — they're test fixes, comments, README notes, and one stray-file deletion.
PR_BODY.mdfrom repo roottotalTokens/totalCosttoEmbedContributionDaymocks inrenderIsometric3DSvg.test.tsandrenderProfileEmbedSvg.test.tsuserHasToggledSortURL-vs-click precedenceschemaVersion: 2meaning ingetSubmitDevicedollar_floatWhy not bundle the rest?
The remaining followups from
pr_followups_2026_05_24.mdare either design discussions or investigations rather than concrete patches:rankTotalcache → investigation (probably needs profiling)qrcodedeps → dep change, separateEach can become its own focused PR.
Test plan
bunx tsc --noEmitinpackages/frontendreturns zero errors (was 11 before this PR — all from the embed test mocks)PR_BODY.mdVerification commands
Summary by cubic
Post-batch cleanup to fix broken embed tests, add clarifying comments, add README disclaimers, and remove a stray file. No runtime behavior changes.
Bug Fixes
EmbedContributionDaymocks withtotalTokens/totalCostsopackages/frontendbunx tsc --noEmitis clean (renderIsometric3DSvg.test.ts,renderProfileEmbedSvg.test.ts).Refactors
LeaderboardClient.tsx(userHasToggledSortguard).schemaVersion: 2and theGREATEST()invariant inapi/submit/route.ts.dollar_floatand Subscription Usage quotas.PR_BODY.mdfrom repo root.Written for commit 36247b2. Summary will update on new commits. Review in cubic