chennaji9 opened a new pull request, #5216: URL: https://github.com/apache/rocketmq-dashboard/pull/5216
### Which Issue(s) This PR Fixes None — small self-contained fix found by inspection (no issue tracked). ### Brief Description While a data-source save is in flight, the modal can still be cancelled and another one opened (edit A, submit, cancel, open edit B). When A's save then completed, `handleSubmit` unconditionally ran `setModalOpen(false)` + `dsForm.resetFields()`, closing B's freshly opened modal and wiping its form. All open/close paths now bump a modal-session ref, and a completing save from an older session refreshes the list but leaves the newer session's modal state and form untouched. Base is `rocketmq-studio` per CONTRIBUTING.md (the PR template's base comment is outdated). ### How Did You Test This Change? `cd web && npx vitest run src/pages/settings/__tests__/DataSourceTab.test.tsx` — 13/13 pass, including the new case: edit A with a deferred `updateDataSource` → cancel → open edit B (fields populated) → resolve A → B's modal is still open with its values intact and the list has refreshed. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`fix:`) - [x] Tests added or updated for non-trivial changes - [x] New UI text has both Chinese and English entries under `web/src/i18n/` (n/a — reuses existing keys) - [x] Architecture constraints stay green (n/a — no Java change) - [x] New source files carry the ASF license header (n/a — no new source file) - [x] Documentation touched where behaviour changed (code comments added) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
