Skip to content

feat(pr): 评论 tab 演进为活动时间线#80

Merged
huhamhire merged 3 commits into
devfrom
feat/activity-timeline
Jun 19, 2026
Merged

feat(pr): 评论 tab 演进为活动时间线#80
huhamhire merged 3 commits into
devfrom
feat/activity-timeline

Conversation

@huhamhire

Copy link
Copy Markdown
Owner

背景

PR 详情下的「评论」标签页职责过于单一。本次将其演进为「活动 / Activity」时间线:在保留原有评论内容与排序的前提下,引入更多信息事件,作为 PR 的整体活动时间线。

改动

把评论、提交更新、reviewer 评审决断(approve / needs-work / unapprove / dismiss)按时间倒序归并为一条时间线(GitHub / Bitbucket),保留评论的编辑 / 回复 / 删除 / 内联代码能力。

平台层

  • 新增中性类型 PrActivityEvent 与统一方法 PlatformAdapter.listPullRequestActivity
  • GitHub 取自 /pulls/{n}/reviews(state + submitted_at),Bitbucket 取自 /activities(APPROVED / UNAPPROVED / REVIEWED + createdDate)——均为带时间戳的真实决断事件。
  • 新增能力位 capabilities.activityTimeline

主进程 / IPC

  • 新增 diff:listActivity 通道 + controller + 注册。

渲染层

  • 「评论」tab 演进为 ActivityPanel,三路数据(评论 / 提交 / 决断)前端归并,沿用全部 stale-while-loading / bail-out 抗抖动优化。
  • 抽出 CommentItem 独立复用;提交另保留独立「提交」tab。
  • 视觉:各条目统一「图标节点 + 头像 + 加粗作者名 + 动词 + 时间」,一条竖向虚线轨贯穿图标列连接相邻条目;评论标题统一「xxx 评论」+ 评论图标,正文整体缩进成挂在轨上的卡片;作者头像 / 文本与评论主体人一致。
  • i18n:四语言补 tabActivity / activityPanel 文案。

GitLab 差异化降级

  • GitLab 无统一活动事件源(CE 无审批、审批系统 note 解析脆弱),activityTimeline=false → 标签页保持纯「评论」视图(沿用原行为与文案),不混入提交 / 决断。

其它

  • 按命名约定将 mapBB* 统一改名为 mapBitbucket*

验证

lint ✓、typecheck ✓、build ✓、poller 测试 ✓。repo-mirror 的 5 个 git-CLI 用例为既有环境失败(在干净 origin/dev 上同样失败),与本次无关。

🤖 Generated with Claude Code

把 PR 详情「评论」标签页演进为「活动」时间线(GitHub / Bitbucket):评论、
提交更新、reviewer 评审决断(approve / needs-work / unapprove / dismiss)按时间
倒序归并为一条时间线,保留原有评论内容、排序与编辑 / 回复 / 删除 / 内联代码能力。

- 平台契约:新增 PrActivityEvent 类型与 listPullRequestActivity 方法;GitHub 取自
  /pulls/{n}/reviews、Bitbucket 取自 /activities(带时间戳的决断事件)。
- IPC:新增 diff:listActivity 通道 + controller + 注册。
- 差异化:新增 capabilities.activityTimeline;GitLab 无统一活动事件源(CE 无审批、
  审批系统 note 解析脆弱)→ 标签页保持纯「评论」视图,不混入提交 / 决断。
- 视觉:各条目统一「图标节点 + 头像 + 加粗作者名 + 动词 + 时间」,竖向虚线轨连接
  相邻条目;评论标题统一「xxx 评论」+ 评论图标,正文整体缩进成挂在轨上的卡片。
- 提交另保留独立「提交」标签页。
- i18n:四语言补 tabActivity / activityPanel 文案。
- 约定:mapBB* 统一改名为 mapBitbucket*。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huhamhire huhamhire added this to the 体验优化 milestone Jun 19, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@huhamhire huhamhire added the enhancement New feature or request label Jun 19, 2026
huhamhire and others added 2 commits June 19, 2026 13:25
- 新建评论:活动标签栏右侧「评论」按钮发一条不锚到文件的 summary 评论,编辑框
  作为时间线首个节点(头像在轨上、编辑框缩进)展开,发布后即时出现在顶部。
  新增 publishSummaryComment 平台契约(GitHub issue 评论 / Bitbucket 无锚评论 /
  GitLab 新 discussion)+ comments:create 通道 + controller + 注册。
- 评审决断:动词统一为「批准 / 要求修改」,并用带色 chip(绿 / 琥珀 / 中性)突出。
- 时间标签:改用自定义 tooltip(data-tip + ::after,120ms 短延迟),各时间标签
  行为一致、修复 review 行原生 title 不弹问题,精确到秒。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PR 头部状态 chip(pending / approved / needs_work)与详情页 reviewer 状态标签
(approved / needs work / pending)此前写死英文,现按界面语言出文案。新增 prStatus
文案集(zh-CN / en-US / ja-JP / de-DE)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huhamhire huhamhire merged commit 36e79db into dev Jun 19, 2026
1 check passed
@huhamhire huhamhire deleted the feat/activity-timeline branch June 19, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant