zmuxuny opened a new pull request, #7095: URL: https://github.com/apache/rocketmq-dashboard/pull/7095
### Which Issue(s) This PR Fixes Fixes #7089 ### Brief Description The AI composer enables Stop as soon as a request begins, before `run_started` supplies the run ID needed by the stop API. Clicking it during that interval silently does nothing. Pass the hook's existing `canStop` state to the composer and button, and apply the same gate to Escape. The control enables once the active run is addressable. Sending from the home composer and the disabled `stopping` state retain their existing behavior. ### How Did You Test This Change? - Fail-before against unchanged `rocketmq-studio@127c47b0`: the real AiPage regression finds Stop enabled before the first `run_started` frame. - `cd web && npx vitest run src/pages/ai src/pages/home --pool=threads --maxWorkers=1`: **25 files, 302 tests passed**. - Tests cover the button, composer keyboard shortcut, and real page transition from pending admission to run ID 41, stop request, stopping, and terminal completion. Sending remains enabled independently of `canStop`. - `npx tsc -b`, ESLint/Prettier on all seven changed files, and `git diff --check` passed. - Independent source/test review completed. No new API, server cancellation semantics, UI text or dependencies. No live provider/cluster test was needed or run. AI assistance was used for implementation, tests and review. -- 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]
