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

   ### 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 `rocketmq-studio` branch, or I 
have stated the exact version I am running below.
   
   ### Studio Version
   
   branch: rocketmq-studio
   git commit id: a92c2314
   deployed as: reproduced by a unit test against that commit
   
   ### Runtime Environment
   
   OS: not applicable — the defect is in the frontend Mock data source and the 
view it feeds
   MySQL: not applicable — no backend is involved
   browser (for UI issues): not required to observe it; the defect is in the 
item the page renders
   
   ### Connected RocketMQ Cluster
   
   not applicable — reproduced with the frontend Mock data source in a unit test
   
   ### Describe the Bug
   
   The demo data source's consumer queue progress rows do not satisfy the 
progress contract, and the consumer detail renders the missing field as a 
placeholder.
   
   `web/src/mock/consumers.ts:48` declares its own `QueueProgress` instead of 
the endpoint's, and that copy has no `topic` — `web/src/api/metadata.ts:155` 
requires it (`topic: string`). `web/src/services/consumerService.ts:178` and 
`:378` cast the fixtures over the mismatch (`mockQueueProgress[name] as unknown 
as QueueProgress[]`), so neither `tsc` nor the suite could see it.
   
   The queue progress table renders that field in its own column:
   
   ```tsx
   // web/src/pages/instance/consumer.tsx:1306-1316
   { title: 'Topic 主题', dataIndex: 'topic', width: 280,
     render: (topic: string) => (<Text strong title={topic || '-'}>{topic || 
'-'}</Text>) }
   ```
   
   So in Mock mode the **Topic** column of the Queue Progress dialog shows `-` 
for every queue, while the broker, queue id and offsets on the same rows are 
populated.
   
   ### Steps to Reproduce
   
   ```text
   1. Enable the frontend Mock data source.
   2. Open the consumer page, pick the group cg-order-notify, open its Queue 
Progress dialog.
   3. The Topic column reads `-` on every row.
   ```
   
   Or as a unit test against the service:
   
   ```ts
   const [row] = await getConsumerProgress('cg-order-notify');
   expect(row.topic).toBeTypeOf('string');   // fails: "undefined"
   ```
   
   ### What Did You Expect to See?
   
   Every progress row carries the topic it belongs to, so the Topic column 
shows the topic the way it does against a real backend.
   
   ### What Did You See Instead?
   
   The column renders `-` for all 43 demo queue rows, because the fixtures 
never set the field the column reads.
   
   ### Additional Context
   
   A fix with a regression test follows in a pull request.
   
   ### 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]

Reply via email to