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/09/21 08:05:31 UTC

[PR] fix(settings): join the data source instances with the viewer language separator [rocketmq-dashboard]

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

   <!-- Base branch: `rocketmq-studio`, the RocketMQ Studio trunk. -->
   
   ### Which Issue(s) This PR Fixes
   
   - No open issue tracks this defect; see `### Related issue` below.
   
   ### Brief Description
   
   `web/src/pages/settings/DataSourceTab.tsx:298` joined the bound instance list with a hardcoded
   ideographic comma:
   
   ```ts
   .join('、');
   ```
   
   That string is both the 适用实例 table column and the `Instances` column of the exported CSV, and the
   settings page renders in English as well, so an English reader saw `instance-a、instance-b` in the
   table and downloaded a CSV carrying Chinese punctuation. The separator now follows the viewer
   language, the way `pages/instance/index.tsx:408,491,507` and the traffic insights panel already pick
   their separators.
   
   ### How Did You Test This Change?
   
   New case in `web/src/pages/settings/__tests__/DataSourceTab.test.tsx`: it stores `en` as the language
   preference, serves one data source bound to `['instance-a', 'instance-b']`, and asserts the rendered
   cell is `instance-a, instance-b` and that no ideographic comma is rendered at all.
   
   Both runs below use the project's own test runner through the workspace-local binary
   (`web/node_modules/.bin/vitest.cmd`, vitest 4.1.10 as pinned by `web/package.json`), not a
   downloaded one.
   
   Red - on the unmodified base (new test copied in, `DataSourceTab.tsx` untouched):
   
   ```
   $ cd web && .\node_modules\.bin\vitest.cmd run src/pages/settings/__tests__/DataSourceTab.test.tsx
    ❯ src/pages/settings/__tests__/DataSourceTab.test.tsx (13 tests | 1 failed) 245ms
        × joins the applied instance list with the viewer language separator 245ms
   
    FAIL  src/pages/settings/__tests__/DataSourceTab.test.tsx > DataSourceTab > joins the applied instance list with the viewer language separator
   AssertionError: expected 'instance-a、instance-b' to be 'instance-a, instance-b' // Object.is equality
   Expected: "instance-a, instance-b"
   Received: "instance-a、instance-b"
   
    Test Files  1 failed (1)
         Tests  1 failed | 12 passed (13)
   ```
   
   Green - with the fix:
   
   ```
   $ cd web && .\node_modules\.bin\vitest.cmd run src/pages/settings/__tests__/DataSourceTab.test.tsx
    Test Files  1 passed (1)
         Tests  13 passed (13)
      Duration  58.07s
   ```
   
   ```
   $ cd web && npx tsc -b            # exit 0, no output
   $ cd web && .\node_modules\.bin\eslint.cmd src/pages/settings/DataSourceTab.tsx src/pages/settings/__tests__/DataSourceTab.test.tsx
                                     # exit 0, no output
   ```
   
   Clean-tree baseline for the whole frontend area on this base, for comparison: `Test Files 2 failed |
   132 passed (134)`, `Tests 3 failed | 1232 passed (1235)`; all three pre-existing failures are
   `TopicPage` cases timing out at the 20 000 ms limit, unrelated to this change. The 12 other cases of
   this file (including the export, credential and modal-test cases) are unchanged and still pass.
   
   ### Related issue
   
   - #4630 tracks hardcoded Chinese text in the English UI for three other pages (Ops runtime-config
     alert, Broker Cluster instance selector, alert-rule template subtitle) and does not cover the
     applied-instance column; the sibling punctuation defect in the home traffic insights panel is
     #4706, which is open and touches a different file.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`)
   - [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 UI text is added; only the separator between already-localized values changes)
   - [x] Architecture constraints stay green (`mvn test` runs the ArchUnit checks); no server file is touched, so the Java suite is not affected
   - [x] New source files carry the ASF license header (no new source file)
   - [x] Documentation touched where behaviour changed (no README / `docs/` page documents this column)


-- 
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(settings): join the data source instances with the viewer language separator [rocketmq-dashboard]

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

   Same batch, waiting for a first review — joins the data source instances with the viewer-language separator. Mergeable/clean against `rocketmq-studio` (empty checks = repo-wide CI startup failure, #4136). @lizhimins whenever convenient.


-- 
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(settings): join the data source instances with the viewer language separator [rocketmq-dashboard]

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

   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(settings): join the data source instances with the viewer language separator [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4719: fix(settings): join the data source instances with the viewer language separator
URL: https://github.com/apache/rocketmq-dashboard/pull/4719


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