fix(tui): add left padding between task list border and pane output#12795
Open
SanskaarUndale21 wants to merge 1 commit into
Open
fix(tui): add left padding between task list border and pane output#12795SanskaarUndale21 wants to merge 1 commit into
SanskaarUndale21 wants to merge 1 commit into
Conversation
Adds a 1-space left padding to the terminal pane when the sidebar is visible. The task list's right border character (│) was immediately adjacent to task output, causing terminal emulators like VSCode to include it when auto-detecting file paths and URLs, breaking ctrl-click links. Reduces pane_cols by 1 when sidebar is visible to keep the PTY dimensions consistent with the padded render area. Fixes vercel#12791
Contributor
|
@SanskaarUndale21 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR addresses a TUI UX issue where the task list’s right border character (│) appears immediately adjacent to pane output, which can interfere with terminal link/path detection (e.g. VSCode ctrl-click). The change introduces a 1-column left padding for the output pane when the sidebar is visible, and adjusts pane width calculations accordingly.
Changes:
- Add conditional left padding to the terminal pane block when the sidebar is visible (
pane.rs). - Update pane column sizing logic to account for the sidebar border plus the new padding (
size.rs).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
crates/turborepo-ui/src/tui/size.rs |
Adjusts pane column calculations when the sidebar is visible to account for the border/padding change. |
crates/turborepo-ui/src/tui/pane.rs |
Adds conditional left padding to visually separate the sidebar border from pane output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
47
to
+52
| let full_task_width = self.cols.saturating_sub(self.task_width_hint); | ||
| full_task_width | ||
| .max(ratio_pane_width) | ||
| // We need to account for the left border of the pane | ||
| .saturating_sub(1) | ||
| // Account for the task list right border (│) and the 1-space | ||
| // left padding added in pane.rs to separate it from task output. | ||
| .saturating_sub(2) |
Comment on lines
+86
to
+91
| // One space so the task list's │ border doesn't attach to paths/URLs in output. | ||
| let padding = if self.has_sidebar { | ||
| Padding::new(1, 0, 0, 0) | ||
| } else { | ||
| Padding::ZERO | ||
| }; |
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.
Summary
│) was immediately adjacent to task output in the TUI pane.│when auto-detecting file paths and URLs in output, breaking ctrl-click links.Paddingto the terminal pane block when the sidebar is visible, putting a space between│and the output.pane_colsby 1 in the sidebar-visible case so the PTY dimensions stay consistent with the padded render area.│border present in that layout).Fixes #12791
Test plan
npx turbo devin a project with file path output (e.g. TypeScript errors, linter output)│border and task output texthto toggle the sidebar off and back on -- spacing should only appear when sidebar is visiblecargo test -p turborepo-ui