Repository navigation
feat(Branches): Local Branches 行末显示关联 PR 状态徽标; - #158
Merged
Merged
Conversation
本地分支(含 Favorites 本地条目与活动分支)行右侧以与远程行一致的形态显示关联 GitHub PR(#N Merged/Open/Closed/Draft),非活动分支图标按状态着色,活动蓝/收藏黄 优先,悬停 Tooltip 同构。匹配语义:本地裸分支名走同仓 Tier b → 唯一兜底 Tier c, 不剥 remote 前缀、不做 Tier a fork 身份匹配(本地名不携带 remote 身份);不用 ref.upstream 参与匹配(仅 CLI 兜底路径填充且树节点 upstream 数据不受信,裸名匹配 消除双数据路径下的徽标闪烁)。取数链路零改动,RemotePrIndex 更名 BranchPrIndex 并 新增 lookupLocal 入口,engine 增量全量单测覆盖;同步功能文档、知识索引、设置描述 与 CHANGELOG。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.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.
背景
Branches 视图中 PR 徽标(
#20 Merged/#16 Open)此前只显示在 Remote Branches 行末,Local Branches 行无任何 PR 信息,无法直观判断「某个 local branch 是否已通过 PR 合并到基线分支」。变更
Local Branches(含 Favorites 本地条目与活动分支)行右侧以与远程行完全一致的样式显示关联 GitHub PR:
#N Merged/Open/Closed/Draft;活动分支呈active #N …、领先/落后计数照常叠加;匹配语义(engine 纯逻辑,零新增取数)
本地裸分支名在既有预计算索引上匹配:同仓 Tier b → 唯一兜底 Tier c(与远程行同口径,歧义宁缺勿错);不剥 remote 前缀、不做 Tier a fork 身份匹配——本地名不携带 remote 身份,本地名
origin/feature只匹配 headRefName 字面同名的 PR。不引入ref.upstream参与匹配:upstream 仅 CLI 兜底路径填充(v0.0.22 起树节点 upstream 数据不受信),裸名匹配与 refs 数据来源路径解耦,杜绝首帧有徽标、刷新后消失的闪烁。取数链路(GraphQL / TTL 缓存 / 限流 / 代次守卫)零改动;
RemotePrIndex更名BranchPrIndex(名实一致:远程短名与本地裸名双查询入口)并新增lookupLocal。配套
tests/unit/pr-match.test.ts新增本地裸名 describe 块(Tier b/c、歧义宁缺、无 Tier a 分歧钉子、不剥前缀钉子、大小写、空列表);docs/features/branches-pr-status.md、知识索引、hyperGit.branches.pr.enabled设置描述、CHANGELOG 同步;数据流图不含 remote-only 表述,无需改图。验证
pnpm run check-types/pnpm run lint/pnpm run test:unit全绿(579 tests,含 pr-match 27 例);#N Merged+ 紫图标;活动分支active #N …+ 蓝图标;与 Remote Branches 对应行显示同一 PR。🤖 Generated with Claude Code