-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tui): start pty with matching TUI size (#9101)
### Description Fixes #9060 [From the issue](#9060 (comment)) > I think I see the issue, it appears that rspack adds enough trailing spaces in the progress bar output the fill the current line: > > ``` > ● ESC[1mESC[0m ESC[32mESC[37mESC[2m━━━━━━━━━━━━━━━━━━━━━━━━━ESC[0mESC[0m (0%) ESC[2msetup compilation ESC[0m^MESC[2K > ``` > > The `ESC[2K` operation at the erases the current line, but if the trailing spaces have caused the line to wrap, it won't erase the intended line instead just the line overflow. This probably indicates we have a mismatch in the PTY dimensions and the virtual terminal dimensions so `rspack` is outputting too many spaces for the terminal. > > I'll look at making sure the underlying PTY has the exact same dimensions as the virtual terminal. There is future work to make sure that we update underlying PTY instances if the pane changes sizes, but that requires a pretty heavy refactor to our process management code to communicate with the PTY "controller" as we only hold onto the "receiver". ### Testing Instructions Before: <img width="899" alt="Screenshot 2024-09-03 at 9 34 21 AM" src="https://github.com/user-attachments/assets/b773457e-33ef-4075-aae4-9b0b9932a47a"> After: <img width="483" alt="Screenshot 2024-09-03 at 9 30 20 AM" src="https://github.com/user-attachments/assets/34997ea3-1032-4cf5-96db-b3a30e1c752e">
- Loading branch information
1 parent
8461559
commit 29fe5ef
Showing
6 changed files
with
110 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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