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)
This commit is contained in:
parent
7c5bd3e2a3
commit
ca7b9a9bc2
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user