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
+63 -5
View File
@@ -1,7 +1,8 @@
import HelderCore
import SwiftUI
/// Column B: the file tree, flattened to its visible rows so thousands of files stay lazy.
/// Column B: the file tree, flattened to its visible rows so thousands of files stay lazy,
/// with the tail block under it while a `.log` file is tailed.
public struct ExplorerColumn: View {
let model: WorkspaceModel
@State private var columnFrame = CGRect.zero
@@ -15,10 +16,18 @@ public struct ExplorerColumn: View {
public var body: some View {
VStack(alignment: .leading, spacing: 0) {
header
if let store = model.explorer {
tree(store)
} else {
Spacer()
GeometryReader { proxy in
VStack(spacing: 0) {
if let store = model.explorer {
tree(store)
} else {
Spacer()
}
if let path = model.terminal.tailedPath {
TailBlock(model: model, path: path)
.frame(height: proxy.size.height * Self.tailFraction)
}
}
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -27,6 +36,8 @@ public struct ExplorerColumn: View {
.simultaneousGesture(TapGesture().onEnded { model.pointerFocused(.explorer) })
}
private static let tailFraction = 0.4
private var isActive: Bool { model.layout.activePanel == .explorer }
private var showHidden: Bool { model.layout.showHidden }
@@ -107,6 +118,53 @@ public struct ExplorerColumn: View {
}
}
/// `tail -f` on one log file: a header with the file name and a close button over a live terminal.
private struct TailBlock: View {
let model: WorkspaceModel
let path: String
var body: some View {
VStack(spacing: 0) {
HStack(spacing: 8) {
Text("Tail").typeRole(Typography.panelLabel).foregroundStyle(Palette.text4)
Spacer(minLength: 8)
Text(PathUtils.basename(path))
.typeRole(Typography.panelLabel)
.foregroundStyle(Palette.text4)
.lineLimit(1)
.truncationMode(.middle)
.help(path)
CloseTailButton { model.perform(.closeTail) }
}
.padding(.leading, 12)
.padding(.trailing, 8)
.frame(height: Metrics.panelHeader)
.hairline(.top)
.zIndex(1)
TerminalPane(kind: .tail, store: model.terminal, scale: model.layout.textScale)
.id(model.terminal.tailGeneration)
}
}
}
private struct CloseTailButton: View {
let action: () -> Void
@State private var isHovered = false
var body: some View {
Button(action: action) {
GitIconView(icon: .x, size: 14)
.foregroundStyle(isHovered ? Palette.text1 : Palette.text4)
.padding(4)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.pointerHand()
.tracksHover($isHovered)
.tip("Stop tailing", edge: .trailing)
}
}
/// One tree row: indent, chevron, folder glyph or type badge, name, change letter.
private struct TreeRowView: View {
let row: TreeRow