project-nju-learner opened a new pull request, #6926:
URL: https://github.com/apache/rocketmq-dashboard/pull/6926

   ### Which Issue(s) This PR Fixes
   
   Fixes #6925
   
   ### Brief Description
   
   Closing a data source dialog while its connection test is pending leaves the 
next dialog's test button loading. The old request can also display an outdated 
result after the dialog closes.
   
   Track the modal session and invalidate pending tests on open, close, and 
unmount. Ignore stale validation continuations and request completions, 
including their loading cleanup. Cancel and successful Save share the same 
close path. Table-row connection tests remain independent.
   
   AI assistance: OpenAI Codex helped investigate, implement, test, and review 
this patch. No maintainer or human review is claimed.
   
   ### How Did You Test This Change?
   
   On Windows with Node 24.19.0 and NODE_OPTIONS=--no-experimental-webstorage, 
from web:
   
   - npm test -- src/pages/settings/__tests__/DataSourceTab.test.tsx 
--maxWorkers=1 — 25 tests passed, including six new lifecycle cases. The three 
reopen regressions failed against unchanged production code.
   - npm run lint — 0 errors; 10 existing warnings in unchanged files.
   - npm run build — TypeScript, Vite, and license checks passed.
   - Changed-file Prettier check and git diff --check passed.
   
   The Windows checkout converted one existing license file to CRLF; 
temporarily restoring its upstream LF endings locally allowed the unchanged 
license check to pass. That file is not included in this PR.
   
   Tests use the real React/Ant Design components with controlled API 
responses. The full frontend/backend suites and live backend connections were 
not tested.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (fix(settings): isolate 
data source modal connection tests)
   - [x] Tests added for the non-trivial lifecycle change (Vitest component 
tests)
   - [ ] New UI text has both Chinese and English entries under web/src/i18n/ — 
N/A: no new UI text
   - [ ] Architecture constraints stay green (mvn test runs the ArchUnit 
checks) — not run; frontend-only change
   - [ ] New source files carry the ASF license header — N/A: no new source 
files
   - [ ] Documentation touched where behaviour changed — N/A: restores expected 
dialog behavior without changing the documented workflow
   


-- 
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