iloveeyjafjalla opened a new pull request, #6933: URL: https://github.com/apache/rocketmq-dashboard/pull/6933
Fixes #6932 ## The defect `GET /api/settings/general` failing left the tab with `settings === null`: the fields showed defaults, every write path returned silently at `if (!settings) return`, and the save/test buttons stayed enabled because they only check `loading` and the role. No request, no message, no retry. ## The fix The failure is state now, in the shape the AI settings tab already uses for the same problem (#6550): an alert carrying the server's reason, a retry that re-runs the read through a nonce, and `|| !settings` on the write/test controls so nothing is offered while there is no snapshot to merge into. ## Tests Red before the change: ``` Unable to find an element with the text: settings row is corrupt. ``` The new case rejects the initial read and pins the alert plus the disabled 保存设置 buttons. Green after, with the reader-access suite beside it: ``` Tests 11 passed (11) (GeneralSettingsTab.test.tsx + GeneralSettingsTabReader.test.tsx) tsc -b exit 0 eslint exit 0 prettier --check All matched files use Prettier code style! ``` -- 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]
