zmuxuny opened a new issue, #6354: URL: https://github.com/apache/rocketmq-dashboard/issues/6354
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version Branch: `rocketmq-studio`, commit `779b8c0e7aed2396d3cc72743dcd544ea48e9ae6`. Reproduced from source in a focused frontend component test, not a live deployment. ### Runtime Environment Linux cloud workspace; Node.js 24.19.0; repository-pinned Vitest 4.1.10, React 18 and Ant Design 5; jsdom. MySQL and a live browser are not required for this reproduction. ### Connected RocketMQ Cluster No live cluster was used. Ordinary API/service boundaries return controlled responses; the actual page, modal/drawer, filters and pagination are rendered. No real credentials or customer data were used. ### Build Toolchain _No response_ ### Describe the Bug The cloud credential selector in Add Instance consumes only the first page of a paginated inventory. With more than 20 credentials for Aliyun or Tencent, credentials on later pages cannot be selected for either connecting a single instance or one-click cloud import. The Settings inventory has working pagination, so the missing credential can be visible there while remaining unreachable in Add Instance. ### Steps to Reproduce 1. Have 21 stored credentials for the same cloud vendor. 2. Open Instance List, Add Instance, then that vendor's tab. 3. Open the cloud credential selector. 4. Try to choose the credential returned on inventory page 2. ### What Did You Expect to See? Every matching saved credential is reachable, using the existing bounded pagination contract, without mixing responses from another vendor or a dismissed dialog. ### What Did You See Instead? The selector contains only the first 20. It has neither a next-page control nor server-side search, and the omitted credential cannot be used to discover regions or import instances. ### Additional Context ### Evidence - [Add Instance credential loading](https://github.com/apache/rocketmq-dashboard/blob/779b8c0e7aed2396d3cc72743dcd544ea48e9ae6/web/src/pages/instance/index.tsx#L193-L222) calls `listCloudCredentials(vendor)` once and stores only `result.items`; `total`, `page` and `size` are ignored. - [API defaults](https://github.com/apache/rocketmq-dashboard/blob/779b8c0e7aed2396d3cc72743dcd544ea48e9ae6/web/src/api/cloudCredential.ts#L24-L34) are page 1 and page size 20. - [Credential selector](https://github.com/apache/rocketmq-dashboard/blob/779b8c0e7aed2396d3cc72743dcd544ea48e9ae6/web/src/pages/instance/index.tsx#L845-L870) builds its options from that incomplete array. A new real-component regression supplies 21 coherent records, slices responses according to the requested page/page size, opens the Aliyun selector and tries to choose credential 21 before checking the resulting region lookup. On unchanged production it fails because `cloud-account-21` is absent. AntD virtualization is disabled through ConfigProvider only so all loaded options are inspectable; the selector itself is not mocked. ### Related Work / Scope - [#2425](https://github.com/apache/rocketmq-dashboard/pull/2425) addressed pagination on the Settings credential table, not the Add Instance selector; its diff was inspected. - [#2292](https://github.com/apache/rocketmq-dashboard/pull/2292) introduced the paginated backend contract. - [#5641](https://github.com/apache/rocketmq-dashboard/pull/5641) tests API query parameters, not later-page reachability from the instance form. This report is about consuming existing masked inventory pages in the Add Instance workflow. No secret-reveal endpoint, credential storage or authorization change is proposed. ### Verification Scope Red-only reproductions on unchanged production: `npm test -- --maxWorkers=1 src/pages/instance/__tests__/InstancePage.test.tsx src/pages/instance/__tests__/DLQPage.test.tsx src/pages/studio/__tests__/LiteTopic.test.tsx -t 'Test$'` ran the three new cases: three expected assertion failures, 74 existing cases skipped. This is not a full-suite or real-broker result. Production has not been changed yet. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
