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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5642
   
   ### Brief Description
   
   `output.stringify` renders table cells for nested JSON values (maps and 
arrays decoded from a tool response) with Go's default `fmt.Sprint` formatting, 
so a cell shows things like `map[max:10 used:3]` — Go-syntax noise with the 
server's actual JSON shape lost.
   
   The tool outputs are JSON to begin with, so nested objects and arrays are 
now rendered as their JSON form (`{"max":10,"used":3}`, `["a","b"]`). Scalars 
keep their existing rendering.
   
   ### How Did You Test This Change?
   
   ```
   $ cd rmqctl && go test ./internal/output/
   ok   github.com/apache/rocketmq-dashboard/rmqctl/internal/output
   
   $ go test ./internal/output/ -run TestRowsRendersNestedValuesAsJSON
   --- FAIL: TestRowsRendersNestedValuesAsJSON (0.00s)   # unpatched renderer, 
for contrast
       output_test.go:90: data line renders Go syntax for nested values: 
"group-a  map[max:10 used:3]  [a b]"
   ```
   
   `gofmt -l internal/output/` prints nothing, `go vet ./internal/output/` is 
clean.
   
   ### 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`
   - [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [x] New source files carry the ASF license header
   - [ ] Documentation touched where behaviour changed (README / `docs/` / 
in-app help)
   
   ---
   
   Re-submission of #5079: the original PR was closed by the stale bot after 7 
days without review activity, and GitHub rejects reopening pull requests in 
this repository ("state cannot be changed"), so the same change is re-submitted 
rebased onto the current `rocketmq-studio` tip (`6a68042f`). The original 
thread stays available at #5079.
   


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