lobehub/locales
Arvin Xu a0471d5906
feat(chat-input): branch ahead/behind badge + GitCtr refactor (#13980)
* 💄 style(todo-progress): replace green bar with inline progress ring

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 💄 style(chat-input): split branch and diff blocks, add changed-files popover

Branch now has its own hover tooltip for the full name; the diff stat is a
sibling block that opens a lazy-loaded popover listing changed files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

*  feat(chat-input): show ahead/behind commit count vs upstream

Adds a badge next to the branch chip showing commits pending push (↑, blue)
and pull (↓, red) against the branch's upstream tracking ref. Hidden when
no upstream is configured or both counts are zero. Refreshed on focus,
after checkout, and on manual refresh from the branch switcher.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ♻️ refactor(desktop): extract git IPC methods into dedicated GitController

Moves detectRepoType, getGitBranch, getLinkedPullRequest, listGitBranches,
getGitWorkingTree{Status,Files}, getGitAheadBehind, and checkoutGitBranch out
of SystemCtr into a new GitCtr (groupName = 'git'). Shared helpers (resolveGitDir
/ resolveCommonGitDir / detectRepoType) become pure functions under utils/git.ts
so SystemCtr's selectFolder can still probe the picked folder without crossing
controller boundaries. Renderer side: new electronGitService wraps ipc.git.*,
and all six chat-input hooks plus BranchSwitcher are switched over.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 💄 style(chat-input): inline ahead/behind arrows into branch chip

Moves the ↑/↓ counts out of a separate status block and inside the branch
trigger next to the label, so they sit with the branch they describe instead
of after the file-change badge. Tooltip folds into the branch tooltip (full
name · N to push · M to pull) so a single hover covers both pieces of info.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(desktop): parse git status with -z to avoid filename misparse

The previous getGitWorkingTreeFiles split every line on ' -> ' to detect
renames, but only R/C status codes emit that delimiter. Legitimate filenames
containing ' -> ' (or spaces, or embedded newlines) were misparsed — the
popover would report a truncated path or lose the entry entirely.

Switch both getGitWorkingTreeStatus and getGitWorkingTreeFiles to
`git status --porcelain -z`: NUL-terminated records, no C-style quoting,
no \n splitting hazards. Rename/copy entries emit two NUL-separated tokens
(DEST\0SRC) which we consume as a pair so counts and paths stay correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🐛 fix(todo-progress): hide stale todos when a new user turn starts

Add `selectCurrentTurnTodosFromMessages` that scopes the todos lookup
to messages after the last user message. The inline TodoProgress
component now uses it, so a completed 8/8 progress bar from a previous
operation no longer lingers across the next user turn.

The original `selectTodosFromMessages` is unchanged because the agent
runtime step context still needs cross-turn visibility of the plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* 🔒 fix(desktop): tighten GitHub remote detection to host position

Replace substring check `config.includes('github.com')` with a regex
anchored to URL host position so look-alikes like `evilgithub.com` and
`github.com.attacker.com` no longer classify as GitHub. Closes CodeQL
"Incomplete URL substring sanitization" on PR #13980.

Not a real security issue (the config file is local and the
classification only drives a UI icon), but the tightened check is
strictly more correct and silences the scanner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 02:11:43 +08:00
..
ar feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
bg-BG feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
de-DE feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
en-US feat(chat-input): branch ahead/behind badge + GitCtr refactor (#13980) 2026-04-20 02:11:43 +08:00
es-ES feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
fa-IR feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
fr-FR feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
it-IT feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
ja-JP feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
ko-KR feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
nl-NL feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
pl-PL feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
pt-BR feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
ru-RU feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
tr-TR feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
vi-VN feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00
zh-CN feat(chat-input): branch ahead/behind badge + GitCtr refactor (#13980) 2026-04-20 02:11:43 +08:00
zh-TW feat(onboarding): add feature flags and footer promotion pipeline (#13853) 2026-04-17 21:14:27 +08:00