Conversation
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
There was a problem hiding this comment.
Pull request overview
This PR corrects tscli service command output handling so list services renders properly in interactive modes while keeping structured JSON/YAML aligned with the API response shape.
Changes:
- Decode
/servicesinto a typed wrapper and render onlyvipServicesforpretty/humanmodes. - Expand service fixtures and add regression tests asserting readable
pretty/humanoutput and correct JSON shape. - Update human output rendering for nested values and add OpenSpec requirements/archived change docs.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
cmd/tscli/list/services/cli.go |
Decodes list response into vipServices wrapper; prints slice for pretty/human and wrapper for json/yaml. |
cmd/tscli/get/service/cli.go |
Decodes single service response into a map before printing. |
pkg/output/human.go |
Enhances human-mode formatting by attempting inline rendering for arrays/maps. |
internal/testutil/apimock/fixtures.go |
Expands service fixtures and changes list fixture to match vipServices envelope shape. |
test/cli/example_output_test.go |
Adds rendered-output assertions for service commands and updates JSON-shape expectations for list services. |
test/cli/parity_new_commands_test.go |
Updates mocked success body for list services to the vipServices envelope. |
openspec/specs/service-command-output/spec.md |
Adds stable output requirements for service-oriented commands. |
openspec/specs/cli-command-test-coverage/spec.md |
Adds coverage requirements for pretty/human rendering of nested responses and service output regressions. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/tasks.md |
Archives task checklist for the change. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/specs/service-command-output/spec.md |
Archives the added service output requirements. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/specs/cli-command-test-coverage/spec.md |
Archives the modified test coverage requirements. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/proposal.md |
Archives the proposal rationale and scope. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/design.md |
Archives design decisions and trade-offs. |
openspec/changes/archive/2026-04-12-fix-service-pretty-output/.openspec.yaml |
Adds OpenSpec metadata for the archived change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef19fc7f10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
Signed-off-by: Lee Briggs lee@leebriggs.co.uk