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
@@ -22,9 +22,8 @@ import Testing
#expect(ContextMenuOverlay.tint(for: .rename("a.php", isDirectory: false)) == .rename)
}
@Test func theGitViewItemsKeepThePlainIcon() {
@Test func theGitViewRowItemKeepsThePlainIcon() {
#expect(ContextMenuOverlay.tint(for: .openFile("a.php")) == .plain)
#expect(ContextMenuOverlay.tint(for: .commit(andPush: true)) == .plain)
}
@Test func copyReferenceKeepsThePlainIconThatTurnsAmberOnHighlight() {
@@ -34,6 +33,8 @@ import Testing
@Test func destructiveActionsAreAmberDeep() {
#expect(ContextMenuOverlay.tint(for: .gitDiscard(["a.php"])) == .danger)
#expect(ContextMenuOverlay.tint(for: .gitCleanUp) == .danger)
#expect(ContextAction.gitCleanUp.isDestructive)
#expect(ContextMenuOverlay.tint(for: .delete("a", isDirectory: true)) == .danger)
}
}
@@ -70,6 +70,24 @@ import Testing
#expect(MenuCursor.step(3, by: 1, in: entries) == 0)
#expect(MenuCursor.step(0, by: -1, in: entries) == 3)
}
@Test func arrowsSkipDisabledEntries() {
let entries: [ContextMenuEntry] = [
.action(.copyReference("a"), label: "Copy reference"),
.disabled(.mergeBranch("b"), label: "Merge into main", hint: "Commit or discard your changes first"),
.action(.delete("a", isDirectory: false), label: "Delete file"),
]
#expect(MenuCursor.step(0, by: 1, in: entries) == 2)
#expect(MenuCursor.step(2, by: -1, in: entries) == 0)
}
@Test func aMenuWithOnlyADisabledEntryHighlightsNothing() {
let entries: [ContextMenuEntry] = [
.disabled(.mergeBranch("b"), label: "Merge into main", hint: "Commit or discard your changes first"),
]
#expect(MenuCursor.first(in: entries) == nil)
#expect(MenuCursor.step(-1, by: 1, in: entries) == nil)
}
}
@Suite struct NamePromptTextTests {