Truncate long error messages in queue view to prevent UI overflow

Long FFmpeg error messages were pushing the queue UI off screen, making
the interface unusable when jobs failed with verbose errors.

Changes:
- Truncate error messages to 150 characters maximum in status text
- Add helpful message indicating full error is available via Copy Error button
- Enable text wrapping on status labels to handle multi-line content gracefully
- Prevents UI layout breakage while maintaining error visibility

Users can still access the full error message via:
- Copy Error button (copies full error to clipboard)
- View Log button (opens per-job conversion log)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Stu Leak 2025-12-13 08:45:08 -05:00
parent 81cb415663
commit 1367a7e492

View File

@ -140,6 +140,7 @@ func buildJobItem(
statusText := getStatusText(job)
statusLabel := widget.NewLabel(statusText)
statusLabel.TextStyle = fyne.TextStyle{Monospace: true}
statusLabel.Wrapping = fyne.TextWrapWord
// Control buttons
var buttons []fyne.CanvasObject
@ -273,7 +274,13 @@ func getStatusText(job *queue.Job) string {
}
return fmt.Sprintf("Status: Completed%s", duration)
case queue.JobStatusFailed:
return fmt.Sprintf("Status: Failed | Error: %s", job.Error)
// Truncate error to prevent UI overflow
errMsg := job.Error
maxLen := 150
if len(errMsg) > maxLen {
errMsg = errMsg[:maxLen] + "… (see Copy Error button for full message)"
}
return fmt.Sprintf("Status: Failed | Error: %s", errMsg)
case queue.JobStatusCancelled:
return "Status: Cancelled"
default: