Skip to content

[output] add table format support#32

Merged
capcom6 merged 1 commit into
masterfrom
output/table-format-support
Jun 24, 2026
Merged

[output] add table format support#32
capcom6 merged 1 commit into
masterfrom
output/table-format-support

Conversation

@capcom6

@capcom6 capcom6 commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a new table option to the CLI --format flag, rendering message state, logs, and webhook details in a structured, human-readable tabular layout (including relevant status and device information).
  • Documentation

    • Updated the README “Output Formats” section and added a new Table example showing the expected columns and formatting.
  • Improvements

    • Standardized how empty logs and webhooks are displayed for consistent “empty result” messaging.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@capcom6, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 17 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35c46e82-0d83-428e-9719-ecf5168826f2

📥 Commits

Reviewing files that changed from the base of the PR and between a055325 and 2b8ecb2.

📒 Files selected for processing (5)
  • README.md
  • cmd/smsgate/smsgate.go
  • internal/core/output/output.go
  • internal/core/output/table.go
  • internal/core/output/text.go
📝 Walkthrough

Walkthrough

Adds a table output format to the CLI. A new TableOutput struct implementing the Renderer interface is introduced using text/tabwriter. The Format enum and New() factory are extended to include Table. An EmptyResult constant is extracted and shared with the existing TextOutput. The CLI flag help and README are updated accordingly.

Changes

Table Output Format

Layer / File(s) Summary
Format enum, EmptyResult constant, and factory wiring
internal/core/output/output.go, internal/core/output/text.go
Table is added to the Format constant block; a new exported EmptyResult = "Empty result" constant is introduced; New() gains a case Table routing to NewTableOutput(); text.go replaces hardcoded "Empty result" literals with the new constant.
TableOutput renderer implementation
internal/core/output/table.go
New file defining TableOutput with NewTableOutput() and all five Renderer methods (MessageState, Logs, Webhook, Webhooks, Success) using text/tabwriter for column-aligned output, plus a compile-time interface assertion.
CLI flag help and README docs
cmd/smsgate/smsgate.go, README.md
--format flag usage string updated to list table; README "Output Formats" section updated to four formats with a new Table example block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add table format support' directly and clearly describes the main change: introducing a new table output format to the CLI, which is evidenced by all file modifications.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Pull request artifacts

Platform File
🐳 Docker GitHub Container Registry
🍎 Darwin arm64 smsgate_Darwin_arm64.tar.gz
🍎 Darwin x86_64 smsgate_Darwin_x86_64.tar.gz
🐧 Linux arm64 smsgate_Linux_arm64.tar.gz
🐧 Linux i386 smsgate_Linux_i386.tar.gz
🐧 Linux x86_64 smsgate_Linux_x86_64.tar.gz
🪟 Windows arm64 smsgate_Windows_arm64.zip
🪟 Windows i386 smsgate_Windows_i386.zip
🪟 Windows x86_64 smsgate_Windows_x86_64.zip

@capcom6

capcom6 commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@capcom6

capcom6 commented Jun 23, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot added the codex label Jun 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 414-417: The README.md webhook example table shows a `-` character
for a missing device ID, but the actual table renderer in
internal/core/output/table.go (around the DeviceID nil handling at lines
124-128) outputs an empty string instead. Update the README.md example table to
replace the `-` with an empty value (blank space) for the device ID field in the
second row to match what the renderer actually produces when DeviceID is nil,
ensuring the documentation example accurately reflects the actual output
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c58b8f97-f95d-4df1-8006-2eb704acfb43

📥 Commits

Reviewing files that changed from the base of the PR and between becb9b0 and 589dbd4.

📒 Files selected for processing (5)
  • README.md
  • cmd/smsgate/smsgate.go
  • internal/core/output/output.go
  • internal/core/output/table.go
  • internal/core/output/text.go

Comment thread README.md
@capcom6 capcom6 force-pushed the output/table-format-support branch from a055325 to 2b8ecb2 Compare June 23, 2026 07:26
@capcom6 capcom6 merged commit 3d4a331 into master Jun 24, 2026
10 checks passed
@capcom6 capcom6 deleted the output/table-format-support branch June 24, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant