You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/08 12:22:18 UTC
[PR] fix(lite-topic): map session pop progress into the session view [rocketmq-dashboard]
123123213weqw opened a new pull request, #5725:
URL: https://github.com/apache/rocketmq-dashboard/pull/5725
## What is the purpose of the change
The LiteTopic session detail API and the `rmq.litetopic.session` tool never return `popProgress`: `LiteTopicService.toSessionVO` does not map it, so the field that `LiteTopicSessionVO`, the tool output contract and the page all declare is always absent. The LiteTopic page renders its "Pop 进度" progress section only when `popProgress` is non-null (`web/src/pages/studio/LiteTopic.tsx`), so real deployments never show the section at all. The value last existed in the pre-provider stub (`totalMessages=5000, consumedMessages=4800, popProgress=96`), i.e. the pop consumption progress percent — the same integer-percent contract #583 fixed the page to render directly.
## Brief changelog
- Map the session's pop consumption progress percent (`LiteTopicSession.getConsumptionProgress()`, rounded) into `LiteTopicSessionVO.popProgress` in `toSessionVO`.
- Leave the field absent when the message counters are unknown, so the page hides the section instead of showing a fabricated 0%.
## Verifying
Red-first: `LiteTopicServiceTest.getSessionShouldCarryPopProgressWhenCountersAreKnown` fails on `rocketmq-studio` (expected 96, got null) and passes with the change; `getSessionShouldLeavePopProgressAbsentWhenCountersAreUnknown` pins the absent case. `mvn test -Dtest='LiteTopicServiceTest,LiteTopicControllerTest,LiteTopicSessionToolHandlerTest'` is green (24 tests).
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(lite-topic): map session pop progress into the session view [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #5725: fix(lite-topic): map session pop progress into the session view
URL: https://github.com/apache/rocketmq-dashboard/pull/5725
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(lite-topic): map session pop progress into the session view [rocketmq-dashboard]
Posted by "123123213weqw (via GitHub)" <gi...@apache.org>.
123123213weqw commented on PR #5725:
URL: https://github.com/apache/rocketmq-dashboard/pull/5725#issuecomment-6123353578
@lizhimins I stopped short of refreshing this one, because it now collides head-on with #6144, merged earlier today: that change removed `popProgress` from `LiteTopicSession`/`LiteTopicSessionVO`/`LiteTopicSessionOutput`/`litetopic.yaml`/`LiteTopic.tsx` precisely because nothing on the server ever computed it — while this PR's whole point is to start computing it (`popProgressPercent` in `LiteTopicService`) and map it into the session view. Merged onto the current base as-is, the branch no longer compiles (`LiteTopicSessionVOBuilder.popProgress` is gone).
So the direction needs your call before I touch anything:
- if the field should come back now that something actually computes it, I'll revive the full chain this PR needs on top of the new base — VO + `LiteTopicSessionOutput` + `litetopic.yaml` + regenerated catalog digest + the `LiteTopic.tsx` panel and the `liteTopic.popProgress` i18n pair that #6144 removed; or
- if #6144's removal stands, this PR is obsolete and I'll close it.
Say which and it's done either way.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(lite-topic): map session pop progress into the session view [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #5725:
URL: https://github.com/apache/rocketmq-dashboard/pull/5725#issuecomment-6435160725
Closing this one: the trunk has since removed the field this PR populates, deliberately.
When this was reviewed the mapping fix was correct and complete - `LiteTopicSessionOutput.from` already forwarded `vo.getPopProgress()`, so the one line restored the value for the REST endpoint, the `rmq.litetopic.session` tool and the page's "Pop 进度" section at once, with a null-when-unknown guard instead of a fabricated 0%.
Since then #6144 (`0e60ee54e`, "stop presenting unread or partial values as measured") removed `popProgress` end to end: the `LiteTopicSessionVO` field, the `LiteTopicSession` model field and its nested `PopConsumeProgress` shape, the AI contract component and its `litetopic.yaml` / `catalog_gen.go` entry, the TypeScript contract and the `liteTopic.popProgress` translation. The reason is in `LiteTopicSession`: the session scan is capped, so `consumedMessages` and `totalMessages` are **lower bounds** rather than totals once `consumedScanTruncated` is set - and a percentage derived from them presents a partial value as a measured one.
This PR's guard checks the counters but not the truncation flag, which did not exist at its baseline, so landing it as-is would reintroduce exactly that. Merging it now would mean re-adding the whole chain and partially reverting #6144, which is a product decision rather than a rebase.
If the Pop progress panel is wanted back, the right shape is a fresh change that returns an absent value whenever `consumedScanTruncated` is true, so the panel hides instead of showing a percentage computed from a lower bound. Thanks for the careful null-handling here - it was the right instinct.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org