Repository navigation
Fix the rule below a pull request's header being rendered with the wrong width - #6091
Merged
Merged
Conversation
The next commit checks whether the task was stopped once more before the command starts. Use the same check there as in the loop that reads the command's output. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The rule below the header of a branch's pull request is drawn as wide as the main view. Its width is read when the render is asked for, before the layout has settled it. If the layout then changes the width of the main view, for example because it unsplits the view for the content that comes next, the rule comes out as wide as the view used to be. Make a prefix a function that is called with the width the render is laid out to, once the layout has run. The function it returns produces the text on the render's own goroutine before the command starts. This way a prefix that takes a while to produce, such as one that runs commands of its own, holds up only the render and not the UI. All prefixes are still static here; the next commit lays out the rule of the pull request header to the width. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>
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.
When selecting a branch that has a pull request associated with it, the main view shows a PR header and a rule below it that separates the header from the branch log. That rule didn't always have the correct width: one scenario where it didn't was when you look at a diff with both staged and unstaged changes whose view is split side-by-side (e.g. because you use
gui.mainPanelSplitMode: horizontal), and then jumping to the branches panel with a PR branch selected. In that case, the rule was still rendered to the shorter width of the split view.