You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/08/31 22:16:53 UTC

[PR] fix(web): trim whitespace in cluster overview search normalization [rocketmq-dashboard]

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

   ## Summary
   
   - Make the cluster overview page's shared `searchText` normalizer trim user input in addition to being null-safe and lower-casing it (`pages/cluster/index.tsx`).
   - Export `searchText` for unit coverage and add regression tests:
     - new unit suite `pages/cluster/clusterSearchText.test.ts` (trim / empty / whitespace-only / null / undefined input);
     - new page-level test in `ClusterPage.test.tsx`: submitting a whitespace-only broker search keeps all broker rows visible.
   
   ## Why
   
   The broker / NameServer / Proxy panels all use `Input.Search` with `onSearch`, so a submission of only spaces previously produced a non-empty normalized keyword. Since `"".includes(" ")` is `false` for every row, a whitespace-only search silently hid the entire table until the user cleared the box. The certs and clients pages already trim their search input; the overview page was the remaining outlier in the cluster domain.
   
   ## Testing
   
   - `cd web && ./node_modules/.bin/vitest run src/pages/cluster/clusterSearchText.test.ts src/pages/cluster/__tests__/ClusterPage.test.tsx` — 2 files, 24 tests passed (3 new unit tests, 1 new page-level regression test; all pre-existing tests still pass).
   - `cd web && ./node_modules/.bin/tsc --noEmit` — clean.
   - `cd web && ./node_modules/.bin/eslint src/pages/cluster/index.tsx src/pages/cluster/clusterSearchText.test.ts src/pages/cluster/__tests__/ClusterPage.test.tsx` — 0 errors (1 react-refresh warning for the exported helper, same precedent as other page-level helper exports).
   


-- 
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(web): trim whitespace in cluster overview search normalization [rocketmq-dashboard]

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

   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] fix(web): trim whitespace in cluster overview search normalization [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2871: fix(web): trim whitespace in cluster overview search normalization
URL: https://github.com/apache/rocketmq-dashboard/pull/2871


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