Skip to content

Fix Maimai NET import flow#292

Open
Matsuk1 wants to merge 1 commit into
mainfrom
codex/fix-maimai-net-import-flow
Open

Fix Maimai NET import flow#292
Matsuk1 wants to merge 1 commit into
mainfrom
codex/fix-maimai-net-import-flow

Conversation

@Matsuk1

@Matsuk1 Matsuk1 commented Jun 28, 2026

Copy link
Copy Markdown

Summary

  • Pass manually entered Maimai NET credentials into the import flow
  • Stop NET import dialog key presses from bubbling to the Import menu, fixing focus loss on letters like a/d/l/m/n
  • Allow imported maimai achievements up to 101% so SSS+ records are retained
  • Add the missing web zod dependency used by the existing MuNet import code

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)

@semanticdiff-com

semanticdiff-com Bot commented Jun 28, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

Preview Deployment

Name Link
Latest commit e0de838
Preview URL https://dxrating-pr-292.galvin.workers.dev

Built and deployed to Cloudflare Workers.

@Matsuk1 Matsuk1 force-pushed the codex/fix-maimai-net-import-flow branch 2 times, most recently from 5336a10 to 4989904 Compare June 28, 2026 07:09
@Matsuk1 Matsuk1 force-pushed the codex/fix-maimai-net-import-flow branch from 4989904 to e0de838 Compare June 28, 2026 08:18
@GalvinGao GalvinGao requested a review from Copilot June 28, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 zod dependency 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) {
@Matsuk1 Matsuk1 marked this pull request as ready for review June 28, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants