adds claude-generated commit messages and a recent commits panel to the git view - adds log tailing in the explorer, branch merging and a clean up button

This commit is contained in:
2026-11-04 10:07:52 +01:00
parent 600d4874d2
commit cc6651c08a
49 changed files with 1944 additions and 180 deletions
@@ -3,6 +3,7 @@ import HelderCore
import SwiftUI
/// Local and origin branches; a click switches, but only while the working tree is clean.
/// A right click offers to merge the branch into the current one.
struct GitBranchesPanel: View {
let model: WorkspaceModel
let store: SourceControlStore
@@ -60,7 +61,8 @@ struct GitBranchesPanel: View {
name: name, remote: remote, current: current, locked: !current && store.isDirty,
meta: current ? "current" : (tracked ? "tracked" : ""),
action: canSwitch ? (remote && !tracked ? "checkout →" : "switch →") : "",
clickable: !current && !isCurrentUpstream
clickable: !current && !isCurrentUpstream,
menu: .branch(name: name, remote: remote, current: store.state.branch, isDirty: store.isDirty)
)
}
}
@@ -74,6 +76,7 @@ private struct BranchItem {
let meta: String
let action: String
let clickable: Bool
let menu: ContextTarget
}
private struct BranchRow: View {
@@ -112,6 +115,9 @@ private struct BranchRow: View {
model.perform(.switchBranch(item.name, remote: item.remote))
}
.pointerHand(item.clickable && !item.locked)
.overlay(RightClickArea { point in
model.perform(.showContextMenu(item.menu, anchor: point))
})
.tracksHover($isHovered)
.modifier(LockedTip(isLocked: item.locked))
}
@@ -131,12 +137,12 @@ private struct LockedTip: ViewModifier {
/// Puts the enclosing scroll view's scrollers over the content, so rows keep their 16px right padding.
/// A legacy scroller would take its width from the rows whenever the list overflows.
private struct OverlayScrollers: NSViewRepresentable {
struct OverlayScrollers: NSViewRepresentable {
func makeNSView(context: Context) -> OverlayScrollersProbe { OverlayScrollersProbe() }
func updateNSView(_ view: OverlayScrollersProbe, context: Context) { view.apply() }
}
private final class OverlayScrollersProbe: NSView {
final class OverlayScrollersProbe: NSView {
private var observer: NSObjectProtocol?
override func viewDidMoveToWindow() {