iloveeyjafjalla opened a new issue, #6268:
URL: https://github.com/apache/rocketmq-dashboard/issues/6268

   ### Before Creating the Bug Report
   
   - [x] Searched open/closed issues and PRs and inspected related current head 
diffs.
   - [x] This is a RocketMQ Studio frontend defect in this repository.
   - [x] Reproduced on the exact `rocketmq-studio` revision below.
   
   ### Studio Version
   
   `rocketmq-studio@5e4c39b053c35a5598cc79ff331b8a54e649d7b1`.
   
   ### Runtime Environment / Build Toolchain
   
   Windows 11, Node 24.15.0, npm 11.12.1. Reproduced in the real DataSourceTab 
component tests with controlled API/service responses, not a live deployment.
   
   ### Connected RocketMQ Cluster
   
   No cluster or cloud service was contacted. This concerns rendering saved 
instance bindings, before any broker operation.
   
   ### Describe the Bug
   
   Data-source selection stores instance names, but `formatInstanceIds` scans 
for either a name match or a numeric-ID match at the same time. A numeric-ID 
match earlier in the array can hide an exact name match later in the array. 
Both the table and CSV use this formatter, whereas the edit dropdown correctly 
uses instance names.
   
   ### Steps to Reproduce
   
   1. The instance list contains an Apache instance `{ id: 1, name: 
'apache-main' }` before a cloud instance `{ id: 2, name: '1' }`. The normal 
cloud-instance name form accepts `1`; the production list orders Apache 
instances before cloud instances.
   2. In Settings → Data sources, select the instance named `1` and save. The 
binding is `instanceIds: ['1']` because the dropdown's values are instance 
names.
   3. Inspect the table's Applicable Instances column and export the data 
sources as CSV. Reopen Edit and compare its selected instance.
   
   The deterministic component regression supplies those ordinary response 
shapes at the existing service boundaries, opens Edit to establish that the 
instance list is loaded, and asserts the table label. The export regression 
invokes the real export action and CSV builder, intercepting only the download 
boundary.
   
   ### What Did You Expect to See?
   
   The table, CSV and edit selection all show `1`. A numeric ID is only a 
fallback when no exact instance name matches.
   
   ### What Did You See Instead?
   
   The table and CSV show `apache-main`; Edit shows `1`. Against unchanged 
production code both label assertions fail, while the 
legacy-ID/unknown-name/global-source compatibility control passes.
   
   ### Additional Context
   
   The proposed fix changes only display/export lookup priority. It does not 
change saved bindings or API payloads. The two related test files pass 19/19 
after the fix; lint and production build pass. The complete frontend suite 
result is documented in the implementation PR.
   
   AI assistance: OpenAI Codex was used for investigation, implementation and 
automated verification, including a separate automated review. No live 
deployment, human review or maintainer approval is claimed.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes.
   
   ### Implementation PR
   
   https://github.com/apache/rocketmq-dashboard/pull/6267
   


-- 
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]

Reply via email to