Space the units in an agent's age - #8
Merged
Merged
Conversation
"28h51m30s" is one word to read before you can see the number that matters. Spaced, it is three: "28h 51m 30s". Go's Duration.String() also keeps trailing zeros, so a record exactly two hours old rendered "2h0m0s". Empty units are dropped now — "2h", and "1h 1s" where there are no whole minutes. Put in internal/agent beside Words rather than in the picker, because the `agents` listing formats the same thing and was already drifting: it called Round(time.Second).String() separately, so the CLI and the box could disagree about the same record. Co-Authored-By: Claude Opus 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.
28h51m30sis one word to read before you can see the number that matters.Spaced, it is three.
Go's
Duration.String()also keeps trailing zeros, so a record exactly twohours old rendered
2h0m0s. Empty units are dropped now —2h, and1h 1swhere there are no whole minutes.
Put in
internal/agentbesideWordsrather than in the picker, because theagentslisting formats the same thing and was already drifting: it calledRound(time.Second).String()separately, so the CLI and the box could disagreeabout the same record. Both now share one formatter.
Tested across the range, including the ordering property — units descend and
never repeat, with gaps allowed, since
1h 1sis correct when there are nowhole minutes.
🤖 Generated with Claude Code