Skip to content

πŸ› Table output truncates long error messagesΒ #63

@jordanpartridge

Description

@jordanpartridge

Problem

Laravel Prompts table() function has column width limits (~140 characters), causing error messages to be truncated with ... which makes debugging impossible.

Current Behavior

β”‚ Tests & Coverage β”‚ bifrost:withings:auth β†’ it shows auth URL when no code provided: ! bifrost:withings:auth β†’ it fails when client_id is missing β†’ file_g… 0.02s β”‚

Expected Behavior

Users should be able to see the complete error message.

Root Cause

File: app/Commands/CertifyCommand.php:149-152

The table rendering truncates at column width limits:

table(
    headers: ['Check', 'Issue'],
    rows: $failureRows
);

Proposed Solutions

Option A: Multi-line Error Display

foreach ($failureRows as [$check, $detail]) {
    error("[$check] " . wordwrap($detail, 120, "\n           "));
}

Option B: Add --verbose Flag

if ($this->option('verbose')) {
    // Show full untruncated output
    foreach ($failureRows as [$check, $detail]) {
        error("[$check] $detail");
    }
} else {
    // Show truncated table (current behavior)
    table(['Check', 'Issue'], $failureRows);
}

Priority

CRITICAL - This is blocking users from debugging test failures across multiple repositories.

Test Case

Add test for messages > 140 characters:

it('displays complete error messages without truncation', function () {
    $longMessage = str_repeat('x', 200);
    // Assert full message is visible in output
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions