From 576017c00b1d9cf96290052c644673791b6801ca Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 5 Oct 2026 16:13:21 +0200 Subject: [PATCH] Lay out the rule below a pull request's header to the main view's width The rule was as wide as the main view was when the render was asked for. If the layout then changed the width of the main view, the rule came out too long or too short. Co-Authored-By: Claude Opus 5.5 (1M context) --- pkg/gui/controllers/branches_controller.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/gui/controllers/branches_controller.go b/pkg/gui/controllers/branches_controller.go index 29864bf04..37ac90261 100644 --- a/pkg/gui/controllers/branches_controller.go +++ b/pkg/gui/controllers/branches_controller.go @@ -210,8 +210,10 @@ func (self *BranchesController) GetOnRenderToMain() func() { pr, ok := self.c.Helpers().Host.PullRequestForBranch(branch.Name) if ok && presentation.ShouldShowPrForBranch(pr, branch.Name, self.c.UserConfig()) { - rendererTask.Prefix = types.StaticPrefix(presentation.FormatPullRequestHeader(pr, self.c.Tr) + - strings.Repeat("─", self.c.Contexts().Normal.GetView().InnerWidth()) + "\n") + header := presentation.FormatPullRequestHeader(pr, self.c.Tr) + rendererTask.Prefix = types.PrefixForWidth(func(width int) string { + return header + strings.Repeat("─", width) + "\n" + }) } }