Fix TTY timer rendering when duration length changes#13634
Merged
ndeloof merged 2 commits intodocker:mainfrom Mar 20, 2026
Merged
Fix TTY timer rendering when duration length changes#13634ndeloof merged 2 commits intodocker:mainfrom
ndeloof merged 2 commits intodocker:mainfrom
Conversation
Signed-off-by: Samarth Verma <verma.samarth05@gmail.com>
e1d83a0 to
cecb55b
Compare
ndeloof
requested changes
Mar 20, 2026
cmd/display/tty.go
Outdated
| } | ||
| timerWidth := utf8.RuneCountInString(l.timer) | ||
| if timerWidth < timerLen { | ||
| l.timer = l.timer + strings.Repeat(" ", timerLen-timerWidth) |
Contributor
There was a problem hiding this comment.
this should use left-padding to align counter on terminal right
Signed-off-by: Samarth Verma <verma.samarth05@gmail.com>
Contributor
Author
|
Implemented left-padding for the timer column so the timer aligns on the terminal right edge. Also added a regression test to cover differing timer widths. Thanks @ndeloof. |
ndeloof
approved these changes
Mar 20, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
What I did
10.6s) and others are shorter (e.g.0.0s), the shorter timers correctly overwrite any previous content.0.0ssfrom leftover characters.Related issue
Fixes #13633