You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "dxz0069 (via GitHub)" <gi...@apache.org> on 2026/10/15 00:19:15 UTC

[PR] [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables [rocketmq-dashboard]

dxz0069 opened a new pull request, #6687:
URL: https://github.com/apache/rocketmq-dashboard/pull/6687

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6647
   
   ### Brief Description
   
   The audit, alerts, consumer and topic tables fetch one server page but still exposed antd in-memory sorters (6 / 6 / 8 / 5 declarations), so a header click reordered only the loaded page while the sort indicator suggested the entire result set was ordered — sorting the consumer `totalLag` column never finds the highest-lag group across pages, and the paged fetches never receive the selected sort field and direction.
   
   This takes the removal direction the issue offers (the same approach as #5335 for the message and DLQ tables) to the remaining four tables: the sorter declarations are gone, the two now-unused helper imports are dropped, and each table gains a regression test asserting no sortable header is offered. The null-handling the removed consumer sorters exercised (unknown lag after known backlogs, unavailable connections after known counts) stays pinned by the `consumerLag.test.ts` / `consumerConnections.test.ts` unit tests; the two ConsumerPage tests that clicked the removed sorters are deleted along with them.
   
   Server-side sort fields for these tables can be introduced later behind validated backend parameters — that is the issue's other direction and a much larger change.
   
   ### How Did You Test This Change
   
   ```
   cd web
   npx vitest run src/pages/ops/__tests__/AuditPage.test.tsx src/pages/ops/__tests__/AlertsPage.test.tsx src/pages/instance/__tests__/ConsumerPage.test.tsx src/pages/instance/__tests__/TopicPage.test.tsx
   Test Files  4 passed (4)
   Tests       145 passed (145)
   
   npx eslint src/pages/ops/audit.tsx src/pages/ops/alerts.tsx src/pages/instance/consumer.tsx src/pages/instance/topic.tsx
   0 errors (pre-existing warnings only)
   ```
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named `...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` (no new UI text)
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) (frontend-only change)
   - [x] New source files carry the ASF license header (existing files only)
   - [x] Documentation touched where behaviour changed (no user-visible behaviour change beyond the removed misleading sorters)


-- 
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] [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] commented on PR #6687:
URL: https://github.com/apache/rocketmq-dashboard/pull/6687#issuecomment-6591835121

   This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.


-- 
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] [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@rocketmq.apache.org>.
github-actions[bot] closed pull request #6687: [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables
URL: https://github.com/apache/rocketmq-dashboard/pull/6687


-- 
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] [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables [rocketmq-dashboard]

Posted by "dxz0069 (via GitHub)" <gi...@apache.org>.
dxz0069 commented on PR #6687:
URL: https://github.com/apache/rocketmq-dashboard/pull/6687#issuecomment-6192910433

   Thanks for the thorough review — all three points addressed:
   
   1. **Rebased.** Onto the current `rocketmq-studio` head (8bbe794 plus the follow-up landings since). The topic.tsx type-column hunk resolves by keeping your `width: 92` and its comment and dropping only the sorter; every other file auto-merges clean.
   2. **Helpers deleted.** You are right that "their unit tests still pin the null handling" is circular once nothing calls them — `lagSortValue` and `onlineInstancesSortValue` are gone together with their cases (second commit), and the comment left in ConsumerPage.test.tsx no longer claims that coverage.
   3. **Merge order.** Understood and waiting on your call for the audit `timestamp` / alerts `lastTriggered` sorters; if #6686 lands first this branch rebases again.
   
   Non-blocking notes taken as-is for now: the alerts regression test still covers only the default `CLUSTER` domain, and I agree server-side sort parameters (validated backend fields) are the right follow-up rather than restoring page-local sorters.
   
   Verification on the rebased branch:
   
   ```
   cd web
   npx vitest run src/utils/consumerLag.test.ts src/utils/consumerConnections.test.ts src/pages/instance/__tests__/TopicPage.test.tsx src/pages/ops/__tests__/AuditPage.test.tsx   -> 59 passed
   npx vitest run --maxWorkers=1 src/pages/instance/__tests__/ConsumerPage.test.tsx src/pages/ops/__tests__/AlertsPage.test.tsx   -> 91 passed
   ```
   
   (one note on the `--maxWorkers=1`: this dev machine currently shows load-induced `waitFor` timeouts when the two heavy page suites run in parallel workers — the same tests pass standalone and sequentially, and the pre-rebase parallel runs of the same files were green, so I verified the heavy pair single-worker)


-- 
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] [ISSUE #6647] fix(web): remove page-local sorters from four server-paginated tables [rocketmq-dashboard]

Posted by "dxz0069 (via GitHub)" <gi...@apache.org>.
dxz0069 commented on PR #6687:
URL: https://github.com/apache/rocketmq-dashboard/pull/6687#issuecomment-6265636370

   Rebased onto the current head (c34535d) and narrowed per the 2026-10-16 convention that keeps the consumer table's sorters — trunk evolved `onlineInstancesCount` for exactly that display/sort agreement, so fighting it would be wrong. This PR now removes the page-local sorters from the **audit, alerts and topic** tables only (17 declarations); the consumer sorters, both helpers and all their tests stay as trunk has them, which also resolves the earlier question about the caller-less helpers (they have callers again).
   
   ```
   cd web
   npx vitest run --maxWorkers=1 src/pages/ops/__tests__/AuditPage.test.tsx src/pages/ops/__tests__/AlertsPage.test.tsx src/pages/instance/__tests__/TopicPage.test.tsx src/pages/instance/__tests__/ConsumerPage.test.tsx
   Tests  162 passed (162)
   ```
   
   Still happy to drop or keep the audit/alerts halves per your merge-order ruling — #6686's render changes and this branch line up on the audit table either way now.


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