Skip to content

fix: table layout overflow#142

Merged
felipefreitag merged 5 commits intomainfrom
worktree-fix-dns-table-layout-overflow
Mar 23, 2026
Merged

fix: table layout overflow#142
felipefreitag merged 5 commits intomainfrom
worktree-fix-dns-table-layout-overflow

Conversation

@felipefreitag
Copy link
Contributor

@felipefreitag felipefreitag commented Mar 20, 2026

Add a card layout for long outputs and for narrow terminals.

@felipefreitag felipefreitag changed the title fix: dns table layout overflow fix: table layout overflow Mar 20, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

8 issues found across 14 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/domains/utils.ts">

<violation number="1" location="src/commands/domains/utils.ts:22">
P2: The DNS card separator is fixed-width and can still overflow on narrow terminals.</violation>

<violation number="2" location="src/commands/domains/utils.ts:38">
P3: The new `renderTable` column-options argument is currently unused, so this added config is dead code.</violation>
</file>

<file name="src/commands/contacts/utils.ts">

<violation number="1" location="src/commands/contacts/utils.ts:28">
P2: The added column config is currently a no-op because `renderTable` ignores its `_columns` argument, so the overflow fix is not applied.</violation>
</file>

<file name="src/commands/webhooks/utils.ts">

<violation number="1" location="src/commands/webhooks/utils.ts:42">
P2: This added column config is currently a no-op because `renderTable` ignores its `_columns` parameter, so the overflow fix is not actually applied.</violation>
</file>

<file name="src/commands/contact-properties/utils.ts">

<violation number="1" location="src/commands/contact-properties/utils.ts:16">
P2: This new column-options argument is currently ignored by `renderTable`, so `{ fixed: true }` does not affect layout/overflow and the intended fix is not applied.</violation>
</file>

<file name="src/commands/broadcasts/utils.ts">

<violation number="1" location="src/commands/broadcasts/utils.ts:34">
P2: The new column config is ignored by `renderTable`, so this change does not actually affect table overflow behavior.</violation>
</file>

<file name="src/commands/api-keys/utils.ts">

<violation number="1" location="src/commands/api-keys/utils.ts:7">
P2: The added column options are currently ignored by `renderTable`, so this change does not affect layout behavior and introduces no-op config.</violation>
</file>

<file name="src/commands/segments/utils.ts">

<violation number="1" location="src/commands/segments/utils.ts:6">
P2: The new column config is ignored because `renderTable` does not use its `_columns` parameter, so this change does not actually affect overflow/layout.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@felipefreitag felipefreitag requested a review from vcapretz March 20, 2026 20:33
renderTable now detects terminal width and either proportionally shrinks
columns or switches to a vertical card layout when columns would become
too narrow to be useful (below 12 chars). ID columns are marked as fixed
to prevent truncation. When piped, tables render at full natural width.
Columns already below MIN_USEFUL_WIDTH (like Status at ~9 chars)
were triggering card mode at normal terminal widths. Now only columns
that were wide enough but got crushed below the threshold trigger the
card fallback.
…overflows

Instead of proportionally shrinking columns with "..." truncation
(which still produces unreadable output), simply switch to the card
layout whenever the table doesn't fit the terminal width. Table
renders at full natural width or cards — no middle ground.
The columns/fixed parameter was only needed for the truncation logic,
which has been removed in favor of the card fallback. All callers
reverted to the original 3-arg renderTable signature.
@felipefreitag felipefreitag force-pushed the worktree-fix-dns-table-layout-overflow branch from e3a76c7 to 7252cb5 Compare March 23, 2026 13:20
@felipefreitag felipefreitag merged commit d9e325a into main Mar 23, 2026
6 checks passed
@felipefreitag felipefreitag deleted the worktree-fix-dns-table-layout-overflow branch March 23, 2026 13:20
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