Skip to content

improve: scale annot_list popup width up to 140 cols on wide terminals#195

Merged
umputun merged 2 commits into
masterfrom
widen-annot-list-popup
May 13, 2026
Merged

improve: scale annot_list popup width up to 140 cols on wide terminals#195
umputun merged 2 commits into
masterfrom
widen-annot-list-popup

Conversation

@umputun
Copy link
Copy Markdown
Owner

@umputun umputun commented May 13, 2026

Bumps the annotation list popup's upper width cap from 70 to 140 cols (app/ui/overlay/annotlist.go:32) so it uses available screen real estate on wide terminals. Comment text gets ~2x more room before truncation; terminals under 80 cols are unchanged.

The 2-line layout proposed in the issue is not included: it halves visible-entry density which matters for users with many annotations. The width bump alone addresses the core "wasted screen space" complaint.

Addresses #191

#191)

Bump the upper cap on the popup width from 70 to 140 so the annotation
list uses available screen real estate on wide terminals. Comments get
2x more room before truncation; terminals under 80 cols are unchanged.
Copilot AI review requested due to automatic review settings May 13, 2026 17:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases the annotation list overlay width cap so annot_list can use more horizontal space on wide terminals, improving readability without changing narrow-terminal behavior.

Changes:

  • Raises annotation list popup width cap from 70 to 140 columns.
  • Adds a regression test covering popup width scaling across narrow, medium, capped, and wide terminal sizes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/ui/overlay/annotlist.go Updates the annotation list popup width calculation to allow wider rendering.
app/ui/overlay/annotlist_test.go Adds coverage for the new width scaling behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- [style] [annotlist.go:32] extract annotPopupMaxWidth/MinWidth/Margin/BorderPad constants matching themeselect.go and info.go
- [style] [annotlist_test.go:87] derive wantW from wantPopup + borderCols so the +2 border math is explicit per case
- [minor] [annotlist_test.go] add TestAnnotListOverlay_RenderWidePopupFitsMoreCommentText covering the user-visible payoff (more comment chars before truncation on wide terminals), not just popup geometry
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 13, 2026

Deploying revdiff with  Cloudflare Pages  Cloudflare Pages

Latest commit: 366d725
Status: ✅  Deploy successful!
Preview URL: https://3640f366.revdiff.pages.dev
Branch Preview URL: https://widen-annot-list-popup.revdiff.pages.dev

View logs

@umputun umputun merged commit fba8470 into master May 13, 2026
5 checks passed
@umputun umputun deleted the widen-annot-list-popup branch May 13, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants