feat(pr): 评论 tab 演进为活动时间线#80
Merged
Merged
Conversation
把 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>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
- 新建评论:活动标签栏右侧「评论」按钮发一条不锚到文件的 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>
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.
背景
PR 详情下的「评论」标签页职责过于单一。本次将其演进为「活动 / Activity」时间线:在保留原有评论内容与排序的前提下,引入更多信息事件,作为 PR 的整体活动时间线。
改动
把评论、提交更新、reviewer 评审决断(approve / needs-work / unapprove / dismiss)按时间倒序归并为一条时间线(GitHub / Bitbucket),保留评论的编辑 / 回复 / 删除 / 内联代码能力。
平台层
PrActivityEvent与统一方法PlatformAdapter.listPullRequestActivity。/pulls/{n}/reviews(state +submitted_at),Bitbucket 取自/activities(APPROVED / UNAPPROVED / REVIEWED +createdDate)——均为带时间戳的真实决断事件。capabilities.activityTimeline。主进程 / IPC
diff:listActivity通道 + controller + 注册。渲染层
ActivityPanel,三路数据(评论 / 提交 / 决断)前端归并,沿用全部 stale-while-loading / bail-out 抗抖动优化。CommentItem独立复用;提交另保留独立「提交」tab。tabActivity/activityPanel文案。GitLab 差异化降级
activityTimeline=false→ 标签页保持纯「评论」视图(沿用原行为与文案),不混入提交 / 决断。其它
mapBB*统一改名为mapBitbucket*。验证
lint✓、typecheck✓、build✓、poller测试 ✓。repo-mirror的 5 个 git-CLI 用例为既有环境失败(在干净origin/dev上同样失败),与本次无关。🤖 Generated with Claude Code