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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5496
   
   ### Brief Description
   
   Guards the six remaining unguarded mutation handlers, following each page's 
established in-flight idiom:
   
   1. **Proxy config reload**: single-flight ref guard + `reloadingAddress` 
loading on the acting row (other rows disabled) — mirroring the same file's 
`addressMutationInFlight` pattern.
   2. **Create user**: `creatingUser` state + `confirmLoading` on the Modal OK 
+ a no-op guard on re-entry; `validateFields` failures are now caught (no more 
unhandled rejections).
   3. **Reset/change password**: same treatment (`resettingPassword` + 
`confirmLoading` + guard + caught validation).
   4. **Data source delete**: per-key `deletingKeys` Set + ref guard (the same 
file's `testingKeys` idiom); the acting row's Popconfirm OK shows loading; 
other rows' delete buttons are disabled.
   5. **Cloud credential delete**: identical per-key Set treatment (the same 
file whose `handleSubmit` is the best-guarded handler in the codebase).
   6. **Alert silence end**: single-flight entry guard (`if (deletingSilenceId 
!== null) return;`) so a second end cannot start while one is pending.
   
   ### How Did You Test This Change?
   
   All five affected suites:
   
   ```
   cd web && npm test -- Proxy.test.tsx UserManagement.test.tsx 
DataSourceTab.test.tsx CloudCredentialTab.test.tsx SystemAlertsPage.test.tsx 
--run
    Test Files  5 passed (5)
         Tests  68 passed (68)
   ```
   
   The existing tests cover each flow's success/failure behavior; the guards 
are additive no-ops on the happy path (a second click during flight returns 
early, the first completes normally). The per-key Sets and modal 
`confirmLoading` are the same patterns already tested on their origin pages.
   
   ```
   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 (one 
purpose — in-flight guards on the six remaining handlers, per the grouping 
guideline #2107)
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test` (existing suites cover the flows; the guards are additive)
   - [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 (guards 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