Repository navigation
feat(source-control): Commits 區加全螢幕 Git Graph 檢視 - #2
Merged
Merged
Conversation
8 of 9 tasks
audichuang
force-pushed
the
feat/git-graph-tab
branch
from
October 18, 2026 13:07
e15ece6 to
161edd3
Compare
8 of 9 tasks
audichuang
force-pushed
the
feat/git-graph-tab
branch
from
October 18, 2026 14:46
161edd3 to
47da029
Compare
This was referenced Oct 19, 2026
This was referenced Nov 7, 2026
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.
ELI5
側邊欄底部的 COMMITS 圖太窄,看不清楚多條分支怎麼交錯。這個 PR 在 COMMITS 工具列加一顆「展開」按鈕,按下去會打開一個幾乎佔滿視窗的 Git Graph,可以看清楚整張分支圖,點一個 commit 就能看它的內容和改動的檔案。
What Changed
使用者看到的前後差異
author:/path:),兩邊共用設定、互相同步。機制
git-graph-full-view.tsx)和浮層外殼(git-graph-full-view-dialog.tsx)是分開的元件,之後若要改成編輯器頁籤,內容可以直接搬過去。useSourceControlGitHistory的結果和 fork 的分支篩選 store),不多打 git、也沒有新增 IPC 或 RPC。scrollbar-gutter: stable),所以不論有沒有捲軸,各欄都和標題對齊。Why
為了降低之後和上游 rebase 時的衝突,這一版選擇用全螢幕浮層,而不是新增一種編輯器頁籤:
panel-content.tsx,而且是在 fork 原本插入的工具列那一段裡加 13 行。其餘都是 fork 自己的檔案:4 個新的元件和測試檔、1 個 e2e 測試,加上 fork 原本就有的git-history-graph-toolbar.tsx和git-history-graph-filter.ts。缺點是浮層不能和編輯器分割並排,重開 app 也不會保留。之後用起來如果覺得需要,再把同一個內容元件搬進編輯器頁籤。
Linked Issue
N/A(fork 內部功能)
Visual Proof
截圖沒有附在這個 PR 上(這台機器沒有上傳圖片的 gh extension)。Codex 用 Playwright 背景啟動實際 build 的 app,跑了 3 輪驗證並看過每張截圖。最後一輪 8 個情境全部通過:
Testing
I manually tested these changes locally(Ubuntu,用 Playwright electron-headless 背景啟動實際 build 的 app,沒有開出可見視窗)
Automated tests added/updated, or explained why not below
元件測試
git-graph-full-view.component.test.tsx(4 個):用真的 history hook、真的 filter store 和真的工具列,只 stub 最外層的 RPC。涵蓋顯示所有標籤、選 commit 載入檔案、點檔案先關浮層再開 diff、重新整理後重載檔案、搜尋競態、兩個搜尋框同步。我把兩個 bug 的修正換回舊版跑過,對應的測試都會失敗。e2e 測試
tests/e2e/git-graph-full-view.spec.ts:在真的 app 跑一次完整流程。make fork-check、pnpm tc:web、changed-code 品質檢查、語系檔 catalog 和 coverage 檢查都通過。沒有驗證:macOS、Windows,以及 SSH、WSL 上的 repo。資料走的是側邊欄原本的歷史讀取路徑,本身就依 repo 擁有者主機分流,這個 PR 沒有新增任何遠端呼叫。
AI Disclosure
由 Claude(Opus)實作,Codex 做程式碼複查和實機驗證。
Review
Codex 的對抗式 review 找到 2 個狀態 bug:重新整理後一直停在 Loading、兩個搜尋框的 debounce 互相覆蓋。實機驗證又找到 3 個版面問題:欄位偏 10px、窄視窗時訊息被擠到 0、標題列有色帶。以上都已修正,並在下一輪驗證確認。
Agent skill upstream boundary
Notes
Checklist
N/Awith reason(見 Visual Proof,截圖沒有附上)pnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)(本機跑了 fork-check、tc:web、改動範圍的測試與品質檢查;完整的 lint 和 test 交給 CI)