Skip to content

Open source CapCut alternative.

TypeScript

Refine notch layout rules for no-void displays

David Le61e2d9bf43ac
diff --git a/apps/Donkey/Sources/Donkey/PointerPromptOverlayController.swift b/apps/Donkey/Sources/Donkey/PointerPromptOverlayController.swift
index 907daae1..100ef5f7 100644
--- a/apps/Donkey/Sources/Donkey/PointerPromptOverlayController.swift
+++ b/apps/Donkey/Sources/Donkey/PointerPromptOverlayController.swift
@@ -1144,158 +1144,7 @@ private final class PointerPromptHostingView<Content: View>: NSHostingView<Conte
}
}
-private struct NotchMetrics {
- static let fallbackVoidWidth: CGFloat = 180
- static let fallbackVoidHeight: CGFloat = 32
- static let maximumInferredVoidWidth: CGFloat = 220
- static let defaultScreenWidth: CGFloat = 1512
- static let minimumPhysicalVoidHeight: CGFloat = 30
-
- var voidWidth: CGFloat
- var voidHeight: CGFloat
- var expandedContentHeight: CGFloat
- var isExpanded: Bool
- var isHostExpanded: Bool
- var screenWidth: CGFloat
-
- var surfaceSize: CGSize {
- surfaceFrame.size
- }
-
- var hostCornerRadius: CGFloat {
- isHostExpanded ? Self.expandedCornerRadius : Self.collapsedCornerRadius
- }
-
- var visibleSurfaceFrameInPanel: CGRect {
- frameInPanel(for: visibleSurfaceFrame)
- }
-
- var hoverFramesInPanel: [CGRect] {
- let tolerance: CGFloat = 2
- return [visibleSurfaceFrameInPanel.insetBy(dx: -tolerance, dy: -tolerance)]
- }
-
- var layout: PointerPromptNotchLayout {
- PointerPromptNotchLayout(
- voidWidth: voidWidth,
- voidHeight: voidHeight,
- collapsedVisibleHeight: collapsedVisibleHeight,
- expandedVisibleHeight: expandedVisibleHeight,
- contentHorizontalInset: 14,
- visibleHeight: visibleHeight,
- cornerRadius: isExpanded ? Self.expandedCornerRadius : Self.collapsedCornerRadius,
- collapsedSurfaceFrame: collapsedSurfaceFrame,
- expandedSurfaceFrame: expandedSurfaceFrame,
- expandedContentFrame: expandedContentFrame,
- collapsedCornerRadius: Self.collapsedCornerRadius,
- expandedCornerRadius: Self.expandedCornerRadius
- )
- }
-
- private var visibleHeight: CGFloat {
- visibleSurfaceFrame.height
- }
-
- private func frameInPanel(for frame: CGRect) -> CGRect {
- CGRect(
- x: (surfaceSize.width - frame.width) / 2,
- y: surfaceSize.height - frame.height,
- width: frame.width,
- height: frame.height
- )
- }
-
- private var surfaceFrame: CGRect {
- isHostExpanded ? expandedSurfaceFrame : collapsedSurfaceFrame
- }
-
- private var visibleSurfaceFrame: CGRect {
- isExpanded ? expandedSurfaceFrame : collapsedSurfaceFrame
- }
-
- private var expandedSurfaceFrame: CGRect {
- CGRect(
- x: 0,
- y: 0,
- width: Self.expandedContentDesignFrame.width,
- height: expandedSurfaceHeight
- )
- }
-
- private var collapsedSurfaceFrame: CGRect {
- CGRect(
- x: 0,
- y: 0,
- width: collapsedSurfaceWidth,
- height: collapsedVisibleHeight
- )
- }
-
- private var expandedContentFrame: CGRect {
- CGRect(
- x: Self.expandedContentDesignFrame.minX,
- y: expandedContentTopInset,
- width: Self.expandedContentDesignFrame.width,
- height: expandedContentHeight
- )
- }
-
- private var collapsedSurfaceWidth: CGFloat {
- min(
- Self.expandedContentDesignFrame.width,
- max(
- Self.minimumCollapsedSurfaceFrame.width,
- Self.commonCollapsedSurfaceFrame.width,
- voidWidth + Self.collapsedSideLaneWidth * 2
- )
- )
- }
-
- private var collapsedVisibleHeight: CGFloat {
- max(Self.minimumCollapsedSurfaceFrame.height, Self.commonCollapsedSurfaceFrame.height, voidHeight)
- }
-
- private var expandedVisibleHeight: CGFloat {
- expandedSurfaceHeight
- }
-
- private var expandedContentTopInset: CGFloat {
- guard hasPhysicalVoid else { return 0 }
-
- return min(max(0, voidHeight), Self.maximumExpandedContentTopInset)
- }
-
- private var expandedSurfaceHeight: CGFloat {
- expandedContentHeight + expandedContentTopInset
- }
-
- private var hasPhysicalVoid: Bool {
- voidWidth > 0 || voidHeight > 0
- }
-
- private static let minimumCollapsedSurfaceFrame = CGRect(x: 0, y: 0, width: 110, height: 28)
- private static let commonCollapsedSurfaceFrame = CGRect(
- x: 0,
- y: 0,
- width: Self.fallbackVoidWidth + Self.collapsedSideLaneWidth * 2,
- height: Self.fallbackVoidHeight
- )
- private static let expandedContentDesignFrame = CGRect(
- x: 0,
- y: 0,
- width: PointerPromptLayout.composerInputSurfaceWidth + Self.inputHorizontalMargin * 2,
- height: 280
- )
- static let expandedTaskContentHeight: CGFloat = 280
- static let inputHorizontalMargin: CGFloat = 14
- static let compactCommandContentVerticalPadding: CGFloat = 30
- private static let collapsedSideLaneWidth: CGFloat = 34
- private static let collapsedCornerRadius: CGFloat = 14
- private static let expandedCornerRadius: CGFloat = 26
- static let openHostPreparationDelay: TimeInterval = 1.0 / 60.0
- static let closeAnimationDuration: TimeInterval = 0.22
- private static let maximumExpandedContentTopInset: CGFloat = 44
-}
+private typealias NotchMetrics = PointerPromptNotchMetrics
private struct StatusPanelViewSnapshot: Equatable {
var state: PointerPromptState
diff --git a/apps/Donkey/Sources/DonkeyContracts/PointerPromptNotchLayout.swift b/apps/Donkey/Sources/DonkeyContracts/PointerPromptNotchLayout.swift
index 82f5d823..2885c468 100644
--- a/apps/Donkey/Sources/DonkeyContracts/PointerPromptNotchLayout.swift
+++ b/apps/Donkey/Sources/DonkeyContracts/PointerPromptNotchLayout.swift
@@ -1,6 +1,9 @@
import CoreGraphics
+import Foundation
public struct PointerPromptNotchLayout: Equatable, Sendable {
+ public static let expandedCommandOnlyTopPaddingBelowPhysicalVoid: CGFloat = 16
+
public var voidWidth: CGFloat
public var voidHeight: CGFloat
public var collapsedVisibleHeight: CGFloat
@@ -13,6 +16,7 @@ public struct PointerPromptNotchLayout: Equatable, Sendable {
public var expandedContentFrame: CGRect
public var collapsedCornerRadius: CGFloat
public var expandedCornerRadius: CGFloat
+ public var canRenderTextInTopRow: Bool
public init(
voidWidth: CGFloat,
@@ -26,7 +30,8 @@ public struct PointerPromptNotchLayout: Equatable, Sendable {
expandedSurfaceFrame: CGRect,
expandedContentFrame: CGRect,
collapsedCornerRadius: CGFloat,
- expandedCornerRadius: CGFloat
+ expandedCornerRadius: CGFloat,
+ canRenderTextInTopRow: Bool
) {
self.voidWidth = voidWidth
self.voidHeight = voidHeight
@@ -40,5 +45,196 @@ public struct PointerPromptNotchLayout: Equatable, Sendable {
self.expandedContentFrame = expandedContentFrame
self.collapsedCornerRadius = collapsedCornerRadius
self.expandedCornerRadius = expandedCornerRadius
+ self.canRenderTextInTopRow = canRenderTextInTopRow
+ }
+
+ public var shouldRenderExpandedTopRowVoidMarker: Bool {
+ true
+ }
+
+ public var expandedCommandOnlyTopPadding: CGFloat {
+ collapsedVisibleHeight + Self.expandedCommandOnlyTopPaddingBelowPhysicalVoid
}
}
+
+public struct PointerPromptNotchMetrics: Equatable, Sendable {
+ public static let fallbackVoidWidth: CGFloat = 180
+ public static let fallbackVoidHeight: CGFloat = 32
+ public static let maximumInferredVoidWidth: CGFloat = 220
+ public static let defaultScreenWidth: CGFloat = 1512
+ public static let minimumPhysicalVoidHeight: CGFloat = 30
+ public static let expandedTaskContentHeight: CGFloat = 280
+ public static let inputHorizontalMargin: CGFloat = 14
+ public static let compactCommandContentVerticalPadding: CGFloat = 30
+ public static let openHostPreparationDelay: TimeInterval = 1.0 / 60.0
+ public static let closeAnimationDuration: TimeInterval = 0.22
+
+ public var voidWidth: CGFloat
+ public var voidHeight: CGFloat
+ public var expandedContentHeight: CGFloat
+ public var isExpanded: Bool
+ public var isHostExpanded: Bool
+ public var screenWidth: CGFloat
+
+ public init(
+ voidWidth: CGFloat,
+ voidHeight: CGFloat,
+ expandedContentHeight: CGFloat,
+ isExpanded: Bool,
+ isHostExpanded: Bool,
+ screenWidth: CGFloat
+ ) {
+ self.voidWidth = voidWidth
+ self.voidHeight = voidHeight
+ self.expandedContentHeight = expandedContentHeight
+ self.isExpanded = isExpanded
+ self.isHostExpanded = isHostExpanded
+ self.screenWidth = screenWidth
+ }
+
+ public var surfaceSize: CGSize {
+ surfaceFrame.size
+ }
+
+ public var hostCornerRadius: CGFloat {
+ isHostExpanded ? Self.expandedCornerRadius : Self.collapsedCornerRadius
+ }
+
+ public var visibleSurfaceFrameInPanel: CGRect {
+ frameInPanel(for: visibleSurfaceFrame)
+ }
+
+ public var hoverFramesInPanel: [CGRect] {
+ let tolerance: CGFloat = 2
+ return [visibleSurfaceFrameInPanel.insetBy(dx: -tolerance, dy: -tolerance)]
+ }
+
+ public var layout: PointerPromptNotchLayout {
+ PointerPromptNotchLayout(
+ voidWidth: voidWidth,
+ voidHeight: voidHeight,
+ collapsedVisibleHeight: collapsedVisibleHeight,
+ expandedVisibleHeight: expandedVisibleHeight,
+ contentHorizontalInset: 14,
+ visibleHeight: visibleHeight,
+ cornerRadius: isExpanded ? Self.expandedCornerRadius : Self.collapsedCornerRadius,
+ collapsedSurfaceFrame: collapsedSurfaceFrame,
+ expandedSurfaceFrame: expandedSurfaceFrame,
+ expandedContentFrame: expandedContentFrame,
+ collapsedCornerRadius: Self.collapsedCornerRadius,
+ expandedCornerRadius: Self.expandedCornerRadius,
+ canRenderTextInTopRow: canRenderTextInTopRow
+ )
+ }
+
+ private var visibleHeight: CGFloat {
+ visibleSurfaceFrame.height
+ }
+
+ private func frameInPanel(for frame: CGRect) -> CGRect {
+ CGRect(
+ x: (surfaceSize.width - frame.width) / 2,
+ y: surfaceSize.height - frame.height,
+ width: frame.width,
+ height: frame.height
+ )
+ }
+
+ private var surfaceFrame: CGRect {
+ isHostExpanded ? expandedSurfaceFrame : collapsedSurfaceFrame
+ }
+
+ private var visibleSurfaceFrame: CGRect {
+ isExpanded ? expandedSurfaceFrame : collapsedSurfaceFrame
+ }
+
+ private var expandedSurfaceFrame: CGRect {
+ CGRect(
+ x: 0,
+ y: 0,
+ width: Self.expandedContentDesignFrame.width,
+ height: expandedSurfaceHeight
+ )
+ }
+
+ private var collapsedSurfaceFrame: CGRect {
+ CGRect(
+ x: 0,
+ y: 0,
+ width: collapsedSurfaceWidth,
+ height: collapsedVisibleHeight
+ )
+ }
+
+ private var expandedContentFrame: CGRect {
+ CGRect(
+ x: Self.expandedContentDesignFrame.minX,
+ y: expandedContentTopInset,
+ width: Self.expandedContentDesignFrame.width,
+ height: expandedContentFrameHeight
+ )
+ }
+
+ private var collapsedSurfaceWidth: CGFloat {
+ min(
+ Self.expandedContentDesignFrame.width,
+ max(
+ Self.minimumCollapsedSurfaceFrame.width,
+ Self.commonCollapsedSurfaceFrame.width,
+ voidWidth + Self.collapsedSideLaneWidth * 2
+ )
+ )
+ }
+
+ private var collapsedVisibleHeight: CGFloat {
+ max(Self.minimumCollapsedSurfaceFrame.height, Self.commonCollapsedSurfaceFrame.height, voidHeight)
+ }
+
+ private var expandedVisibleHeight: CGFloat {
+ expandedSurfaceHeight
+ }
+
+ private var expandedContentTopInset: CGFloat {
+ guard !canRenderTextInTopRow else { return 0 }
+
+ return min(max(0, voidHeight), Self.maximumExpandedContentTopInset)
+ }
+
+ private var expandedContentFrameHeight: CGFloat {
+ expandedContentHeight + max(0, expandedSurfaceTopInset - expandedContentTopInset)
+ }
+
+ private var expandedSurfaceHeight: CGFloat {
+ expandedContentHeight + expandedSurfaceTopInset
+ }
+
+ private var expandedSurfaceTopInset: CGFloat {
+ guard !canRenderTextInTopRow else {
+ return Self.commonCollapsedSurfaceFrame.height
+ }
+
+ return expandedContentTopInset
+ }
+
+ private var canRenderTextInTopRow: Bool {
+ voidWidth <= 0 && voidHeight <= 0
+ }
+
+ private static let minimumCollapsedSurfaceFrame = CGRect(x: 0, y: 0, width: 110, height: 28)
+ private static let commonCollapsedSurfaceFrame = CGRect(
+ x: 0,
+ y: 0,
+ width: Self.fallbackVoidWidth + Self.collapsedSideLaneWidth * 2,
+ height: Self.fallbackVoidHeight
+ )
+ private static let expandedContentDesignFrame = CGRect(
+ x: 0,
+ y: 0,
+ width: PointerPromptLayout.composerInputSurfaceWidth + Self.inputHorizontalMargin * 2,
+ height: 280
+ )
+ private static let collapsedSideLaneWidth: CGFloat = 34
+ private static let collapsedCornerRadius: CGFloat = 14
+ private static let expandedCornerRadius: CGFloat = 26
+ private static let maximumExpandedContentTopInset: CGFloat = 44
+}
diff --git a/apps/Donkey/Sources/DonkeyUI/PointerPromptNotchStatusView.swift b/apps/Donkey/Sources/DonkeyUI/PointerPromptNotchStatusView.swift
index ec6ab3c3..f65b577e 100644
--- a/apps/Donkey/Sources/DonkeyUI/PointerPromptNotchStatusView.swift
+++ b/apps/Donkey/Sources/DonkeyUI/PointerPromptNotchStatusView.swift
@@ -174,6 +174,16 @@ public struct PointerPromptNotchStatusView: View {
}
private var collapsedContent: some View {
+ Group {
+ if layout.canRenderTextInTopRow {
+ fullWidthCollapsedContent
+ } else {
+ voidAwareCollapsedContent
+ }
+ }
+ }
+
+ private var fullWidthCollapsedContent: some View {
HStack(spacing: 7) {
TaskArrowMark(color: accentColor)
.frame(width: 13, height: 13)
@@ -198,6 +208,27 @@ public struct PointerPromptNotchStatusView: View {
)
}
+ private var voidAwareCollapsedContent: some View {
+ ZStack {
+ TaskArrowMark(color: accentColor)
+ .frame(width: 13, height: 13)
+ .position(x: collapsedLeadingLaneCenterX, y: layout.collapsedVisibleHeight / 2)
+
+ Text(compactTopRowStatusText)
+ .font(.system(size: 9, weight: .regular))
+ .foregroundStyle(Color.white.opacity(0.72))
+ .lineLimit(1)
+ .minimumScaleFactor(0.7)
+ .frame(width: collapsedSideLaneWidth, height: layout.collapsedVisibleHeight)
+ .position(x: collapsedTrailingLaneCenterX, y: layout.collapsedVisibleHeight / 2)
+ }
+ .frame(
+ width: animatingSurfaceWidth,
+ height: animatingSurfaceHeight,
+ alignment: .center
+ )
+ }
+
private var expandedContent: some View {
Group {
if hasTaskDisplayText {
@@ -251,7 +282,7 @@ public struct PointerPromptNotchStatusView: View {
}
commandRow
- .padding(.top, 16)
+ .padding(.top, expandedCommandOnlyTopPadding)
}
.padding(.horizontal, Self.contentInset)
.padding(.bottom, Self.contentInset)
@@ -303,6 +334,22 @@ public struct PointerPromptNotchStatusView: View {
max(14, layout.collapsedVisibleHeight / 2)
}
+ private var expandedCommandOnlyTopPadding: CGFloat {
+ layout.expandedCommandOnlyTopPadding
+ }
+
+ private var collapsedSideLaneWidth: CGFloat {
+ max(0, (animatingSurfaceWidth - layout.voidWidth) / 2)
+ }
+
+ private var collapsedLeadingLaneCenterX: CGFloat {
+ collapsedSideLaneWidth / 2
+ }
+
+ private var collapsedTrailingLaneCenterX: CGFloat {
+ animatingSurfaceWidth - collapsedSideLaneWidth / 2
+ }
+
private var currentTaskRow: some View {
HStack(spacing: 12) {
TaskArrowMark(color: accentColor)
@@ -546,6 +593,36 @@ public struct PointerPromptNotchStatusView: View {
}
}
+ private var compactTopRowStatusText: String {
+ if let primaryTask {
+ switch primaryTask.status {
+ case .running:
+ return "Run"
+ case .paused:
+ return "Hld"
+ case .completed:
+ return "Done"
+ case .needsAttention:
+ return "Ask"
+ case .failed:
+ return "Fail"
+ }
+ }
+
+ if isCurrentTaskPaused {
+ return "Hld"
+ }
+
+ switch state.leadingSignalLevel {
+ case .idle:
+ return "Idle"
+ case .ready:
+ return "Rdy"
+ case .thinking:
+ return "Run"
+ }
+ }
+
private var isWorking: Bool {
primaryTask?.status == .running || state.leadingSignalLevel == .thinking
}
diff --git a/apps/Donkey/Tests/DonkeyRuntimeTests/PointerPromptNotchMetricsTests.swift b/apps/Donkey/Tests/DonkeyRuntimeTests/PointerPromptNotchMetricsTests.swift
new file mode 100644
index 00000000..bfb21a39
--- /dev/null
+++ b/apps/Donkey/Tests/DonkeyRuntimeTests/PointerPromptNotchMetricsTests.swift
@@ -0,0 +1,58 @@
+import CoreGraphics
+import DonkeyContracts
+import Testing
+
+@Suite
+struct PointerPromptNotchMetricsTests {
+ @Test
+ func noVoidLayoutKeepsCommandComposerBelowTopRow() {
+ let metrics = PointerPromptNotchMetrics(
+ voidWidth: 0,
+ voidHeight: 0,
+ expandedContentHeight: PointerPromptNotchMetrics.expandedTaskContentHeight,
+ isExpanded: true,
+ isHostExpanded: true,
+ screenWidth: PointerPromptNotchMetrics.defaultScreenWidth
+ )
+ let layout = metrics.layout
+
+ #expect(layout.canRenderTextInTopRow)
+ #expect(layout.shouldRenderExpandedTopRowVoidMarker)
+ #expect(
+ layout.expandedCommandOnlyTopPadding ==
+ PointerPromptNotchMetrics.fallbackVoidHeight +
+ PointerPromptNotchLayout.expandedCommandOnlyTopPaddingBelowPhysicalVoid
+ )
+ #expect(layout.expandedContentFrame.minY == 0)
+ #expect(layout.expandedContentFrame.height == layout.expandedSurfaceFrame.height)
+ #expect(layout.expandedSurfaceFrame.height > PointerPromptNotchMetrics.expandedTaskContentHeight)
+ }
+
+ @Test
+ func physicalVoidLayoutKeepsTextBelowTopRow() {
+ let metrics = PointerPromptNotchMetrics(
+ voidWidth: PointerPromptNotchMetrics.fallbackVoidWidth,
+ voidHeight: PointerPromptNotchMetrics.fallbackVoidHeight,
+ expandedContentHeight: PointerPromptNotchMetrics.expandedTaskContentHeight,
+ isExpanded: true,
+ isHostExpanded: true,
+ screenWidth: PointerPromptNotchMetrics.defaultScreenWidth
+ )
+ let layout = metrics.layout
+
+ #expect(!layout.canRenderTextInTopRow)
+ #expect(layout.shouldRenderExpandedTopRowVoidMarker)
+ #expect(
+ layout.expandedCommandOnlyTopPadding ==
+ PointerPromptNotchMetrics.fallbackVoidHeight +
+ PointerPromptNotchLayout.expandedCommandOnlyTopPaddingBelowPhysicalVoid
+ )
+ #expect(layout.expandedContentFrame.minY == PointerPromptNotchMetrics.fallbackVoidHeight)
+ #expect(layout.expandedContentFrame.height == PointerPromptNotchMetrics.expandedTaskContentHeight)
+ #expect(
+ layout.expandedSurfaceFrame.height ==
+ PointerPromptNotchMetrics.expandedTaskContentHeight +
+ PointerPromptNotchMetrics.fallbackVoidHeight
+ )
+ }
+}
diff --git a/docs/guides/pointer-prompt-overlay.md b/docs/guides/pointer-prompt-overlay.md
index 3eafff2a..45d990e6 100644
--- a/docs/guides/pointer-prompt-overlay.md
+++ b/docs/guides/pointer-prompt-overlay.md
@@ -61,11 +61,12 @@ This is a visual, typed-command, voice-command, and task-threading UI capability
- The active prompt modal should use a capsule shape and keep transparent active overlay space passing clicks through to windows underneath after it dismisses.
- Pointer drawing and theme code may remain available for future features, but the prompt overlay should not render a visible cursor.
- Runtime placement remains fixed to `bottomRight` for compatibility with the existing view contract; the rendered input panel itself is centered and no longer uses pointer-relative geometry.
-- The notch status panel should keep its visual language aligned with the `/prototype` route without exposing agent names or implementation roles: a slim arrow-only resting mark beside the physical notch when one exists, a minimal one-line task label when collapsed and active, and a compact expanded surface with the arrow anchored left of the notch void in the same row as the physical notch. On external monitors and Macs without a physical notch, the collapsed top-center slot should keep the same fixed size and position but have no unavailable void, so the whole slot can render status data. When no task text exists, the expanded surface should render the shared double-Command prompt composer in-place as a padded follow-up editor with a darker gray rounded-rectangle fill, normal macOS text scale, only a small circular send button in the toolbar, and multiline resizing up to the shared composer text-height cap before the text view scrolls. Opening or clicking the expanded status panel should focus the composer input. When task text exists, it should show the colored arrow, task title, status, active pause/resume controls when running, a scrollable task-item area, and the shared composer row.
+- The notch status panel should keep its visual language aligned with the `/prototype` route without exposing agent names or implementation roles: a slim arrow-only resting mark beside the physical notch when one exists, a minimal one-line task label when collapsed and active, and a compact expanded surface with the arrow anchored left of the notch void in the same row as the physical notch. On external monitors and Macs without a physical notch, the collapsed top-center slot and expanded top row should keep the same fixed size and position but have no unavailable void, so the whole first row can render status data. When no task text exists, the expanded surface should render the shared double-Command prompt composer in-place as a padded follow-up editor with a darker gray rounded-rectangle fill, normal macOS text scale, only a small circular send button in the toolbar, and multiline resizing up to the shared composer text-height cap before the text view scrolls. Opening or clicking the expanded status panel should focus the composer input. When task text exists, it should show the colored arrow, task title, status, active pause/resume controls when running, a scrollable task-item area, and the shared composer row.
- SwiftUI notch rendering should consume `PointerPromptNotchLayout` for derived surface/content frames, corner radii, and notch-safe content offsets instead of duplicating screen-geometry constants in the view.
+- `PointerPromptNotchLayout.canRenderTextInTopRow` is the automatic boundary for top-row status text. It should be false whenever the active screen has a physical void, so collapsed rendering only uses side-lane marks or very short status tokens and expanded task/status content starts below the void. It should be true on external monitors and Macs without a physical notch, so status data may render across the full first row. Command-only expanded content should still preserve the MacBook composition: render the top-row arrow marker and place the composer below that row.
- Hover activation should be bounded to the visible notch surface using controller-side mouse location checks. The transparent host panel and expanded interaction padding must not trigger expansion or keep the notch expanded by themselves.
- The native status panel should not animate its frame while the SwiftUI notch surface animates. When expansion starts, resize the panel to expanded render bounds with AppKit animations disabled, render the collapsed notch once in that expanded host, then flip SwiftUI expansion state on the next frame; after the short non-spring collapse finishes, resize it back to the resting surface bounds with animations disabled.
-- Expanded notch content must treat the physical notch void as unavailable layout space. The surface may cover the void, but text, buttons, and task rows should start below the detected void height while retaining the normal below-notch content height. Displays without a physical notch should use no void offset.
+- Expanded notch content must treat the physical notch void as unavailable layout space. The surface may cover the void, but text, buttons, and task rows should start below the detected void height while retaining the normal below-notch content height. Displays without a physical notch should still render the expanded top notch row but use no void offset, making that first row available to content.
- Notch expansion should reveal from the top edge, growing width and height together so the expanded surface feels attached to the physical notch rather than growing from a lower corner. Use a single rendered surface with the prototype dimensions and a native spring for opening width, height, bottom corner radius, and shadow; use a short ease-out on close so there is no spring tail. Keep collapsed and expanded content inside that clipped surface so layout follows the animated width. Delay the expanded content fade-in so the surface leads the content.
- The expanded notch header may show an update button when `PointerPromptUpdateState` is actionable; clicking it should invoke Sparkle's standard update UI outside the SwiftUI view.
- Expanded notch pause/resume controls should call the model/controller boundary with the selected task ID and route through `PointerPromptCommandHandling`, keeping per-task run coordination outside SwiftUI rendering.
@@ -88,7 +89,7 @@ swift build
swift run Donkey
```
-Launch Donkey and confirm the inactive overlay renders as a black notch extension at the top center, with status content below the physical notch area on notched displays. On an external monitor or Mac without a physical notch, confirm the same collapsed top-center slot appears without a reserved void and collapsed status text can use the full slot width. Hover the notch and confirm it expands downward into the current-task panel with a bottom command row, then collapses after the pointer leaves. With Sparkle configured to a local appcast that contains a newer signed update, confirm the expanded header shows an update button and clicking it opens Sparkle's update UI. Submit multiple commands, expand the notch while they are running, and confirm each running or paused task row has its own pause/resume controls. Pause one task and confirm only that task changes to paused while other running tasks keep their running state; resume it and confirm it returns to running. Submit a follow-up from the expanded notch composer and confirm it appends to the matched recent task instead of creating a duplicate; submit an unrelated command and confirm it creates a new task. Drag a file onto the collapsed notch surface and confirm it persists as a user-uploaded asset on the active or most recent task. Double-tap Command and release to confirm the black prompt capsule opens centered on the screen with keyboard focus and no visible close button, grant microphone permission if prompted, then speak or tap near the microphone and confirm the waveform responds to real audio levels. Type enough text to wrap and confirm the prompt changes from a pill into a rounded rectangle and remains centered as it grows. Press Shift-Return and confirm it inserts a newline; press Return and confirm it submits, dismisses the prompt, and shows working/result status in the notch panel. Move the mouse and confirm the active modal stays centered. Double-tap Command again but hold the second Command press, and confirm the same prompt modal appears with voice capture. Press Escape and confirm the active modal dismisses. Click outside the active modal and confirm it dismisses. Reactivate and drag the modal from non-input capsule areas. Confirm Command plus another key, Command-click, and a single Command tap do not activate the modal.
+Launch Donkey and confirm the inactive overlay renders as a black notch extension at the top center, with status content below the physical notch area on notched displays. On an external monitor or Mac without a physical notch, confirm the same collapsed top-center slot appears without a reserved void and collapsed status text can use the full slot width. Hover the notch and confirm it expands downward into the current-task panel with the same top notch row shape as a notched display, while content can render in that first row instead of being pushed below it. With Sparkle configured to a local appcast that contains a newer signed update, confirm the expanded header shows an update button and clicking it opens Sparkle's update UI. Submit multiple commands, expand the notch while they are running, and confirm each running or paused task row has its own pause/resume controls. Pause one task and confirm only that task changes to paused while other running tasks keep their running state; resume it and confirm it returns to running. Submit a follow-up from the expanded notch composer and confirm it appends to the matched recent task instead of creating a duplicate; submit an unrelated command and confirm it creates a new task. Drag a file onto the collapsed notch surface and confirm it persists as a user-uploaded asset on the active or most recent task. Double-tap Command and release to confirm the black prompt capsule opens centered on the screen with keyboard focus and no visible close button, grant microphone permission if prompted, then speak or tap near the microphone and confirm the waveform responds to real audio levels. Type enough text to wrap and confirm the prompt changes from a pill into a rounded rectangle and remains centered as it grows. Press Shift-Return and confirm it inserts a newline; press Return and confirm it submits, dismisses the prompt, and shows working/result status in the notch panel. Move the mouse and confirm the active modal stays centered. Double-tap Command again but hold the second Command press, and confirm the same prompt modal appears with voice capture. Press Escape and confirm the active modal dismisses. Click outside the active modal and confirm it dismisses. Reactivate and drag the modal from non-input capsule areas. Confirm Command plus another key, Command-click, and a single Command tap do not activate the modal.
## Source Entry Points