gpui: Trim trailing whitespace and punctuation before ellipsis (#57106)

When truncating text at the end with an ellipsis, the truncation point
can land right after a space or punctuation character, producing results
like `"some text …"` or `"some text-…"`.

This trims trailing whitespace and ASCII punctuation from the truncated
prefix before appending the ellipsis affix, so you get clean results
like `"some text…"` instead.

Release Notes:

- Improved text truncation to avoid trailing spaces or punctuation
before the ellipsis.
46b08f9d7dConrad Irwin committed on 5/19/2026, 11:46:05 AM· committed by GitHubparent4557ad7
1 file changedLine totals unavailable