Skip to content

Commit 6e2d395

Browse files
scgopiclaude
andcommitted
Mark remote repositories with a network glyph
The sidebar row and the workspace's titlebar header both wore a folder icon whether the repository was a local folder or a machine away — the name ("widget @ build-box") said so only once you'd read it. Both now wear the same network glyph the Add Remote Repository menu item does, so where the shells actually run is readable at a glance. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent baa1afc commit 6e2d395

3 files changed

Lines changed: 22 additions & 6 deletions

File tree

graphcode/Sources/Features/App/AppSidebarView.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,29 @@ struct AppSidebarView: View {
196196
// The Graph is not a folder and its row doesn't open one — it opens the whole
197197
// workspace drawn as one graph (`GraphOverviewView`), so it carries the same
198198
// connected-nodes glyph the canvas uses for itself rather than a folder icon it
199-
// would otherwise be indistinguishable from.
199+
// would otherwise be indistinguishable from. A remote repository isn't a local
200+
// folder either: it gets the same `network` glyph the Add Remote Repository menu
201+
// item wears, so "this one lives on another machine" is readable at a glance —
202+
// the name alone ("widget @ build-box") only says so once you've read it.
200203
//
201204
// `folder`, not `folder.fill`, and in label ink rather than `.secondary`: a filled
202205
// folder at this size is a grey rectangle, and dimmed on top of that it was the
203206
// least legible thing in the window. See `SidebarIcon`.
204207
SidebarIcon(
205-
systemName: project.graph.isGlobal
206-
? "point.3.connected.trianglepath.dotted" : "folder",
208+
systemName: sidebarGlyph(for: project),
207209
tint: project.graph.isGlobal ? Color.accentColor : .primary)
208210
Text(project.graph.project.name).lineLimit(1)
209211
Spacer()
210212
}
211213
.contentShape(Rectangle())
212214
}
213215

216+
private func sidebarGlyph(for project: ProjectFeature.State) -> String {
217+
if project.graph.isGlobal { return "point.3.connected.trianglepath.dotted" }
218+
if RemoteProjectLocation.parse(projectPath: project.id) != nil { return "network" }
219+
return "folder"
220+
}
221+
214222
/// The sidebar lists every loop across every open project, so it's where people
215223
/// actually reach for a loop — right-clicking one here previously did nothing at all,
216224
/// with the same actions available only on the canvas card.

graphcode/Sources/Features/App/ProjectHeader.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ import SwiftUI
1212
/// at a glance against a wall of terminal text.
1313
struct ProjectHeader: View {
1414
let name: String
15+
/// A remote repository wears the `network` glyph instead of the folder, matching its
16+
/// sidebar row — the shells under this header run on another machine, and that is
17+
/// worth a glance-level signal in exactly the place people check which repo they're in.
18+
var isRemote = false
1519

1620
var body: some View {
1721
HStack(spacing: 7) {
18-
Image(systemName: "folder.fill")
22+
Image(systemName: isRemote ? "network" : "folder.fill")
1923
.font(.system(size: 12))
2024
.foregroundStyle(Theme.folderGlyph)
2125
Text(name)

graphcode/Sources/Features/LoopWorkspace/LoopWorkspaceView.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,16 @@ struct LoopWorkspaceView: View {
5656
private var folderToolbar: some ToolbarContent {
5757
if #available(macOS 26.0, *) {
5858
ToolbarItem(placement: .navigation) {
59-
ProjectHeader(name: store.projectName)
59+
ProjectHeader(
60+
name: store.projectName,
61+
isRemote: RemoteProjectLocation.parse(projectPath: store.projectPath) != nil)
6062
}
6163
.sharedBackgroundVisibility(.hidden)
6264
} else {
6365
ToolbarItem(placement: .navigation) {
64-
ProjectHeader(name: store.projectName)
66+
ProjectHeader(
67+
name: store.projectName,
68+
isRemote: RemoteProjectLocation.parse(projectPath: store.projectPath) != nil)
6569
}
6670
}
6771
}

0 commit comments

Comments
 (0)