ai-yang opened a new pull request, #755: URL: https://github.com/apache/rocketmq-dashboard/pull/755
## Summary - bind LLM test/save callbacks to the current component lifecycle, provider, form values, and operation generation - invalidate late success/error/loading callbacks when the form changes, another operation starts, or the page unmounts - keep the existing successful-test auto-save contract, while serializing that mutation before another save can start - cover provider changes, same-provider edits, current-provider resets, enabled/key changes, newer saves, unmount, StrictMode, and auto-save success/failure Fixes #738. This PR intentionally does not change initial configuration or model-list request ownership, which is covered separately by #733/#737. If #737 merges first, this branch will be rebased and its connection-test expectation aligned without broadening either issue. ## Root cause `handleTestConnection` and `handleSave` captured a configuration but allowed every later Promise callback to update the current form. A late connection test could therefore publish an obsolete result, auto-save the old provider/configuration after a newer explicit save, mask the active API key, and control loading state belonging to another operation. ## Verification - unmodified Node 20 baseline: three controlled business regressions failed identically in 5/5 isolated processes - final operation-ownership suite: 20 isolated Node 20 Vitest processes, 13/13 each (260/260) - all related LLM tests: 25/25 - full frontend suite: 64 files / 278 tests - ESLint: 0 errors (4 existing Fast Refresh warnings) - TypeScript/Vite production build: passed, 7,979 modules transformed - `git diff --check`: passed -- 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]
