fix(desktop): AgentManager 右サイドバーにセッション全体の差分を表示#227
Conversation
Issue #226。 - `git log startHeadSha..HEAD` は HEAD が startHeadSha の子孫でない場合 (ブランチ切替・reset・rebase)無音で0件を返し、`gitOut` が例外を 握りつぶしていたため「新規コミット無し」と「開始点が失われた」を 区別できなかった。`gitRevExists` で解決可能性を確認し、 `startHeadUnreachable` としてUIへ通知する。 - `git diff --name-status -z startHeadSha HEAD` で2コミット間のファイル 差分を `sessionFiles` として追加。divergent な履歴でも累積デルタを 表示できるようにした。 - ChangesSidebar に「セッション全体」セクションと、開始HEAD喪失時の 注意表示を追加。選択中スコープのラベル切替も session / commit を 考慮する。 - supervisor: resume のたびに `startHeadSha` を上書きすると初回ランの コミットが埋もれてしまうため、既に記録済みの場合は維持する。
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 29 minutes and 24 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughセッション開始時のHEAD参照を再開時に保持するようにし、到達不可能なHEAD検出機能を追加。セッション中のファイル差分を Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85ad3524fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`git diff <start>..HEAD -- <path>` は削除ファイルでも有効な patch を 返すため、「セッション全体」セクションでは `code === "D"` を無効化 せず、削除の差分も閲覧できるようにする。ワーキングツリー側の `D` 無効化はファイルが worktree から既に失われているため維持する。
Closes #226
Summary
git log startHeadSha..HEADは HEAD が startHeadSha の子孫でないと(ブランチ切替・reset・rebase)無音で 0 件を返すため、「セッション全体」セクションを新設してgit diff --name-status -z startHeadSha HEADで二コミット間のファイル差分をそのまま表示する。gitRevExistsで検出し、UI にはアンバー色の注意バナーを出す。startHeadShaが上書きされ初回ランの履歴が埋もれていた問題を修正。既に記録済みならそのまま維持する。再現手順(修正前)
修正後の挙動
scope=sessionで diff ビューアに展開される。変更ファイル
Test plan
- 「セッション全体」セクションが表示される
- 「コミット」「ワーキングツリー」「セッション全体」それぞれのファイルクリックで差分が開く
- 開始HEAD を
git resetで失わせた場合に注意バナーが出ることを確認
Summary by CodeRabbit
リリースノート