Skip to content

feat: show latest release date on repository-grouped release cards (#255) - #256

Merged
AmintaCCCP merged 3 commits into
mainfrom
feat/release-date-255
Jul 30, 2026
Merged

feat: show latest release date on repository-grouped release cards (#255)#256
AmintaCCCP merged 3 commits into
mainfrom
feat/release-date-255

Conversation

@AmintaCCCP

@AmintaCCCP AmintaCCCP commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolves [Feature] 增加时间展示 #255: 在发布页「按仓库分类」视图的仓库卡片上,展示最新 release 的更新时间
  • 在最新 tag 旁追加相对时间(published_at + formatDistanceToNow),样式与 ReleaseCard 一致
  • 改为使用 repositoryGroups 中已计算好的 latestRelease,避免仅取 releases[0] 的潜在偏差

Changes

  • src/components/ReleaseTimeline.tsx
    • 仓库分组卡片头部:Latest: vX.Y.Z · 2 days ago

Test plan

  • 打开发布页,切换到「按仓库 / Repository」视图
  • 确认每个仓库卡片右侧「最新: tag」后显示相对发布时间
  • 展开仓库组后,展开项的时间与卡片头部一致(均为最新 release)
  • 切换中/英文界面,确认文案正常
  • 窄屏(< sm)下右侧信息隐藏行为与改前一致

Summary by CodeRabbit

  • Bug Fixes
    • Improved relative time (“last refresh” and “latest”) to display correctly in Chinese by using the appropriate locale formatting.
    • Fixed repository-group “Latest” information so the shown tag reliably reflects the most recent release.
    • Refined the “Latest” section layout to present the tag and relative time more clearly with improved truncation/whitespace handling.

In the Release Timeline repository view, display the relative publish
time next to the latest tag so users can see when a repo last released
without expanding the group.

Closes #255

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3ec67b8c-82d2-4ce2-ac4c-e05f9493cc70

📥 Commits

Reviewing files that changed from the base of the PR and between 5357c21 and 4b93af0.

📒 Files selected for processing (1)
  • src/components/ReleaseTimeline.tsx

📝 Walkthrough

Walkthrough

The release timeline localizes relative times for Chinese users and uses each repository group’s latestRelease value when displaying the latest release publication time.

Changes

Release timing display

Layer / File(s) Summary
Localized relative-time formatting
src/components/ReleaseTimeline.tsx
Chinese relative-time labels use the zhCN locale for empty-state and header refresh timestamps, while other languages retain the default formatting.
Latest release metadata
src/components/ReleaseTimeline.tsx
Repository groups provide latestRelease directly, and the latest section displays its tag and relative publication time with truncation-aware layout styling.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: showing the latest release time on repository-grouped release cards.
Linked Issues check ✅ Passed The PR satisfies #255 by displaying the latest publish time next to the latest tag in repository-grouped release cards.
Out of Scope Changes check ✅ Passed The changes stay within the release-timeline display update and do not introduce clearly unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-date-255

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/ReleaseTimeline.tsx`:
- Around line 1248-1250: Update ReleaseTimeline’s relative-time formatting to
use the Chinese date-fns locale whenever the selected language is Chinese.
Import the locale, pass it through the locale option for the latestRelease
published_at formatDistanceToNow call, and apply the same language-aware locale
handling to the other relative-time calls in the component.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 51cd5c3c-a477-4dfc-80a2-42bfb79d6525

📥 Commits

Reviewing files that changed from the base of the PR and between 41b4b76 and 20f6e91.

📒 Files selected for processing (1)
  • src/components/ReleaseTimeline.tsx

Comment thread src/components/ReleaseTimeline.tsx Outdated
AmintaCCCP and others added 2 commits July 30, 2026 20:12
The repository-grouped card wrapped the latest-tag + relative publish
time inside a `hidden sm:block` container, so the date added for #255
disappeared on any viewport narrower than 640px (sm). The user saw the
PR ship the feature but the date never showed on the cards.

Split the latest-tag line from the date: the tag can truncate when the
header is cramped, but the publish-time now sits on its own
whitespace-nowrap line so it always renders — across narrow desktop
columns, asset filters, and unread filters alike. The release-count
keeps its existing `hidden sm:block` behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AmintaCCCP
AmintaCCCP merged commit 307ac17 into main Jul 30, 2026
5 checks passed
@AmintaCCCP
AmintaCCCP deleted the feat/release-date-255 branch July 30, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 增加时间展示

1 participant