Conversation
We need to do an initial list call before the watch to get a properly formatted list. This was in the watch branch for quite a while but I removed it later as I though it was not needed. If we don't do the initial list, the output can look like this: ``` PROJECT NAME BUILDNAME APPLICATION nine-staging-cyrill eternal-azazel-qwhlr go-build-12 go nine-staging-cyrill full-komodo-d6w95 go-build-13 go nine-staging-cyrill known-quicksilver-6hb9b go-build-14 go nine-staging-cyrill loved-warbound-4kgmq go-build-11 go ``` This is fixed with this commit: ``` PROJECT NAME BUILDNAME APPLICATION nine-staging-cyrill loved-warbound-4kgmq go-build-11 go nine-staging-cyrill eternal-azazel-qwhlr go-build-12 go nine-staging-cyrill full-komodo-d6w95 go-build-13 go nine-staging-cyrill known-quicksilver-6hb9b go-build-14 go ``` This is because the third element is wider but the tabwriter is spaced out based on the first item if we do a watch without an initial list. Of course if our watch would later result in a new but wider item, the table would be misaligned again but that is unavoidable. As a secondary benefit, the initial list will be correctly sorted.
pawelkuc
approved these changes
Sep 9, 2025
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.
We need to do an initial list call before the watch to get a properly formatted list. This was in the watch branch for quite a while but I removed it later as I though it was not needed.
If we don't do the initial list, the output can look like this:
This is fixed with this commit:
This is because the third element is wider but the tabwriter is spaced out based on the first item if we do a watch without an initial list. Of course if our watch would later result in a new but wider item, the table would be misaligned again but that is unavoidable. As a secondary benefit, the initial list will be correctly sorted.