A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
Mail pill: an open mail grows the Mail card downwards only
Claudeef4dff987ed0
diff --git a/NotchBuddy/Sources/App/IslandRootView.swift b/NotchBuddy/Sources/App/IslandRootView.swiftindex 3b5a1451..e8e1af7d 100644--- a/NotchBuddy/Sources/App/IslandRootView.swift+++ b/NotchBuddy/Sources/App/IslandRootView.swift@@ -493,6 +493,9 @@ struct CountdownBar: View {struct IslandContentView: View {@ObservedObject var state: AppState+ /// A mail open in the Mail card: the home view grows by this much, downwards only+ /// (the header and the pills stay where they are).+ @State private var mailExtra: CGFloat = 0var body: some View {VStack(spacing: 0) {@@ -516,7 +519,8 @@ struct IslandContentView: View {// but stop their endless animations: nobody sees them..environment(\.islandViewActive, active).frame(maxWidth: .infinity)- .frame(height: isTall ? nil : 98)+ .frame(height: isTall ? nil : (v == .overview ? 98 + mailExtra : 98),+ alignment: v == .overview ? .top : .center).frame(minHeight: (isTall && !active) ? 0 : nil, maxHeight: isTall ? .infinity : nil).opacity(active ? 1 : 0).scaleEffect(active ? 1 : 0.97)@@ -530,6 +534,11 @@ struct IslandContentView: View {.padding(.top, 8).padding(.bottom, 10).foregroundColor(Color(hex: "#F5F6F8"))+ .onReceive(NotificationCenter.default.publisher(for: .islandResize)) { _ in+ let extra = max(0, (MailLayout.detailHeight ?? 160) - 160)+ // The island's own spring (IslandContainer.openSpring): the card and the island move together.+ withAnimation(.spring(response: 0.5, dampingFraction: 0.72)) { mailExtra = extra }+ }}}diff --git a/NotchBuddy/Sources/App/IslandViewContent.swift b/NotchBuddy/Sources/App/IslandViewContent.swiftindex 1a5183ad..5bef94a1 100644--- a/NotchBuddy/Sources/App/IslandViewContent.swift+++ b/NotchBuddy/Sources/App/IslandViewContent.swift@@ -71,7 +71,9 @@ struct OverviewView: View {var agent: AgentTask? { state.focusTask }var body: some View {- HStack(spacing: 10) {+ // Top-aligned: a mail open in the Mail card makes the left card taller, downwards+ // only; the pills on the right keep their place and their height (98 pt).+ HStack(alignment: .top, spacing: 10) {// Left card: title row + ticker below + ↗ button overlayZStack(alignment: .topLeading) {CardBackground(wash: nil)@@ -200,6 +202,7 @@ struct OverviewView: View {CardBackground(wash: nil) {AgentPillsView(state: state)}+ .frame(height: 98)}.onChange(of: state.focusId) { _, new inshowingN8nDetail = falsediff --git a/NotchBuddy/Sources/App/IslandWindowController.swift b/NotchBuddy/Sources/App/IslandWindowController.swiftindex 4b2d3ddc..b8b0b57f 100644--- a/NotchBuddy/Sources/App/IslandWindowController.swift+++ b/NotchBuddy/Sources/App/IslandWindowController.swift@@ -2054,7 +2054,7 @@ extension Notification.Name {/// The home view grows while a mail is open in the Mail card, so it can be read.enum MailLayout {nonisolated(unsafe) static var detailHeight: CGFloat?- static let readingHeight: CGFloat = 250+ static let readingHeight: CGFloat = 280}// MARK: - islandSize (takes real notch dimensions)diff --git a/NotchBuddy/Sources/App/MailViews.swift b/NotchBuddy/Sources/App/MailViews.swiftindex 7ce6a4ea..a07101c9 100644--- a/NotchBuddy/Sources/App/MailViews.swift+++ b/NotchBuddy/Sources/App/MailViews.swift@@ -309,31 +309,32 @@ struct MailDetailView: View {// (36 pt from the edge, like every card header)..padding(.trailing, 24)- Text(message.subject.isEmpty ? " " : message.subject)- .font(.system(size: 11, weight: .medium))- .foregroundColor(Color(hex: "#C5C8CD"))- .lineLimit(2).truncationMode(.tail)- .fixedSize(horizontal: false, vertical: true)-- // The text, scrollable, in all the room left.+ // The subject in full, then the text: one scroll, in all the room left.ScrollView(.vertical, showsIndicators: false) {- Group {- if let text = mail.previews[message.id] {- Text(text.isEmpty ? String(localized: "mail.preview-empty") : text)- } else if mail.previewFailed.contains(message.id) {- Text("mail.preview-failed")- } else {- HStack(spacing: 6) {- MailSpinner()- Text("Loading…")+ VStack(alignment: .leading, spacing: 5) {+ Text(message.subject.isEmpty ? " " : message.subject)+ .font(.system(size: 11, weight: .medium))+ .foregroundColor(Color(hex: "#C5C8CD"))+ .fixedSize(horizontal: false, vertical: true)+ .frame(maxWidth: .infinity, alignment: .leading)+ Group {+ if let text = mail.previews[message.id] {+ Text(text.isEmpty ? String(localized: "mail.preview-empty") : text)+ } else if mail.previewFailed.contains(message.id) {+ Text("mail.preview-failed")+ } else {+ HStack(spacing: 6) {+ MailSpinner()+ Text("Loading…")+ }}}+ .font(.system(size: 10.5))+ .foregroundColor(Color(hex: "#9398A1"))+ .lineSpacing(2)+ .frame(maxWidth: .infinity, alignment: .leading)+ .textSelection(.enabled)}- .font(.system(size: 10.5))- .foregroundColor(Color(hex: "#9398A1"))- .lineSpacing(2)- .frame(maxWidth: .infinity, alignment: .leading)- .textSelection(.enabled)}.frame(maxHeight: .infinity)