Describe the bug
The truncateEmail function in tui/inbox.go only truncates the local part of the email address if it's longer than 8 characters. This can lead to very long email strings in the "ALL" view account indicators.
To reproduce
- Use an account with a long local part or a long domain.
- View emails in "ALL" view.
- Observe the account indicator truncation.
Expected behavior
Better truncation that balances local part and domain, or fits within a fixed width more gracefully.
Additional context
func truncateEmail(email string) string {
parts := strings.Split(email, "@")
if len(parts) >= 1 && len(parts[0]) > 8 {
return parts[0][:8] + "..."
}
if len(parts) >= 1 {
return parts[0]
}
return email
}
Describe the bug
The
truncateEmailfunction intui/inbox.goonly truncates the local part of the email address if it's longer than 8 characters. This can lead to very long email strings in the "ALL" view account indicators.To reproduce
Expected behavior
Better truncation that balances local part and domain, or fits within a fixed width more gracefully.
Additional context