Skip to content

Commit 2e9cc53

Browse files
2witstudiosclaude
andcommitted
fix(macos): Move file breadcrumb to header, hide gutter line
Move the filename display from a separate breadcrumb row into the header bar alongside the refresh button. Remove the vertical separator line from the line number gutter by painting over it with the editor background color. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent af0e33e commit 2e9cc53

File tree

3 files changed

+38
-50
lines changed

3 files changed

+38
-50
lines changed

apps/purepoint-macos/purepoint-macos/Views/Detail/ProjectDetailView.swift

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ struct ProjectDetailView: View {
2727
)
2828
} second: {
2929
VStack(spacing: 0) {
30-
if let file = editorState.currentFile, !editorState.showChanges {
31-
fileBreadcrumb(file)
32-
}
3330
Divider()
3431
editorContent
3532
}
@@ -79,6 +76,23 @@ struct ProjectDetailView: View {
7976
.font(.system(size: 12))
8077
.foregroundStyle(.secondary)
8178

79+
if let file = editorState.currentFile, !editorState.showChanges {
80+
Image(systemName: "chevron.right")
81+
.font(.system(size: 9, weight: .semibold))
82+
.foregroundStyle(.tertiary)
83+
Image(systemName: file.language.icon)
84+
.font(.system(size: 11))
85+
.foregroundStyle(.secondary)
86+
Text(file.name)
87+
.font(.system(size: 12))
88+
.lineLimit(1)
89+
if file.isDirty {
90+
Circle()
91+
.fill(Color.primary.opacity(0.4))
92+
.frame(width: 6, height: 6)
93+
}
94+
}
95+
8296
Spacer()
8397

8498
Button {
@@ -105,28 +119,6 @@ struct ProjectDetailView: View {
105119
.padding(.vertical, 10)
106120
}
107121

108-
// MARK: - File Breadcrumb
109-
110-
private func fileBreadcrumb(_ file: EditorTab) -> some View {
111-
HStack(spacing: 6) {
112-
Image(systemName: file.language.icon)
113-
.font(.system(size: 10))
114-
.foregroundStyle(.secondary)
115-
Text(file.name)
116-
.font(.system(size: 11))
117-
.lineLimit(1)
118-
if file.isDirty {
119-
Circle()
120-
.fill(Color.primary.opacity(0.4))
121-
.frame(width: 6, height: 6)
122-
}
123-
Spacer()
124-
}
125-
.padding(.horizontal, 12)
126-
.padding(.vertical, 4)
127-
.background(Color(nsColor: Theme.cardHeaderBackground))
128-
}
129-
130122
// MARK: - Editor Content
131123

132124
@ViewBuilder

apps/purepoint-macos/purepoint-macos/Views/Detail/WorktreeDetailView.swift

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ struct WorktreeDetailView: View {
2727
)
2828
} second: {
2929
VStack(spacing: 0) {
30-
if let file = editorState.currentFile, !editorState.showChanges {
31-
fileBreadcrumb(file)
32-
}
3330
Divider()
3431
editorContent
3532
}
@@ -83,6 +80,23 @@ struct WorktreeDetailView: View {
8380
.background(Color.secondary.opacity(0.1))
8481
.clipShape(RoundedRectangle(cornerRadius: 4))
8582

83+
if let file = editorState.currentFile, !editorState.showChanges {
84+
Image(systemName: "chevron.right")
85+
.font(.system(size: 9, weight: .semibold))
86+
.foregroundStyle(.tertiary)
87+
Image(systemName: file.language.icon)
88+
.font(.system(size: 11))
89+
.foregroundStyle(.secondary)
90+
Text(file.name)
91+
.font(.system(size: 12))
92+
.lineLimit(1)
93+
if file.isDirty {
94+
Circle()
95+
.fill(Color.primary.opacity(0.4))
96+
.frame(width: 6, height: 6)
97+
}
98+
}
99+
86100
Spacer()
87101

88102
Button {
@@ -109,28 +123,6 @@ struct WorktreeDetailView: View {
109123
.padding(.vertical, 10)
110124
}
111125

112-
// MARK: - File Breadcrumb
113-
114-
private func fileBreadcrumb(_ file: EditorTab) -> some View {
115-
HStack(spacing: 6) {
116-
Image(systemName: file.language.icon)
117-
.font(.system(size: 10))
118-
.foregroundStyle(.secondary)
119-
Text(file.name)
120-
.font(.system(size: 11))
121-
.lineLimit(1)
122-
if file.isDirty {
123-
Circle()
124-
.fill(Color.primary.opacity(0.4))
125-
.frame(width: 6, height: 6)
126-
}
127-
Spacer()
128-
}
129-
.padding(.horizontal, 12)
130-
.padding(.vertical, 4)
131-
.background(Color(nsColor: Theme.cardHeaderBackground))
132-
}
133-
134126
// MARK: - Editor Content
135127

136128
@ViewBuilder

apps/purepoint-macos/purepoint-macos/Views/Editor/LineNumberRulerView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,9 @@ class LineNumberRulerView: NSRulerView {
125125
)
126126
numStr.draw(at: drawPoint, withAttributes: attrs)
127127
}
128+
129+
// Cover the separator line at the right edge of the ruler
130+
textView.backgroundColor.setFill()
131+
NSRect(x: bounds.maxX - 1, y: rect.origin.y, width: 1, height: rect.height).fill()
128132
}
129133
}

0 commit comments

Comments
 (0)