Remove hardcoded problemType=NPC from frontend#133
Open
wrigjl wants to merge 2 commits into
Open
Conversation
The backend now makes problemType optional across visualizations, verifiers, and solvers, so the frontend no longer needs to hardcode and thread "NPC" through every ProblemProvider hook and Redux API call. problemType was dead state (initialized once, never set). Closes ReduxISU#120 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
GitHub Advanced Security's ESLint check flagged this as a new alert because these lines were touched while removing problemType. Declaring the helper before the effect that calls it resolves it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
problemType=NPCon every reduction/solver/verifier/visualization request. The backend now makes this field optional (#331,#330,#329all closed/merged upstream inReduxISU/Redux), so it's removed here.problemTypewas dead state: initialized once viauseState("NPC")inProblem.js, its setter was never called anywhere, and it was just threaded unchanged through everyProblemProviderhook down to the 5redux/index.jsAPI functions. This is a pure deletion — no behavior change, since the value sent was always"NPC"and the backend now applies its own default once the param is absent.Closes #120
Test plan
npm run linton touched files — no new errors/warnings (pre-existingreact-hooks/*findings are unrelated baseline noise)npm run build— production build compiles, all 7 routes prerender successfullylocalhost:27000) withoutproblemType— all return 200 with correct data/api/reduxproxy on a running dev server — same correct results