Show a long link in full and let Enter open it - #531
Merged
Merged
Conversation
A selected link could only be opened when its whole destination fit on the footer row, so a long tracking URL was stuck behind "Enlarge the terminal" on all but the widest screens. The footer now keeps the scheme and host in full and cuts the rest of the path short, which still says where the link goes, and Enter opens it. A destination with no host, like a mailto link, still has to fit in full.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The TUI documentation still incorrectly promises that the complete destination is always displayed.
Review effort: Balanced
Findings: 1
What changed in this PR
Enables opening long thread links once their scheme and host are visible.
Changes:
- Truncates long URL paths in the footer.
- Opens the complete URL after review.
- Adds tests and TUI documentation.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
internal/tui/mail.go |
Adds host-preserving footer truncation. |
internal/tui/mail_test.go |
Tests truncation and full URL opening. |
docs/tui.md |
Documents long-link behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Trimming the path kept the host readable, but the point of the status row is seeing exactly where a link goes before opening it. A destination too long for one row now wraps onto the rows it needs, taken from the thread while that link is selected, and Enter opens it. When the terminal is too short for all of those rows the enlarge hint comes back and Enter does nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In a thread, a selected link could only be opened when its whole destination fit on the footer row. Long tracking URLs, which newsletters are full of, were stuck behind "Enlarge the terminal to inspect this link" on anything but a very wide terminal.
A destination too long for one row now wraps onto as many rows as it needs. You still see exactly where the link goes before pressing Enter, and Enter opens it. The extra rows come out of the thread only while that link is selected, and the thread scrolls to keep the selected link on screen. Short links still take a single row, so moving between them doesn't resize anything.
If the terminal is too short for all of the rows, the enlarge hint comes back and Enter does nothing, as before.
Basecamp card: https://app.basecamp.com/2914079/buckets/48521764/card_tables/cards/10356872225
Summary by cubic
Lets you open a selected link in a thread as soon as the footer can show the whole destination, even when it wraps onto multiple rows instead of fitting one.
docs/tui.mdso the link-row text no longer promises a one-row display of the complete destination.Written for commit 654f926. Summary will update on new commits.
Recorded against the local dev server. Both takes open a thread with one long link, Tab to it, and press Enter.
xdg-openis stubbed to log whatever it's handed, so the last line shows what actually got opened.