feat(chat): 在会话顶栏显示当前 Git 分支 - #727
Open
Blue-Berrys wants to merge 1 commit into
Open
Blue-Berrys wants to merge 1 commit into
Blue-Berrys wants to merge 1 commit into
Conversation
Blue-Berrys
force-pushed
the
fix/issue-679-branch-badge
branch
from
September 21, 2026 02:29
c952428 to
28242f5
Compare
Contributor
Author
Blue-Berrys
force-pushed
the
fix/issue-679-branch-badge
branch
from
September 21, 2026 03:45
28242f5 to
035f761
Compare
Refresh branch metadata when the window regains focus and support both standard repositories and linked worktrees.\n\nFixes vastsa#679
Blue-Berrys
force-pushed
the
fix/issue-679-branch-badge
branch
from
September 21, 2026 04:00
035f761 to
af829f6
Compare
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.

问题
项目会话的顶栏只显示任务标题。用户从多个分支打开项目,或在应用外切换分支后,无法在当前会话中确认正在操作哪个 checkout。
修改
.git目录和 linked worktree 的.git指针文件;detached HEAD 显示为detached,临时会话及非 Git 文件夹不显示标记。验证
node --test apps/desktop/test/git-branch.test.mjs apps/desktop/test/app-store-sidebar.test.mjs apps/desktop/test/thinking-ui.test.mjs apps/desktop/test/sidebar-collapse-animation.test.mjs apps/desktop/test/plan-mode-source-contract.test.mjs(54 项通过)pnpm --filter '@pi-desktop/desktop^...' buildpnpm --filter @pi-desktop/desktop typecheckpnpm --filter @pi-desktop/desktop buildpnpm lintpnpm docs:checkfix/issue-679-branch-badge,长名称省略;切换至临时会话后标记消失。Fixes #679