Repository navigation
feat(output): adopt published cli-engine nested-table views - #180
Conversation
There was a problem hiding this comment.
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-engineto0.6.1(andtomlto0.9) and adapt call sites to updated environment/config APIs and fallibleapi_url_for_env. - Add/expand
TableColumnviews (including nested columns) forapi describe, DNS commands,domain quote, andplatform 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.
18c0396 to
afb7aac
Compare
…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>
afb7aac to
3ba8eb9
Compare
There was a problem hiding this comment.
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
requiredAgreementsitems currently serialize the optionaltitlefield 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; sinceagreement_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 describeview currently only declares a subset of theApiOperationfields (e.g. it omitsbaseUrl,fullPath,scopes,requestBody, andresponses). 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 nestedparameters/matchesnicely.
.with_view(vec![
TableColumn::new("domain", "Domain"),
TableColumn::new("operationId", "Operation ID"),
TableColumn::new("method", "Method"),
TableColumn::new("path", "Path"),
Summary
dns delete --dry-run(records)dns set --dry-run(plan)dns add(results)domain quote(requiredAgreements,resolved)platform app init(filesWritten)Test plan
cargo checkcargo clippy -- -D warningscargo test(493 passing, including new regression tests per command)cargo fmt --checkgddy api describe /location --output humanbefore/after to confirm the ambiguous-match fix