Skip to content

feat: add a consistent table formatter for tabular output#116

Merged
angeloashmore merged 4 commits intoaa/remote-modelingfrom
aa/format-table
Apr 10, 2026
Merged

feat: add a consistent table formatter for tabular output#116
angeloashmore merged 4 commits intoaa/remote-modelingfrom
aa/format-table

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 10, 2026

Resolves: #113

Description

Add a formatTable utility to src/lib/string.ts that computes column widths and pads cells with consistent spacing. Refactor all commands with tabular output to use it, replacing ad-hoc padEnd() logic and unaligned double-space concatenation.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

  • Run prismic --help and prismic <command> --help to verify aligned columns in help text
  • Run list commands (locale list, repo list, token list, preview list, webhook list, type list, slice list, docs list) to verify aligned columns
  • Run view commands (type view, slice view) to verify aligned field tables

Note

Low Risk
Low risk formatting-only change: replaces ad-hoc string concatenation/padding with a shared formatTable helper, which could slightly alter CLI text output and snapshot-like tests but not behavior or data handling.

Overview
Adds a new formatTable() utility in src/lib/string.ts and switches CLI help + multiple list/view commands to use it for consistently aligned, columnar output (including optional headers).

Updates command help rendering in src/lib/command.ts and refactors tabular outputs in commands like docs list, repo/locale/preview/token/webhook/type/slice list, and type/slice view; associated tests were loosened to match whitespace-aligned table output rather than exact strings.

Reviewed by Cursor Bugbot for commit 729b9ba. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6f1a889. Configure here.

angeloashmore and others added 3 commits April 10, 2026 13:15
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore merged commit 90227ab into aa/remote-modeling Apr 10, 2026
13 checks passed
@angeloashmore angeloashmore deleted the aa/format-table branch April 10, 2026 23:28
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.

1 participant