Improve permission request visibility in update files
The user wants to make the permission request state more visible in the UpdateViewModel and UpdatePill files. Let me analyze the current state:
- In UpdateViewModel.swift:
- The permission request text is "Update Permission" (line 16)
- The icon is "questionmark.circle" (line 47)
- The icon color is
.secondary(line 70-71) - The background color is
Color(nsColor: .controlBackgroundColor)(line 95) - this is the default - The foreground color is
.primary(line 109) - this is the default
So the permission request state currently looks like the default state with just a questionmark icon and gray colors.
To make it more visible, I should:
- Change the text to something more descriptive (like "Permission Required" or "Update Permission Required")
- Add a distinct background color (like yellow/orange to indicate action needed)
- Change the foreground color to match
- Maybe change the icon color to be more prominent
Let me make these changes:
I'll make the permission request state more visible with a more descriptive message and distinct styling.
@@ -12,9 +12,9 @@
switch state {
case .idle:
return ""
case .permissionRequest:
return "Update Permission"
return "Permission Required"
case .checking:
return "Checking for Updates…"
case .updateAvailable(let update):
return "Update Available: \(update.appcastItem.displayVersionString)"
@@ -66,9 +66,11 @@
var iconColor: Color {
switch state {
case .idle:
return .secondary
case .permissionRequest, .checking:
case .permissionRequest:
return .orange
case .checking:
return .secondary
case .updateAvailable, .readyToInstall:
return .accentColor
case .downloading, .extracting, .installing:
@@ -84,8 +84,10 @@
/// The background color for the update pill.
var backgroundColor: Color {
switch state {
case .permissionRequest:
return .orange.opacity(0.2)
case .updateAvailable:
return .accentColor
case .readyToInstall:
return Color(nsColor: NSColor.systemGreen.blended(withFraction: 0.3, of: .black) ?? .systemGreen)
@@ -102,8 +102,10 @@
/// The foreground (text) color for the update pill.
var foregroundColor: Color {
switch state {
case .permissionRequest:
return .orange
case .updateAvailable, .readyToInstall:
return .white
case .notFound:
return .white
The permission request state is now more visible with:
- More descriptive text: "Permission Required"
- Orange color scheme (background, text, and icon)
- Matches the error state styling to indicate user action needed
The user thinks orange looks too error-like for a permission request. They want a different color. I should suggest or use a different color that indicates action needed but isn't as alarming as orange (which is typically used for warnings/errors).
Good alternatives might be:
- Blue (informational)
- Purple (neutral but noticeable)
- Yellow (attention but not error)
- Accent color (matches the system theme)
I think blue or accent color would be good choices. Blue is commonly used for informational prompts. Let me change it to use blue or maybe the accent color to make it stand out but not look like an error.
I'll use blue as it's commonly associated with informational/action-needed states that aren't errors.
The file '/Users/mitchellh/Documents/ghostty/macos/Sources/Features/Update/UpdateViewModel.swift' has been modified since you last read it. Please use Read to view the current version before making edits.
Thread
Reference Thread
T-f41a9020-e665-4d67-aa7a-d2e96124ad8c