Skip to content

fix(output): keep key columns visible on narrow terminals - #311

Open
jpage-godaddy wants to merge 1 commit into
mainfrom
mandatory-columns
Open

jpage-godaddy wants to merge 1 commit into
mainfrom
mandatory-columns

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrades cli-engine to 0.10.0, which adds essential (mandatory) table columns.
  • Marks the single column (or few columns) each table can't be read without as essential, so they are never hidden or truncated when the terminal is narrow or output is piped at the default 80-column width. Everything else (descriptions, record IDs, secondary prices, parameter location/type) is hidden first when space runs out.
  • dns list now renders through a declared view, so its type, name, and data columns are protected too.

Essential columns by view (nested tables inside single-object views are included, since they are width-fitted too):

View Essential columns
dns list type, name, data
dns add domain; nested results: data, status
dns delete (dry-run) nested records: data, status
dns set (plan) nested plan: action, data
domain suggest domain, 1yr price, currency
domain agreements URL
domain available nested terms: period, price, fees
domain quote nested fees: type, amount, currency; required agreements: URL
platform app enablements name
api parameter list / api response list parameter name / response status
api operation get nested parameters: name; nested responses: status
api graphql get / type field or argument name

Commands that only set default fields (no declared view) can't carry the flag and are unchanged.

Test plan

  • cargo check --workspace
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • cargo fmt --check
  • ./rust/scripts/check-module-size.sh
  • New tests assert essential columns survive width-based hiding (dns list, domain suggest)

🤖 Generated with Claude Code

Upgrade to cli-engine 0.10.0 and mark the columns a table is unreadable
without as essential, so they are never hidden or truncated when the
terminal is narrow or output is piped at the default 80-column width.
Lower-priority columns (descriptions, record IDs, secondary prices) are
hidden first instead.

`dns list` now renders through a declared view so its type, name, and
data columns are protected too.

Co-Authored-By: Claude Code <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.

Copilot review overview

🟡 Changes recommended

Several agreement and API columns promised as essential remain eligible for hiding on narrow displays.

Review effort: Balanced
Findings: 7 Medium severity

Open (7)
What changed in this PR

Updates table rendering so critical columns remain visible on narrow terminals.

Changes:

  • Upgrades cli-engine to 0.10.0.
  • Marks key DNS, domain, platform, and API columns as essential.
  • Adds a declared DNS list view and narrow-width regression tests.
File Description
rust/​Cargo.toml Upgrades cli-engine.
rust/​Cargo.lock Locks the upgraded dependency.
rust/​src/​dns/​list.rs Adds an essential-column view and test.
rust/​src/​dns/​add.rs Protects add-result columns.
rust/​src/​dns/​delete.rs Protects delete-result columns.
rust/​src/​dns/​set/​mod.rs Protects set-plan columns.
rust/​src/​dns/​set/​outcome.rs Uses the preview rendering helper.
rust/​src/​domain/​suggest.rs Protects domain pricing columns and tests them.
rust/​src/​domain/​quote.rs Protects fee and agreement columns.
rust/​src/​domain/​available.rs Protects term pricing columns.
rust/​src/​domain/​agreements.rs Protects agreement URLs.
rust/​src/​platform/​app/​commands/​enablements.rs Protects application names.
rust/​src/​platform/​app/​commands/​init.rs Updates view-rendering tests.
rust/​src/​platform/​app/​commands/​import.rs Updates view-rendering tests.
rust/​src/​api/​parameter.rs Protects parameter names.
rust/​src/​api/​response.rs Protects response statuses.
rust/​src/​api/​operation.rs Protects nested API identifiers.
rust/​src/​api/​graphql/​get.rs Protects nested GraphQL names.
rust/​src/​api/​graphql/​type_cmd.rs Protects GraphQL field names.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust/src/api/graphql/get.rs
Comment thread rust/src/api/graphql/type_cmd.rs
Comment thread rust/src/api/operation.rs
Comment thread rust/src/api/parameter.rs
Comment thread rust/src/api/response.rs
Comment thread rust/src/domain/agreements.rs
Comment thread rust/src/domain/quote.rs
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.

2 participants