Fix Maimai NET import flow#292
Open
Matsuk1 wants to merge 1 commit into
Open
Conversation
Changed Files
|
Preview Deployment
|
5336a10 to
4989904
Compare
4989904 to
e0de838
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the Maimai NET rating import UX and data fidelity in the web app while aligning domain-level normalization to preserve SSS+ achievements above the in-game rating cap.
Changes:
- Pass manually entered NET credentials directly into the import function (instead of requiring localStorage).
- Prevent key presses inside the NET import dialog from bubbling to the Import menu (avoids focus loss/typeahead collisions).
- Allow achievement normalization up to 101% and add a regression test for SSS+ retention; add missing
zoddependency for existing web import code.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates lockfile to reflect added deps / updated resolutions. |
| packages/maimai-domain/src/import-normalizers.ts | Expands valid achievement rate range to 101%. |
| packages/maimai-domain/src/tests/import-normalizers.test.ts | Adds coverage for >100.5% NET achievements and adjusts invalid-achievement boundary test. |
| apps/web/src/components/rating/io/import/ImportFromNETRecordsListItem.tsx | Stops dialog keydown propagation; passes manual credentials into import flow. |
| apps/web/src/components/rating/io/import/importFromNETRecords.tsx | Accepts optional authParams and uses them for fetching NET records. |
| apps/web/package.json | Adds zod as a direct dependency for web import code. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+160
to
+171
| const storedAuthParams = (() => { | ||
| const stored = localStorage.getItem('import-net-records') | ||
| if (!stored) return null | ||
| const parsed = JSON.parse(stored) as { | ||
| region: 'jp' | 'intl' | ||
| username: string | ||
| password: string | ||
| } | ||
| return parsed | ||
| })() | ||
| const params = authParams ?? storedAuthParams | ||
| if (!params) { |
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
Testing
./node_modules/.bin/oxlint apps/web/src/components/rating/io/import/ImportFromNETRecordsListItem.tsx apps/web/src/components/rating/io/import/importFromNETRecords.tsx packages/maimai-domain/src/import-normalizers.ts packages/maimai-domain/src/__tests__/import-normalizers.test.ts../../node_modules/.bin/vitest run src/__tests__/import-normalizers.test.ts../../node_modules/.bin/tsc --noEmit(apps/web)