fix: mobile moves-by-rating freeze and npm test exit code - #315
Open
sushanth-dev wants to merge 2 commits into
Open
sushanth-dev wants to merge 2 commits into
sushanth-dev wants to merge 2 commits into
Conversation
MovesByRating freezes its displayed series unless it is given a positionKey, so the mobile call site in the analysis page kept rendering the starting position's probabilities. Desktop was unaffected because AnalysisSidebar already passes positionKey; mobile did not. Pass it under the same guard used for moves and colorSanMapping. Refs CSSLab#291 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
npm test ran jest with no file matching testMatch, so it printed "No tests found" and exited 1. The CI test job was deleted to work around that. Jest's own suggested --passWithNoTests makes the script report the truth instead: the suite runs and reports zero tests. Refs CSSLab#177 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@sushanth-dev is attempting to deploy a commit to the Maia Platform Team on Vercel. A member of the Team first needs to authorize it. |
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.
Two small, independent fixes for open issues.
#291 Moves by rating not updated in mobile view
MovesByRatingdeliberately freezes its displayed series and only re-syncs whenpositionKeychanges:The mobile call site in
src/pages/analysis/[...id].tsxpassedmovesandcolorSanMappingbut notpositionKey, so that guard short-circuited on every render and the chart kept showing the starting position's probabilities. The desktop path is unaffected becauseAnalysisSidebaralready passespositionKey. This passes it on mobile too, under the same guard already used for the other two props.Verified in a browser by mounting the component twice against identical, changing
moves. WithoutpositionKeythe Y axis stayed at 0-60% and the area paths were byte-identical after the position changed, which is the reported freeze. WithpositionKeythe axis moved to 0-100% and the paths changed.I could not exercise the real analysis flow end to end: every
dock2.csslab.ca/api/*endpoint currently returns 404, including/api/v1/analysis/analysis_list/FkgYSri1, so the page redirects to/401locally.#177 CI Passes with errors?
npm testran barejest, which found no file matchingtestMatchamong 240 checked files and exited 1. Commit93b3482removed the CI test job to work around that. Jest's own suggested--passWithNoTestsmakes the script report the truth instead: the suite runs and reports zero tests.npm testnow exits 0.This only fixes the script. Re-adding a test step to
.github/workflows/ci.ymlis left to the maintainers, since removing it was deliberate.Verification
npm test: was exit 1 with "No tests found", now exit 0npx tsc --noEmit: exit 0npx eslinton the changed file: no issuesnpm run build: exit 0, all 26 routes builtNo security, schema, or performance implications. No new dependencies.
Related dead code, not changed
src/pages/openings/index.tsxcarries the same missing-positionKeydefect but is unreachable:next.config.jspermanently 308-redirects/openingsto/drills, so that page component never renders. The same fix was applied, the redirect confirmed, and the edit reverted rather than ship an unverifiable change.src/components/Openings/OpeningDrillAnalysis.tsxhas the same defect and is exported from the Openings barrel but never imported or rendered anywhere.Both are dead code and were left alone rather than deleted. Happy to remove them in a separate change if that is wanted.
🤖 Generated with Claude Code