zmuxuny opened a new pull request, #7397: URL: https://github.com/apache/rocketmq-dashboard/pull/7397
### Which Issue(s) This PR Fixes - Fixes #6751 - Fixes #7087 Both reports were closed by the inactivity bot. #7090 was deliberately consolidated into #6758 by the original author; #6758 was later closed by the inactivity bot. This replacement keeps that consolidated scope. ### Brief Description Replaces #6758 and absorbs the duplicate scope of #7090, preserving the original contributions by @zmuxuny. Keep instance and Kubernetes certificate creation results associated with the dialog session that submitted them. Cancelling and reopening a create dialog must not let a late result close or clear the newer draft. An already-sent create still reports its outcome and updates inventory. - Ignore instance validation that completes after its dialog was cancelled, while preserving the existing global instance mutation lock. - Guard certificate submission synchronously during validation, while allowing a new dialog session to submit independently. - Only let the owning certificate session release pending state or reset its form. - Cover Cancel/X, deferred validation, late success/failure, duplicate clicks, validation retry, and old/new session ownership with deterministic component tests. ### How Did You Test This Change? Validated locally against `rocketmq-studio` base `7abf8adaf660d75f2d686bbe8741be76c3a5ddd3` with Node 20.20.2, a single Vitest worker and the repository's unchanged timeouts. - Focused session regressions: **14 passed**. - Same final tests against exact base production: **10 expected failures, 4 passes**, matching the missing session/duplicate-submit behavior. - Selected final regressions against the original contribution's production files: **3 expected assertion failures**, reproducing both cancelled instance validation paths and duplicate certificate validation. - Complete affected page/API/service suites: **7 files, 113 tests passed**. - Forced TypeScript check, repository lint (0 errors; 11 existing warnings), changed-file formatting, production build, license tests, license check and diff check: **passed**. - License check verified 134 actual components and 141 license files. Commands run from `web/` on the final snapshot: ```sh node node_modules/vitest/vitest.mjs run src/pages/instance/__tests__/InstancePage.test.tsx src/pages/cluster/__tests__/K8sCertsPage.test.tsx src/services/instanceService.test.ts src/services/clusterService.test.ts src/api/instance.test.ts src/api/cluster.test.ts src/api/clusterContract.test.ts --maxWorkers=1 node node_modules/typescript/bin/tsc -b --force npm run lint node node_modules/prettier/bin/prettier.cjs --check src/pages/instance/index.tsx src/pages/instance/__tests__/InstancePage.test.tsx src/pages/cluster/certs.tsx src/pages/cluster/__tests__/K8sCertsPage.test.tsx npm run build npm run license:test npm run license:check git diff --check ``` Earlier runs hit the unchanged 20-second timeout; their root cause has not been established. A separate negative-control run exposed an unconsumed one-shot mock response leaking into a later test. Resetting certificate-create mock implementations between cases corrected that specific isolation defect. The final snapshot also avoids unnecessary per-character typing and modal animations in session tests. All earlier failures were retained; no business assertion was removed and no timeout was increased. ### Scope Four frontend files only. No backend, API, dependency or permission changes. Sent HTTP requests are not cancelled; only their ownership of a reopened dialog is invalidated. ### AI Assistance AI assistance was used to review the original contribution, implement the two same-scope validation guards, and extend deterministic regression coverage. The complete four-file diff was reviewed and the final snapshot was tested as described above. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] New repair/test commit subjects follow Conventional Commits (the original contribution history is preserved) - [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) - [ ] Architecture constraints stay green (backend/ArchUnit and remote CI pending; backend not changed or locally run) - [x] New source files carry the ASF license header (no new source files; existing headers retained) - [x] Documentation touched where behaviour changed (internal dialog ownership correction; no public API/configuration change) Remote CI for the replacement commit is pending. Local 113/113 applies to the complete affected frontend suites, not the entire repository. -- 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]
