Aias00 opened a new issue, #4957: URL: https://github.com/apache/rocketmq-dashboard/issues/4957
## Problem The AI Tool Playground builds its scope selector from `listClusters()` and uses each physical cluster's `id` as the selected value. It then passes that value to tool discovery, pre-fills required `instanceId` inputs with it, and sends it as the `instanceId` query parameter to tool execution. Those are different identity domains: the tool REST contract targets a RocketMQ Studio managed instance, while a cluster id/name identifies a physical cluster discovered inside an instance. For deployments where these values differ, the Playground can fail instance resolution or execute against the wrong target. ## Proposed design 1. Populate the Playground scope selector from the managed instance list instead of the physical cluster list. 2. Use the canonical Studio instance name as the selector value and `instanceId` throughout catalog discovery, input templates, and execution. 3. Rename local state and UI copy from cluster scope to instance scope so the identity contract is explicit. 4. Change the frontend tool catalog request to use the backend's canonical `instanceId` query parameter rather than the legacy `cluster` alias. 5. Preserve the existing global-tool sentinel and stale catalog request guard. ## Test plan - Update the Playground integration test with an instance whose database id, instance name, and physical cluster name are deliberately different. - Assert catalog discovery receives the instance name. - Assert required `instanceId` input is pre-filled with the instance name. - Assert execution sends the same instance name in both the normalized input and request target. - Run the focused AI page/API tests, frontend typecheck, lint, and build. ## Acceptance criteria - The Playground never uses a physical cluster id as a Studio instance target. - Catalog discovery, generated input, and execution all use the same selected instance name. - Global tools remain available when no instance is selected or instance loading fails. - Existing stale-response protection remains intact. -- 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]
