Skip to content

Improve how DNS records are displayed #13

@weppos

Description

@weppos

Description

When listing DNS records via dnsimple records list <domain>, the table output is rendered with a tabwriter-based renderer that is not aware of the terminal width. As a result:

  • Long cell values (e.g., long TXT record content) overflow their cell and break the alignment of the table.
  • The output does not adapt to narrower terminal sizes, making it hard to read on smaller resolutions.

Expected Behavior or Outcome

  • The DNS records list table renders cleanly regardless of cell content length.
  • Long content wraps inside its own cell instead of overflowing into adjacent columns or off-screen.
  • The table adapts to the current terminal width (with a sensible fallback when the width cannot be detected).

Acceptance Criteria

  • Running dnsimple records list <domain> against a domain with long record content (e.g., long TXT records) produces a table that fits within the current terminal width.
  • Resizing the terminal to a narrower width and re-running the command produces a table that still fits the new width and remains readable.
  • No row in the rendered output exceeds the detected terminal width.
  • Long cell values are confined to their own cell (no bleeding into adjacent columns).
  • Automated test coverage exists for the wrapping behavior of long table cells.

Resources/References

Notes

  • The original implementation relied on text/tabwriter, which has no concept of a maximum width or wrapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions