feat(changes): 页签名「文件变动」改为「Git」
这个页签装的就是仓库视角(暂存 / 提交 / 历史 / 工作树),「文件变动」这个名字 没有把它和文件树区分开;改成「Git」后一眼能认出这是 Git 面板,也和里面第一个 镜头名对齐。21 份词典里的页签名是同一个语言中立的值,一起改。 - README 中英双语的徽章、能力表与特性条目同步(顺带把图片 alt 也改成 Git, 否则无障碍名还在念旧标题)。 - `tests/locales.spec.ts` 里那条「切换 zh 后读到中文」的断言换了个键: `changes` 现在是语言中立值,两种词典相同,拿它证明不了语言已切到中文, 改用 `explorer`(资源管理器)这个仍然分语言的键,断言意图不变。 - `tests/builtins.spec.ts` 新增一条页签标题断言,把这个名字钉住。 - `tests/e2e/tree-scroll.e2e.ts` 的页签选择器改走宿主的 tab strip (`[data-dockkit-strip] [role="tab"]`)而不是纯文本匹配:页签名变成 "Git" 之后,页签内部的镜头切换器上也有同一个词,纯文本过滤会数出两个元素。
This commit is contained in:
1 parent
c765c3eb49
commit
1718d2bdfa
25 files changed
+40
-28
No files matched your search
@@ -22,7 +22,7 @@
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **🗂️ File Management**<br/>Lazy-loading tree, git status colors, live directory watch, global search, drag-and-drop upload, multi-select batch actions, dual-source "Open with" menu.<br/><img alt="File tree with git colors" src="./docs/screenshots/files-tree.png" /><br/><img alt="Context menu: Open with + Zip and download" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 Changes**<br/>Git lens + this-session AI-changes lens in one: hierarchical tree, stage / commit / history, unified diff rendering (intra-line highlights + syntax coloring).<br/><img alt="Changes: hierarchical tree" src="./docs/screenshots/changes-tree.png" /> |
|
||||
| **🗂️ File Management**<br/>Lazy-loading tree, git status colors, live directory watch, global search, drag-and-drop upload, multi-select batch actions, dual-source "Open with" menu.<br/><img alt="File tree with git colors" src="./docs/screenshots/files-tree.png" /><br/><img alt="Context menu: Open with + Zip and download" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 Git**<br/>Git lens + this-session AI-changes lens in one: hierarchical tree, stage / commit / history, unified diff rendering (intra-line highlights + syntax coloring).<br/><img alt="Git: hierarchical tree" src="./docs/screenshots/changes-tree.png" /> |
|
||||
| **📝 Editable Editor & Previews**<br/>An editable CodeMirror (the stock preview is read-only), Markdown + Mermaid + floating outline, sandboxed HTML preview, `.jsonl` record cards, paged preview for huge files, streaming transfers with no size caps.<br/><img alt="Markdown + Mermaid preview" src="https://github.com/user-attachments/assets/fe0e5182-55bb-45cc-b98b-a2877c2bdd38" /> | **🧩 Tasks**<br/>Live subagent topology (workflow graph / tree modes) + background task list: exit codes, live output, force-kill.<br/><img alt="Tasks: subagent topology" src="https://github.com/user-attachments/assets/dcd8ed2f-59fa-405b-937b-2d250f5034dd" /> |
|
||||
| **💬 Side Chat (beta)**<br/>Codex-style side threads: inherit the full parent context and run independently, realtime push, visible & revocable queue, per-thread model selection, one-click promotion to a top-level session.<br/><img alt="Side Chat" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ Bottom Workbench**<br/>A self-drawn bottom panel that coexists with the native right sidebar: drag-to-split panes, multiple terminal tabs, per-session persisted layout.<br/><img alt="Dual workbench" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **🗂️ 文件管理**<br/>懒加载目录树、Git 变更着色、实时 watch 刷新、全局搜索、拖拽上传、多选批量操作、「打开方式」双源菜单。<br/><img alt="文件树(Git 着色)" src="./docs/screenshots/files-tree.png" /><br/><img alt="右键菜单:打开方式 + 打包下载" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 文件变动**<br/>Git 视角 + 本轮 AI 改动视角合一:层级树、暂存 / 提交 / 历史、统一 diff 渲染(行内高亮 + 语法着色)。<br/><img alt="文件变动:层级树" src="./docs/screenshots/changes-tree.png" /> |
|
||||
| **🗂️ 文件管理**<br/>懒加载目录树、Git 变更着色、实时 watch 刷新、全局搜索、拖拽上传、多选批量操作、「打开方式」双源菜单。<br/><img alt="文件树(Git 着色)" src="./docs/screenshots/files-tree.png" /><br/><img alt="右键菜单:打开方式 + 打包下载" src="./docs/screenshots/files-menu-openwith.png" /> | **🌿 Git**<br/>Git 视角 + 本轮 AI 改动视角合一:层级树、暂存 / 提交 / 历史、统一 diff 渲染(行内高亮 + 语法着色)。<br/><img alt="Git:层级树" src="./docs/screenshots/changes-tree.png" /> |
|
||||
| **📝 可编辑编辑器与预览**<br/>可编辑的 CodeMirror(官方预览是只读)、Markdown + Mermaid + 浮动目录、HTML 沙箱预览、`.jsonl` 记录卡片、超大文件分页预览、传输无大小上限。<br/><img alt="Markdown + Mermaid 预览" src="https://github.com/user-attachments/assets/fe0e5182-55bb-45cc-b98b-a2877c2bdd38" /> | **🧩 任务管理**<br/>子代理拓扑实时预览(工作流图 / 树双模式)+ 后台任务清单:退出码、实时输出、强制终止。<br/><img alt="任务页:子代理拓扑" src="https://github.com/user-attachments/assets/dcd8ed2f-59fa-405b-937b-2d250f5034dd" /> |
|
||||
| **💬 侧边对话(beta)**<br/>Codex 风格侧边线程:继承主会话完整上下文独立运行、实时推送、排队可见可撤回、每个线程独立选模型、一键提升为顶层会话。<br/><img alt="侧边对话" src="https://github.com/user-attachments/assets/3a338c36-f5de-4000-95f3-4b1cd04f60fc" /> | **🖥️ 底部工作台**<br/>自绘底部面板与原生右侧栏同时展开:拖拽分栏、多终端页签、按会话持久化布局。<br/><img alt="双工作台" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" /> |
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ export const ar: Record<string, string> = {
|
||||
worktree: 'شجرة العمل',
|
||||
checkoutError: 'فشل تبديل الفرع',
|
||||
history: 'السجل',
|
||||
changes: 'تغييرات الملفات',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'الجلسة',
|
||||
changesFilterAll: 'الكل',
|
||||
|
||||
@@ -219,7 +219,7 @@ export const de: Record<string, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Branchenwechsel fehlgeschlagen',
|
||||
history: 'Verlauf',
|
||||
changes: 'Dateiänderungen',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sitzung',
|
||||
changesFilterAll: 'Alle',
|
||||
|
||||
@@ -226,7 +226,7 @@ export const fr: Record<string, string> = {
|
||||
worktree: 'Arborescence de travail',
|
||||
checkoutError: 'Échec du changement de branche',
|
||||
history: 'Historique',
|
||||
changes: 'Modifications',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Session',
|
||||
changesFilterAll: 'Tout',
|
||||
|
||||
@@ -233,7 +233,7 @@ export const hi: Record<string, string> = {
|
||||
worktree: 'वर्कट्री',
|
||||
checkoutError: 'ब्रांच स्विच विफल',
|
||||
history: 'इतिहास',
|
||||
changes: 'फ़ाइल परिवर्तन',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'सेशन',
|
||||
changesFilterAll: 'सभी',
|
||||
|
||||
@@ -231,7 +231,7 @@ export const id: Record<string, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Beralih branch gagal',
|
||||
history: 'Riwayat',
|
||||
changes: 'Perubahan berkas',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sesi',
|
||||
changesFilterAll: 'Semua',
|
||||
|
||||
@@ -224,7 +224,7 @@ export const it: Record<string, string> = {
|
||||
worktree: 'Albero di lavoro',
|
||||
checkoutError: 'Cambio di ramo non riuscito',
|
||||
history: 'Cronologia',
|
||||
changes: 'Modifiche',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sessione',
|
||||
changesFilterAll: 'Tutti',
|
||||
|
||||
@@ -233,7 +233,7 @@ export const ja: Record<string, string> = {
|
||||
worktree: 'ワークツリー',
|
||||
checkoutError: 'ブランチ切り替えに失敗',
|
||||
history: '履歴',
|
||||
changes: 'ファイル変更',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'セッション',
|
||||
changesFilterAll: 'すべて',
|
||||
|
||||
@@ -225,7 +225,7 @@ export const ko: Record<string, string> = {
|
||||
worktree: '워크트리',
|
||||
checkoutError: '브랜치 전환 실패',
|
||||
history: '기록',
|
||||
changes: '파일 변경',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: '세션',
|
||||
changesFilterAll: '모두',
|
||||
|
||||
@@ -231,7 +231,7 @@ export const nl: Record<string, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Wisselen van branch mislukt',
|
||||
history: 'Geschiedenis',
|
||||
changes: 'Bestandswijzigingen',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sessie',
|
||||
changesFilterAll: 'Alles',
|
||||
|
||||
@@ -235,7 +235,7 @@ export const pl: Record<string, string> = {
|
||||
worktree: 'Drzewo robocze',
|
||||
checkoutError: 'Przełączenie gałęzi nie powiodło się',
|
||||
history: 'Historia',
|
||||
changes: 'Zmiany plików',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sesja',
|
||||
changesFilterAll: 'Wszystko',
|
||||
|
||||
@@ -216,7 +216,7 @@ export const pt: Record<string, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Falha ao alternar de branch',
|
||||
history: 'Histórico',
|
||||
changes: 'Alterações',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Sessão',
|
||||
changesFilterAll: 'Tudo',
|
||||
|
||||
@@ -229,7 +229,7 @@ export const ru: Record<string, string> = {
|
||||
worktree: 'Рабочее дерево',
|
||||
checkoutError: 'Сбой переключения ветки',
|
||||
history: 'История',
|
||||
changes: 'Изменения файлов',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Сессия',
|
||||
changesFilterAll: 'Все',
|
||||
|
||||
@@ -216,7 +216,7 @@ export const sv: Record<string, string> = {
|
||||
worktree: 'Arbetsträd',
|
||||
checkoutError: 'Grenbyte misslyckades',
|
||||
history: 'Historik',
|
||||
changes: 'Filändringar',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Session',
|
||||
changesFilterAll: 'Alla',
|
||||
|
||||
@@ -233,7 +233,7 @@ export const th: Record<string, string> = {
|
||||
worktree: 'เวิร์กทรี',
|
||||
checkoutError: 'สลับ branch ล้มเหลว',
|
||||
history: 'ประวัติ',
|
||||
changes: 'การเปลี่ยนแปลงไฟล์',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'เซสชัน',
|
||||
changesFilterAll: 'ทั้งหมด',
|
||||
|
||||
@@ -233,7 +233,7 @@ export const tr: Record<string, string> = {
|
||||
worktree: 'Çalışma ağacı',
|
||||
checkoutError: 'Dal değiştirme başarısız',
|
||||
history: 'Geçmiş',
|
||||
changes: 'Dosya değişiklikleri',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Oturum',
|
||||
changesFilterAll: 'Tümü',
|
||||
|
||||
@@ -233,7 +233,7 @@ export const vi: Record<string, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Chuyển branch thất bại',
|
||||
history: 'Lịch sử',
|
||||
changes: 'Thay đổi tệp',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Phiên',
|
||||
changesFilterAll: 'Tất cả',
|
||||
|
||||
@@ -248,7 +248,7 @@ export const zhHK: Record<string, string> = {
|
||||
worktree: '工作樹',
|
||||
checkoutError: '切換分支失敗',
|
||||
history: '歷史',
|
||||
changes: '檔案變動',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: '本輪檔案',
|
||||
changesFilterAll: '全部',
|
||||
|
||||
@@ -248,7 +248,7 @@ export const zhMO: Record<string, string> = {
|
||||
worktree: '工作樹',
|
||||
checkoutError: '切換分支失敗',
|
||||
history: '歷史',
|
||||
changes: '檔案變動',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: '本輪檔案',
|
||||
changesFilterAll: '全部',
|
||||
|
||||
@@ -248,7 +248,7 @@ export const zhTW: Record<string, string> = {
|
||||
worktree: '工作樹',
|
||||
checkoutError: '切換分支失敗',
|
||||
history: '歷史',
|
||||
changes: '檔案變動',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: '本輪檔案',
|
||||
changesFilterAll: '全部',
|
||||
|
||||
@@ -244,7 +244,7 @@ export const zh = {
|
||||
worktree: '工作树',
|
||||
checkoutError: '切换分支失败',
|
||||
history: '历史',
|
||||
changes: '文件变动',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: '本轮文件',
|
||||
changesFilterAll: '全部',
|
||||
@@ -846,7 +846,7 @@ export const en: Record<keyof typeof zh, string> = {
|
||||
worktree: 'Worktree',
|
||||
checkoutError: 'Branch switch failed',
|
||||
history: 'History',
|
||||
changes: 'Changes',
|
||||
changes: 'Git',
|
||||
changesGitLens: 'Git',
|
||||
changesSessionLens: 'Session',
|
||||
changesFilterAll: 'All',
|
||||
|
||||
@@ -65,6 +65,7 @@ describe('built-in tab registrations', () => {
|
||||
it('the git (changes) tab is a single-instance badge-carrying visible tab', () => {
|
||||
const { service } = setup()
|
||||
const changes = service.getTab('git')
|
||||
expect(typeof changes?.title === 'function' ? changes.title() : changes?.title).toBe('Git')
|
||||
expect(changes?.single).toBe(true)
|
||||
expect(changes?.hidden).not.toBe(true)
|
||||
expect(changes?.badge).toBeDefined()
|
||||
|
||||
@@ -409,8 +409,11 @@ test('the explorer keeps its state across a tab switch and a conversation round
|
||||
// changes window) — asserted by the strip below, since the ACTIVE tab is
|
||||
// whichever the lane last showed.
|
||||
// The changes tab is where the unsaved message lives: it is the other claim
|
||||
// `keepMounted` makes on #712's behalf.
|
||||
const changesTab = page.locator('[data-sidebar-right-panel]:visible [role="tab"]').filter({ hasText: /Changes|文件变动/ })
|
||||
// `keepMounted` makes on #712's behalf. Matched through the host's tab STRIP,
|
||||
// not by text alone: the title is a language-neutral "Git" and the tab's own
|
||||
// lens switcher carries that same word, so an unscoped text filter would
|
||||
// count two elements.
|
||||
const changesTab = page.locator('[data-sidebar-right-panel]:visible [data-dockkit-strip] [role="tab"]').filter({ hasText: /Git/ })
|
||||
await expect(changesTab, 'the changes tab survives the round trip').toHaveCount(1, { timeout: 30_000 })
|
||||
await changesTab.first().click()
|
||||
const backCommitBox = page.locator('[data-sidebar-right-panel]:visible')
|
||||
|
||||
+11
-3
@@ -62,13 +62,13 @@ describe('locales (DSH i18n following)', () => {
|
||||
attachLocale(locale)
|
||||
|
||||
locale.switchTo('zh')
|
||||
expect(t('changes')).toBe('文件变动')
|
||||
expect(t('explorer')).toBe('资源管理器')
|
||||
expect(isZh()).toBe(true)
|
||||
|
||||
// Live switch: the service's active locale wins even though the
|
||||
// browser still asks for en-US.
|
||||
locale.switchTo('en')
|
||||
expect(t('changes')).toBe('Changes')
|
||||
expect(t('explorer')).toBe('Explorer')
|
||||
expect(isZh()).toBe(false)
|
||||
})
|
||||
|
||||
@@ -105,6 +105,14 @@ describe('locales (DSH i18n following)', () => {
|
||||
expect(LOCALE_NS).toBe('betterSidebar')
|
||||
})
|
||||
|
||||
it('names the existing changes entry Git in every shipped locale', () => {
|
||||
// Keep the translation key (and the git tab id) stable: this is display
|
||||
// copy only. Check raw dictionaries so English fallback cannot hide a miss.
|
||||
for (const [lang, dict] of Object.entries({ zh, en, ...localeDicts })) {
|
||||
expect(dict.changes, lang).toBe('Git')
|
||||
}
|
||||
})
|
||||
|
||||
it('keeps the zh and en dictionaries key-set-equal', () => {
|
||||
expect(Object.keys(en).sort()).toEqual(Object.keys(zh).sort())
|
||||
})
|
||||
@@ -219,7 +227,7 @@ describe('locales (better-locale override)', () => {
|
||||
attachBetterLocale(betterLocale)
|
||||
|
||||
// 'changes' has no ja entry in this fake; should fall back to the en text.
|
||||
expect(t('changes')).toBe('Changes')
|
||||
expect(t('changes')).toBe('Git')
|
||||
})
|
||||
|
||||
it('falls back to the zh/en chain when no override is active', () => {
|
||||
|
||||
Reference in new issue
Block a user