fix(code): show months instead of "0y ago" for 360-364 day old timestamps#4267
Merged
Mason Daugherty (mdrxy) merged 2 commits intoJun 25, 2026
Conversation
Member
|
thanks - how did you encounter this OOC? can you update PR description with a user story of where this resolves? |
Contributor
Author
|
From a user's perspective, this can show up in places like the /threads switcher (which displays thread age) and the release update notice ("released ... ago"). So if a thread or release is almost a year old, it can end up showing "0y ago", which doesn't look quite right. I've updated the PR description with that user-facing example as well. |
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Jun 26, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Everything below this line will be the GitHub release body._ --- ## [0.1.25](deepagents-code==0.1.24...deepagents-code==0.1.25) (2026-06-26) ### Bug Fixes * Bind ephemeral port instead of squatting `langgraph dev`'s 2024 ([#4264](#4264)) ([11e5359](11e5359)) * Block dotenv shell startup hooks ([#4288](#4288)) ([686d6f3](686d6f3)) * Defer server graph construction ([#4300](#4300)) ([220dfc0](220dfc0)) * Avoid blocking MCP imports during graph readiness ([#4302](#4302)) ([7533ca8](7533ca8)) * Gate `delete` file operations ([#4299](#4299)) ([92a8681](92a8681)) * Handle recursive `fetch_url` conversion ([#4257](#4257)) ([f240a40](f240a40)) * Report editable SDK runtime version ([#4304](#4304)) ([4439e91](4439e91)) * Show months instead of "0y ago" for 360-364 day old timestamps ([#4267](#4267)) ([820b331](820b331)) * Surface `/auth`-stored credentials in `config show`/`get` ([#4258](#4258)) ([c7c8788](c7c8788)) * Switch input mode without flashing the mode trigger ([#4243](#4243)) ([fc5d9cb](fc5d9cb)) --- _Everything above this line will be the GitHub release body._ --- > [!NOTE] > A **New Contributors** section is appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 2). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mason Daugherty <github@mdrxy.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.
Fixes #4265
Summary
format_relative_timestampshowed"0y ago"for timestamps 360–364 days old, since the months branch stopped atdays < 360but the years branch only kicks in atdays >= 365. This closes that gap so those dates show"12mo ago".User story: with relative timestamps enabled, opening the
/threadsswitcher to resume an old session shows each thread's age. A thread last touched ~360–364 days ago reads"0y ago", which looks broken and is hard to tell apart from a brand-new thread. The same helper formats thereleased … agoline on the update notice, so that hits the gap too. After this fix both read"12mo ago".I came across it while reading the timestamp bucketing, the month bucket divides by 30 and the year bucket by 365, so I checked the boundary between them and confirmed 360–364 days falls through to
"0y ago".No breaking changes; only the 360–364 day range is affected.
How I verified: added a boundary test that fails on
mainand passes here, and ranmake format,make lint, andmake testfor thecodepackage.Social handles (optional)
Twitter: @PrvshHasNoLife
LinkedIn: https://www.linkedin.com/in/saini-parvesh/