qwen-code/packages/cli/src
Shaojin Wen 22ddad7ff7
fix(cli): show worktree branch in status line instead of workspace branch (#7367)
* fix(cli): show worktree branch in status line instead of workspace branch

useGitBranchName was always called with config.getTargetDir() which
stays at the original project root when entering a worktree via
enter_worktree or --resume. Move useWorktreeSession above it and pass
worktreeSession.worktreePath when a worktree is active so the status
line reflects the worktree's branch.

* docs: add worktree branch status line screenshot for PR

* docs: replace screenshot with enter_worktree scenario (before/after)

* fix(web-shell): prefer live worktree branch from git status over static creation-time branch

When a worktree session is active, the composer git chip used
sessionWorktree.branch (set once at creation time) as the highest
priority source. If the user checks out a different branch inside
the worktree, the chip showed the stale creation-time branch.

Now prefer selectedWorkspaceGitStatus.branch (fetched with the
worktree path via ?cwd= parameter, refreshed on focus and 30s poll)
when a worktree session is active, falling back to the static
sessionWorktree.branch only until the first fetch completes.

* docs: add Web Shell worktree session screenshots

* test(cli): cover worktree branch wiring in AppContainer (#7367)

* fix(web-shell): clear stale git status on worktree entry and remove PR screenshots (#7367)

---------

Co-authored-by: Qwen Code Bot <qwen-code-bot@alibabacloud.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
2026-07-21 04:38:12 +00:00
..
acp-integration fix: ask when auto classifier is unavailable (#7331) 2026-07-21 03:27:17 +00:00
commands fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
config fix(cli): correct misspelled migratedInMemorScopes -> migratedInMemoryScopes (#7140) 2026-07-18 08:49:46 +00:00
core perf(cli): defer startup prefetch tasks (#6303) 2026-07-07 15:31:55 +00:00
dualOutput feat(core): Route Plan-mode shell commands by safety (#7172) 2026-07-19 16:00:22 +00:00
export feat(vscode-companion): support /export session command (#2592) 2026-04-24 17:55:26 +08:00
i18n fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
nonInteractive feat(core): Route Plan-mode shell commands by safety (#7172) 2026-07-19 16:00:22 +00:00
patches
remoteInput fix(cli): preserve partial remote input JSONL records (#6317) 2026-07-04 22:19:58 +00:00
serve feat(serve): make ACP initialize handshake timeout configurable (#7246) 2026-07-20 23:07:51 +00:00
services fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
startup fix(cli): avoid updating active CLI processes (#6874) 2026-07-15 00:33:17 +00:00
test-utils feat(cli): add --project and --global flags to /model for per-project model persistence (#6060) 2026-07-07 04:49:36 +00:00
ui fix(cli): show worktree branch in status line instead of workspace branch (#7367) 2026-07-21 04:38:12 +00:00
utils fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
cli.test.ts feat(daemon): Profile ACP channel initialization (#7145) 2026-07-18 05:27:59 +00:00
cli.ts feat(daemon): Profile ACP channel initialization (#7145) 2026-07-18 05:27:59 +00:00
gemini.test.tsx fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
gemini.tsx fix(cli): align npm update checks with global registry (#7224) 2026-07-19 15:50:06 +00:00
nonInteractiveCli.test.ts fix(core): Enforce Plan mode entry boundary (#7248) 2026-07-20 04:35:22 +00:00
nonInteractiveCli.ts fix(review): make agent launches and cleanup resilient (#7259) 2026-07-21 01:21:35 +00:00
nonInteractiveCliCommands.test.ts feat(cli): support stacked slash-skill invocations (#6361) 2026-07-07 06:38:04 +00:00
nonInteractiveCliCommands.ts feat(cli): support stacked slash-skill invocations (#6361) 2026-07-07 06:38:04 +00:00
validateNonInterActiveAuth.test.ts fix(cli): correct misspelled migratedInMemorScopes -> migratedInMemoryScopes (#7140) 2026-07-18 08:49:46 +00:00
validateNonInterActiveAuth.ts