Add visual branch comparison workflow - #19
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (25)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThis change adds a branch comparison workflow with Git-backed snapshots, changed files, patches, unique commits, branch controls, cancellation, stale-result protection, and local or remote branch entry points. It also adds history context-click handling. ChangesBranch comparison workflow
History context menu handling
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~60 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant SidebarView
participant MainWindowView
participant ReferenceComparisonController
participant GitStatusService
participant ReferenceDiffView
SidebarView->>MainWindowView: request comparison for selected branch
MainWindowView->>ReferenceComparisonController: create base and target state
ReferenceDiffView->>ReferenceComparisonController: reload comparison
ReferenceComparisonController->>GitStatusService: fetch snapshot, files, commits, and patches
GitStatusService-->>ReferenceComparisonController: return comparison results
ReferenceComparisonController-->>ReferenceDiffView: update loading, errors, and content
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Summary
Adds a read-only visual workflow for comparing any two local or remote-tracking branches without checking either branch out. Branch context menus now expose
Compare with..., opening History with editable base/target selectors, swap support, merge-base metadata, ahead/behind counts, commit lists, file changes, and per-file diffs.The comparison defaults to merge-base mode and also supports explicit tip-to-tip mode. Git execution is pinned to resolved commit SHAs, handles rename/binary/empty states, supports cancellable async loads, and guards against stale results updating the UI.
Validation
rtk git diff --checkrtk proxy xcodebuild -project macgit.xcodeproj -scheme macgit -destination 'platform=macOS' build20 tests, 0 failuresRuntime UI interaction was not checked by launching the app, per repo guidance to build without launching.
Closes #13
Summary by CodeRabbit