Skip to content

fix(output): standardize table styles and add Cloud ACL formatters#764

Merged
joshrotenberg merged 2 commits intomainfrom
fix/output-formatting-consistency
Mar 3, 2026
Merged

fix(output): standardize table styles and add Cloud ACL formatters#764
joshrotenberg merged 2 commits intomainfrom
fix/output-formatting-consistency

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

  • Standardize all table styles to Style::blank() across Cloud commands (replacing Style::rounded() and Style::modern())
  • Add curated table formatters for Cloud ACL commands (redis rules, roles, users) matching the Enterprise pattern from Add #[derive(Tabled)] row structs for Enterprise commands #761
  • Use output_with_pager for task list table output (was using println!)
  • Re-export resolve_auto from cloud utils for consistent format branching

Closes #762

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --lib --all-features (72 tests pass)
  • cargo test --test '*' --all-features (all integration tests pass)
  • cargo doc --no-deps --all-features

…761)

Add #[derive(Tabled)] row structs to all Enterprise list and get
commands, replacing the generic print_as_table() which dumped all JSON
fields uncurated. This matches the Cloud command patterns established
in PR #760.

Row structs added: DatabaseRow, NodeRow, UserRow, RoleRow, AclRow,
ModuleRow, ShardRow, ProxyRow. Get commands use DetailRow for vertical
key-value display. Cluster get also uses DetailRow.

Output branching uses resolve_auto() (now public) to render curated
tables on TTY and pass through JSON/YAML for piped output. JMESPath
queries are applied before table rendering.
Polishes output formatting consistency across the codebase:
- Replace all Style::rounded()/Style::modern() with Style::blank()
- Add curated table formatters for Cloud ACL commands (rules, roles, users)
- Use output_with_pager where println! was used for table output
- Re-export resolve_auto from cloud utils for format branching
@joshrotenberg joshrotenberg merged commit 7faed7f into main Mar 3, 2026
16 checks passed
@joshrotenberg joshrotenberg deleted the fix/output-formatting-consistency branch March 3, 2026 19:09
@joshrotenberg joshrotenberg mentioned this pull request Mar 3, 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.

Output formatting consistency polish

1 participant