tju-yxq opened a new pull request, #5408:
URL: https://github.com/apache/rocketmq-dashboard/pull/5408

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5407
   
   ### Brief Description
   
   `handleImportAll` now participates in the modal's shared 
`mutationInFlightRef` guard (set on entry, cleared in `finally`), and both 
footer buttons reflect the cross-flight state: 一键导入 is disabled while a 
create/update is submitting, and 连接 is disabled while an import is running. 
Create/update keep their existing guard and behavior; the import's own 
validation, toasts and list reload are unchanged.
   
   ### How Did You Test This Change?
   
   ```
   cd web && npm test -- InstancePage.test.tsx --run
    Test Files  1 passed (1)
         Tests  28 passed (28)
   ```
   
   One new test holds a Connect submission pending (never-resolving promise), 
switches the same modal to the Aliyun tab and selects a credential — a state 
that would enable 一键导入 on its own — and asserts the import button stays 
disabled and `importCloudInstances` is never called. The 27 existing tests 
(duplicate-create guard, import flows for both vendors, truncated-failure 
summary, stale-response guards, batch delete) pass unchanged.
   
   ```
   cd web && npm run lint
   ✖ 10 problems (0 errors, 10 warnings)   # the trunk baseline
   ```
   
   ```
   cd web && npx tsc -b --force
   (no output — exit 0)
   ```
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(no new UI text)
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks) (no Java changes)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (guard only)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to