Skip to content

feat(output): adopt published cli-engine nested-table views - #180

Merged
jpage-godaddy merged 1 commit into
mainfrom
cli-nested-tables
Aug 4, 2026
Merged

jpage-godaddy merged 1 commit into
mainfrom
cli-nested-tables

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Apply nested rendering to spots where raw JSON was leaking into human output instead of a table/property bag:
    • dns delete --dry-run (records)
    • dns set --dry-run (plan)
    • dns add (results)
    • domain quote (requiredAgreements, resolved)
    • platform app init (filesWritten)

Test plan

  • cargo check
  • cargo clippy -- -D warnings
  • cargo test (493 passing, including new regression tests per command)
  • cargo fmt --check
  • Manually ran gddy api describe /location --output human before/after to confirm the ambiguous-match fix

Copilot AI review requested due to automatic review settings August 3, 2026 23:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Rust CLI to use the published cli-engine 0.6.1 release (including its nested-table human rendering), fixes a human-output regression in api describe for ambiguous matches, and adopts explicit nested-table views across several commands so structured fields render as child tables/property bags instead of raw JSON.

Changes:

  • Bump cli-engine to 0.6.1 (and toml to 0.9) and adapt call sites to updated environment/config APIs and fallible api_url_for_env.
  • Add/expand TableColumn views (including nested columns) for api describe, DNS commands, domain quote, and platform app init, with regression tests for human output.
  • Refactor environment resolution to EnvConfig-based configs and update env listing/help behavior accordingly.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
rust/src/webhook/mod.rs Propagate env resolution failures when building the webhook API base URL.
rust/src/main.rs Update cli-engine environment test setup to new EnvTable API.
rust/src/hosting/nodejs/mod.rs Propagate env resolution failures when building the hosting API base URL.
rust/src/environments/mod.rs Major refactor to EnvConfig-driven environment resolution and updated tests.
rust/src/env/mod.rs Align env listing/help text with revised environment resolution behavior.
rust/src/domain/quote.rs Add nested-table view for requiredAgreements and resolved + rendering test.
rust/src/domain/common.rs Use resolved env config to build domains client with domains_api_url.
rust/src/dns/set.rs Add nested-table view for --dry-run plan output + rendering test.
rust/src/dns/delete.rs Add nested-table view for --dry-run records output + rendering test.
rust/src/dns/add.rs Add nested-table view for per-record results output + rendering test.
rust/src/auth.rs Switch auth provider construction/logging to GddyEnvConfig-derived endpoints.
rust/src/application/commands/mod.rs Add nested property-bag view for init’s filesWritten + rendering test; propagate env resolution errors in client creation.
rust/src/application/client.rs Make api_url_for_env fallible and stop silently falling back to other envs/defaults.
rust/src/api_explorer/mod.rs Add describe nested-table view (including ambiguous-match fields) + human-output regression test; propagate env resolution errors in call.
rust/Cargo.toml Bump cli-engine to 0.6.1 and toml to 0.9.
rust/Cargo.lock Lockfile updates for new cli-engine/toml dependency graph.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/src/environments/mod.rs Resolved
Comment thread rust/src/environments/mod.rs Resolved
Comment thread rust/src/application/commands/mod.rs Resolved
Comment thread rust/src/domain/quote.rs Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

…SON [DEVEX-968]

Adopts cli-engine 0.6.1's nested human-view rendering (TableColumn::nested)
so commands that return an array-of-objects or object field inside a
single-object result show it as an indented child table or property bag
instead of a raw JSON blob:

- `api describe`: `parameters` (and, for the ambiguous-match shape,
  `matches`/`message` — previously undeclared, so that response rendered
  as blank fields with no explanation)
- `dns delete --dry-run` / `dns set --dry-run`: `records` / `plan`
- `dns add`: `results`
- `domain quote`: `requiredAgreements`, `resolved`
- `platform app init`: `filesWritten`

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (2)

rust/src/domain/quote.rs:154

  • requiredAgreements items currently serialize the optional title field directly ("title": a.title), which will become JSON null when the API omits it. With the new nested table view, that can surface as a literal “null” in human output; since agreement_line() already normalizes missing titles, it’s better to do the same here.
        // Full structure for `--output json` / `--fields requiredAgreements`.

rust/src/api_explorer/mod.rs:899

  • The api describe view currently only declares a subset of the ApiOperation fields (e.g. it omits baseUrl, fullPath, scopes, requestBody, and responses). Because views only render declared fields, this likely drops core “describe” data from --output human, conflicting with the command’s help text (which promises request/response schema + scopes). Consider adding the missing top-level fields to the view so human output stays feature-complete while still rendering nested parameters/matches nicely.
        .with_view(vec![
            TableColumn::new("domain", "Domain"),
            TableColumn::new("operationId", "Operation ID"),
            TableColumn::new("method", "Method"),
            TableColumn::new("path", "Path"),

@jpage-godaddy
jpage-godaddy merged commit 9c15fd2 into main Aug 4, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the cli-nested-tables branch August 4, 2026 16:52
This was referenced Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants