Skip to content

new screen recording hud update - #552

Open
Ruken16 wants to merge 8 commits into
Ebullioscopic:devfrom
Ruken16:screenrecording
Open

new screen recording hud update#552
Ruken16 wants to merge 8 commits into
Ebullioscopic:devfrom
Ruken16:screenrecording

Conversation

@Ruken16

@Ruken16 Ruken16 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator
image
Registrazione.schermo.Lug.1.2026.mov
Registrazione.schermo.Lug.01.2026.mov

Summary by CodeRabbit

  • New Features

    • Added configurable screen-recording indicators, stop controls, and hover styles.
    • Recording HUD now shows status, duration, pulsing indicator, and recording details.
    • Added a stop-recording control with visual feedback while processing.
    • Improved recording HUD sizing and interaction behavior in the closed notch.
    • Improved LLM usage views with consistent sizing and centered layouts.
  • Bug Fixes

    • Improved notch visibility and positioning when switching spaces or displays.
    • Corrected recording and music activity display conditions.

@Ebullioscopic

Copy link
Copy Markdown
Owner

@Ruken16 please drop the changes done to the pbxproj file

and @coderabbitai please review everything

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh pr view 552 --repo Ebullioscopic/Atoll --json title,body,files,additions,deletions,changedFiles -q '.'
echo "-----FILES-----"
gh pr diff 552 --repo Ebullioscopic/Atoll --name-only

Length of output: 2026


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh pr diff 552 --repo Ebullioscopic/Atoll -- DynamicIsland/ContentView.swift DynamicIsland/DynamicIslandApp.swift DynamicIsland/components/Recording/RecordingLiveActivity.swift DynamicIsland/components/Settings/SettingsView.swift DynamicIsland/managers/ScreenRecordingManager.swift DynamicIsland/models/Constants.swift

Length of output: 693


🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh pr diff 552 --repo Ebullioscopic/Atoll > /tmp/pr552.diff
wc -l /tmp/pr552.diff
echo "---split by file---"
csplit -z -f /tmp/pr552_file_ -b '%02d.diff' /tmp/pr552.diff '/^diff --git/' '{*}' 2>/dev/null || true
ls /tmp/pr552_file_*.diff

Length of output: 685


🏁 Script executed:

#!/bin/bash
set -euo pipefail
awk '/^diff --git/{n++} {print > ("/tmp/pr552_part_" n ".diff")}' /tmp/pr552.diff
ls -la /tmp/pr552_part_*.diff
for f in /tmp/pr552_part_*.diff; do
  echo "=== FILE: $f ==="
  head -1 "$f"
done

Length of output: 2062


🏁 Script executed:

#!/bin/bash
cat /tmp/pr552_part_2.diff
echo "=================================="
cat /tmp/pr552_part_3.diff

Length of output: 10808


🏁 Script executed:

#!/bin/bash
cat /tmp/pr552_part_5.diff

Length of output: 11644


🏁 Script executed:

#!/bin/bash
cat /tmp/pr552_part_7.diff
echo "===================="
cat /tmp/pr552_part_6.diff
echo "===================="
cat /tmp/pr552_part_8.diff

Length of output: 13680


🏁 Script executed:

#!/bin/bash
grep -rn "isRecorderIdle" --include=*.swift . 
echo "---"
grep -rn "canStopFromHUD\|stopActiveRecordingOrSharing" --include=*.swift .

Length of output: 2519


@Ebullioscopic, understood on the project.pbxproj — that's a small 4-line change (likely just build settings/file references reordering from Xcode), so I'll leave that to @Ruken16 to drop/revert.

Here's my review of the rest of the PR:

Summary of changes

  • New RecordingHoverStyle enum (default / inline) with a Defaults key, exposed via a segmented picker in Settings ("Recording hover style").
  • ContentView/DynamicIslandApp compute HUD sizing (width/height) for the closed-notch recording live activity based on hover state and style, replacing the old !isRecorderIdle condition with a simpler isRecording-only check.
  • RecordingLiveActivity now renders three variants: compact, inline (stop button inside notch height), and expanded (default hover HUD with bigger stop button).
  • ScreenRecordingManager gained stopActiveRecordingOrSharing() to let users stop a recording directly from the HUD, plus canStopFromHUD/isSendingStopRequest published state.

Concerns

  1. Risky process termination fallback (ScreenRecordingManager.stopSystemScreenCaptureProcesses()): after the synthetic shortcut attempts fail, this calls killall on screencapture, screencaptureui, ScreenCaptureUI, and ScreenCaptureKitAgent. ScreenCaptureKitAgent in particular is a shared macOS daemon used by many third-party apps (Zoom, Slack huddles, Loom, etc.) for their own screen sharing/recording via ScreenCaptureKit. Force-killing it as a fallback here could unexpectedly interrupt an unrelated app's active screen share, not just the native Screenshot-app recording this feature targets. Since canStopFromHUD is already gated on pgrep -x screencapture (i.e., only shown when the native recorder is active), consider dropping the ScreenCaptureUI/ScreenCaptureKitAgent kill attempts entirely, or at minimum re-verify via isNativeMacOSScreenRecordingProcessActive() immediately before invoking killall so it's never used against sessions started by other apps.

  2. Synthetic keystroke reliability: stopActiveRecordingOrSharing() sends Cmd+Control+Esc via both AppleScript "System Events" and CGEvent posting. This assumes:

    • The user hasn't remapped that shortcut in System Settings.
    • Accessibility/Automation permission is already granted (failures are only print()-logged, with no user-facing prompt or error state surfaced back through isSendingStopRequest).

    Consider surfacing a failure state (e.g., a brief HUD message or permission prompt) if all three stop strategies fail, rather than silently leaving isSendingStopRequest reset with no recording actually stopped.

  3. Redundant gesture handlers in RecordingLiveActivity.swift (Lines ~223-234 and ~247-258): both stopButton and inlineStopButton attach .onTapGesture { ... } and .highPriorityGesture(TapGesture().onEnded { ... }) calling the exact same stopActiveRecordingOrSharing(). highPriorityGesture already takes precedence over onTapGesture, so the onTapGesture closure is effectively dead code — worth removing one of the two to avoid confusion/maintenance overhead.

  4. Debug print() statements: several new print("ScreenRecordingManager: ...") calls were added across the stop/refresh flow. Consider gating these behind #if DEBUG or a lightweight logger to avoid noisy console output in release builds.

  5. Functionally, replacing (recordingManager.isRecording || !recordingManager.isRecorderIdle) with just recordingManager.isRecording in the HUD visibility conditions looks correct given isRecorderIdle is no longer read anywhere outside ScreenRecordingManager itself — just flagging for your awareness in case that idle-buffer behavior was intentionally covering a detection-flicker edge case.

Nothing else stood out as blocking — the sizing/hover-state plumbing across ContentView, DynamicIslandApp, and RecordingLiveActivity is consistent, and the new recordingHoverStyle setting is wired correctly end-to-end.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds configurable screen-recording HUD styles and stop controls, integrates recording visibility with closed-notch sizing and gestures, synchronizes notch windows across Spaces, and adjusts LLM usage notch layout sizing and provider card presentation.

Changes

Recording Hover Style & Stop Workflow

Layer / File(s) Summary
Recording settings controls
DynamicIsland/models/Constants.swift, DynamicIsland/components/Settings/SettingsView.swift
Adds recording control and hover-style settings, searchable settings entries, conditional options, and Minimalistic UI normalization.
ScreenRecordingManager stop workflow and HUD availability
DynamicIsland/managers/ScreenRecordingManager.swift
Adds stop-request state, process-based stop availability checks, asynchronous shortcut and process fallbacks, and updated idle-state handling.
RecordingLiveActivity HUD layout variants
DynamicIsland/components/Recording/RecordingLiveActivity.swift, DynamicIsland/components/Live activities/PulsingModifier.swift
Renders compact, inline, and expanded recording HUD modes using external hover and gesture state, with stop-button progress visuals.
ContentView closed-notch recording integration
DynamicIsland/ContentView.swift
Adds recording eligibility, closed-notch sizing and shape selection, recording-only rendering conditions, and gesture-opening locks.
Notch size calculation and window-space synchronization
DynamicIsland/DynamicIslandApp.swift, DynamicIsland/components/Notch/DynamicIslandWindow.swift
Adds recording HUD sizing, centralized sizing helpers, unconditional window membership synchronization, active-Space handling, and shared pinned collection behavior.

LLM Usage Notch Layout

Layer / File(s) Summary
LLM usage notch sizing and card layout
DynamicIsland/sizing/matters.swift, DynamicIsland/models/DynamicIslandViewModel.swift, DynamicIsland/ContentView.swift, DynamicIsland/components/Notch/NotchLLMUsageView.swift
Adds LLM usage sizing constants, clamps open-notch height, filters enabled providers, centers the layout, and fixes provider card dimensions.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant RecordingLiveActivity
  participant ContentView
  participant ScreenRecordingManager
  participant SystemEvents
  User->>RecordingLiveActivity: hover recording HUD
  RecordingLiveActivity->>ContentView: update hover and gesture bindings
  ContentView->>ContentView: compute closed-notch size and gesture lock
  User->>RecordingLiveActivity: select stop control
  RecordingLiveActivity->>ScreenRecordingManager: stopActiveRecordingOrSharing()
  ScreenRecordingManager->>SystemEvents: send stop shortcut
  ScreenRecordingManager->>ScreenRecordingManager: refresh recording status
  ScreenRecordingManager-->>RecordingLiveActivity: publish stop-request and failure state
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the PR, but it is too vague to describe the main change clearly. Use a more specific title that mentions the screen recording HUD and stop/control updates, e.g. "Add screen recording HUD controls".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ebullioscopic Ebullioscopic added the in progress This PR/issue is in progress label Jul 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
DynamicIsland/ContentView.swift (1)

2133-2146: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Re-check the recording HUD lock after the hover delay.

Line 2134 runs before the async sleep. If recording starts while the pointer is already hovering, the delayed task can still open the notch.

Proposed fix
 await MainActor.run {
     guard self.vm.notchState == .closed,
           self.isHovering,
+          !self.recordingLiveActivityVisibleOnClosedNotch,
           !self.isSneakPeekVisibleOnCurrentScreen,
           !self.coordinator.isHoverOpenSuppressed else { return }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/ContentView.swift` around lines 2133 - 2146, The hover-open
flow in ContentView’s hoverTask should re-check the recording HUD lock after the
sleep, not only before it. Update the delayed Task that follows the initial
guard so it verifies the recording/locked state again inside the MainActor.run
block before opening the notch, alongside the existing vm.notchState,
isHovering, isSneakPeekVisibleOnCurrentScreen, and
coordinator.isHoverOpenSuppressed checks.
🧹 Nitpick comments (3)
DynamicIsland/Localizable.xcstrings (1)

20248-20251: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

New localization keys lack comment/isCommentAutoGenerated metadata.

Other recently-added string entries in this file include a comment describing UI context for translators. These two new keys ("Default uses the expanded recording HUD..." and "Recording hover style") have empty bodies. Not blocking, but consider adding comments for translator context consistency with the rest of the catalog.

Also applies to: 48164-48167

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/Localizable.xcstrings` around lines 20248 - 20251, The two new
localization entries in DynamicIsland/Localizable.xcstrings are missing
translator metadata, unlike nearby keys that include context comments. Update
the entries for the recording HUD description and the “Recording hover style”
key to include appropriate comment text and set isCommentAutoGenerated
consistently with the surrounding catalog, using the same structure as other
localization items in this file.
DynamicIsland/components/Recording/RecordingLiveActivity.swift (1)

214-260: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Redundant duplicate gesture handlers on stop buttons.

Both stopButton and inlineStopButton attach .onTapGesture { ... } and .highPriorityGesture(TapGesture().onEnded { ... }) invoking the identical stopActiveRecordingOrSharing() call. highPriorityGesture always wins gesture resolution, so onTapGesture here is effectively dead code. Harmless today only because stopActiveRecordingOrSharing() guards re-entrancy, but it's worth simplifying to one gesture handler per button.

♻️ Proposed simplification (apply to both buttons)
         .contentShape(Circle())
-        .onTapGesture {
-            recordingManager.stopActiveRecordingOrSharing()
-        }
-        .highPriorityGesture(
-            TapGesture().onEnded {
-                recordingManager.stopActiveRecordingOrSharing()
-            }
-        )
+        .highPriorityGesture(
+            TapGesture().onEnded {
+                recordingManager.stopActiveRecordingOrSharing()
+            }
+        )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/components/Recording/RecordingLiveActivity.swift` around lines
214 - 260, Both stop button views, stopButton and inlineStopButton, attach two
tap handlers that both call stopActiveRecordingOrSharing(), which is redundant
because the highPriorityGesture already handles the tap. Simplify each view to a
single gesture handler by removing the duplicate onTapGesture or the
highPriorityGesture, keeping the one intended to win gesture resolution and
still invoking recordingManager.stopActiveRecordingOrSharing().
DynamicIsland/managers/ScreenRecordingManager.swift (1)

147-329: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Gate debug print() statements behind #if DEBUG or use a logger.

Numerous new print() calls were added across the stop workflow (e.g. lines 153, 209, 211, 217, 235, 256, 310, 326) that will also run and spam Console.app in Release builds. Consider gating these behind #if DEBUG or switching to os.Logger, consistent with the concern already raised in review notes about debug artifacts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/managers/ScreenRecordingManager.swift` around lines 147 - 329,
The stop-flow in ScreenRecordingManager is adding debug-only console noise, so
gate the new print() calls in stopActiveRecordingOrSharing(),
sendStopRecordingShortcutViaSystemEvents(), sendStopRecordingShortcut(),
stopSystemScreenCaptureProcesses(), checkRecordingStatus(),
refreshStopAvailability(), and isProcessRunning(named:) behind `#if` DEBUG or
replace them with a Logger-based approach. Keep the existing behavior intact,
but ensure release builds no longer emit these diagnostics or spam Console.app.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@DynamicIsland.xcodeproj/project.pbxproj`:
- Around line 459-464: The shared project settings for the macOS target are
carrying environment-specific signing values that should not be committed here.
Remove the macOS-specific CODE_SIGN_IDENTITY override and the hard-coded
DEVELOPMENT_TEAM from the project.pbxproj entry for the affected
target/configuration, and move those signing settings into local or CI-specific
configuration instead. Keep the project file limited to general build settings
so Sparkle and release signing do not inherit an ad hoc identity from this
shared diff.

In `@DynamicIsland/ContentView.swift`:
- Around line 2324-2331: The scroll-open guard in ContentView’s gesture handling
is too broad because recordingOpenGestureLocked blocks the gesture even when the
recording HUD is not actually visible. Update the guard logic around the
gestureProgress reset path and the matching code at the other scroll-open check
so it only locks scroll-open when the recording HUD is currently shown, and make
sure it does not interfere with music pairing or the indicator setting.
- Around line 465-470: The recording HUD logic is ignoring the “Show Recording
Indicator” setting in multiple paths, so the indicator and related closed-notch
guards can still activate when it should be off. Update the visibility/guard
checks in recordingLiveActivityVisibleOnClosedNotch and the other recording HUD
paths referenced in the diff to include the Show Recording Indicator preference
alongside detection and recording state, so all recording UI paths consistently
honor that setting.

In `@DynamicIsland/DynamicIslandApp.swift`:
- Around line 405-427: The recording-HUD sizing branch in DynamicIslandApp’s
closed-notch layout currently expands the window for any active recording, even
when ContentView would not render the HUD. Update this condition to match the
actual visibility rules used by ContentView, including Show Recording Indicator
and the same music-pairing suppression, so the panel only grows when the
recording HUD can truly appear. Prefer extracting or reusing a shared visibility
helper instead of duplicating the predicate around vm.notchState,
ScreenRecordingManager.shared.isRecording, and Defaults checks.

In `@DynamicIsland/managers/ScreenRecordingManager.swift`:
- Around line 300-329: The synchronous process check in ScreenRecordingManager’s
isProcessRunning(named:) blocks the main thread because it calls Process.run()
followed by waitUntilExit() inside a `@MainActor` type. Move the pgrep/killall
work off the main actor using a background Task or DispatchQueue, then hop back
to `@MainActor` only to update canStopFromHUD and isRecording in
refreshStopAvailability(recording:) and the related status paths used by
updateDuration() and checkRecordingStatus().
- Around line 238-259: The fallback in stopSystemScreenCaptureProcesses is too
broad because it includes ScreenCaptureKitAgent, which can impact unrelated
apps’ screen-sharing sessions. Update the attempts list in
ScreenRecordingManager.stopSystemScreenCaptureProcesses to remove
ScreenCaptureKitAgent, or guard that killall path behind an explicit
confirmation/extra check so it only targets the native macOS recorder flow
already identified by isNativeMacOSScreenRecordingProcessActive.
- Around line 200-236: The stop-recording flow in ScreenRecordingManager
currently only prints errors from sendStopRecordingShortcutViaSystemEvents and
sendStopRecordingShortcut, then clears state even if stopping still failed.
Update the stop-request path to surface a visible error/alert when both shortcut
attempts fail and isRecording remains true, using the existing
ScreenRecordingManager stop helpers and the isSendingStopRequest/isRecording
state to keep the HUD from silently implying success.

---

Outside diff comments:
In `@DynamicIsland/ContentView.swift`:
- Around line 2133-2146: The hover-open flow in ContentView’s hoverTask should
re-check the recording HUD lock after the sleep, not only before it. Update the
delayed Task that follows the initial guard so it verifies the recording/locked
state again inside the MainActor.run block before opening the notch, alongside
the existing vm.notchState, isHovering, isSneakPeekVisibleOnCurrentScreen, and
coordinator.isHoverOpenSuppressed checks.

---

Nitpick comments:
In `@DynamicIsland/components/Recording/RecordingLiveActivity.swift`:
- Around line 214-260: Both stop button views, stopButton and inlineStopButton,
attach two tap handlers that both call stopActiveRecordingOrSharing(), which is
redundant because the highPriorityGesture already handles the tap. Simplify each
view to a single gesture handler by removing the duplicate onTapGesture or the
highPriorityGesture, keeping the one intended to win gesture resolution and
still invoking recordingManager.stopActiveRecordingOrSharing().

In `@DynamicIsland/Localizable.xcstrings`:
- Around line 20248-20251: The two new localization entries in
DynamicIsland/Localizable.xcstrings are missing translator metadata, unlike
nearby keys that include context comments. Update the entries for the recording
HUD description and the “Recording hover style” key to include appropriate
comment text and set isCommentAutoGenerated consistently with the surrounding
catalog, using the same structure as other localization items in this file.

In `@DynamicIsland/managers/ScreenRecordingManager.swift`:
- Around line 147-329: The stop-flow in ScreenRecordingManager is adding
debug-only console noise, so gate the new print() calls in
stopActiveRecordingOrSharing(), sendStopRecordingShortcutViaSystemEvents(),
sendStopRecordingShortcut(), stopSystemScreenCaptureProcesses(),
checkRecordingStatus(), refreshStopAvailability(), and isProcessRunning(named:)
behind `#if` DEBUG or replace them with a Logger-based approach. Keep the existing
behavior intact, but ensure release builds no longer emit these diagnostics or
spam Console.app.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c3da2ad-5594-47f5-8a78-0d16bd3f8b9c

📥 Commits

Reviewing files that changed from the base of the PR and between 39ee9b7 and 3608a75.

📒 Files selected for processing (8)
  • DynamicIsland.xcodeproj/project.pbxproj
  • DynamicIsland/ContentView.swift
  • DynamicIsland/DynamicIslandApp.swift
  • DynamicIsland/Localizable.xcstrings
  • DynamicIsland/components/Recording/RecordingLiveActivity.swift
  • DynamicIsland/components/Settings/SettingsView.swift
  • DynamicIsland/managers/ScreenRecordingManager.swift
  • DynamicIsland/models/Constants.swift

Comment thread DynamicIsland.xcodeproj/project.pbxproj Outdated
Comment on lines +459 to +464
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 12;
DEVELOPMENT_ASSET_PATHS = "\"DynamicIsland/Preview Content\"";
DEVELOPMENT_TEAM = 9Y64TRM77N;
DEVELOPMENT_TEAM = RPC964BP8A;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect the effective signing settings without building.
xcodebuild -project DynamicIsland.xcodeproj \
  -target DynamicIsland \
  -configuration Release \
  -showBuildSettings 2>/dev/null |
  awk '/CODE_SIGN_IDENTITY|EXPANDED_CODE_SIGN_IDENTITY|DEVELOPMENT_TEAM|CODE_SIGN_STYLE/'

Repository: Ebullioscopic/Atoll

Length of output: 157


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant pbxproj sections and any signing-related settings.
FILE="DynamicIsland.xcodeproj/project.pbxproj"

echo "== Relevant line numbers =="
rg -n 'CODE_SIGN_IDENTITY|DEVELOPMENT_TEAM|CODE_SIGN_STYLE|EXPANDED_CODE_SIGN_IDENTITY|Sparkle|CODE_SIGN' "$FILE"

echo
echo "== Surrounding context around the reported lines =="
sed -n '440,475p' "$FILE"
echo
sed -n '520,550p' "$FILE"

echo
echo "== Project-wide signing-related search =="
rg -n 'PROVISIONING_PROFILE|CODE_SIGN_ALLOW|CODE_SIGN_IDENTITY\[sdk=macosx\*\]|DEVELOPMENT_TEAM\[sdk=macosx\*\]|CODE_SIGN_STYLE' "$FILE"

Repository: Ebullioscopic/Atoll

Length of output: 4906


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Try to inspect the effective build settings if Xcode is available.
# This is read-only and does not build the project.
xcodebuild -project DynamicIsland.xcodeproj \
  -target DynamicIsland \
  -configuration Release \
  -showBuildSettings

Repository: Ebullioscopic/Atoll

Length of output: 205


Keep the macOS signing overrides out of the shared project file. CODE_SIGN_IDENTITY[sdk=macosx*] = "-" makes the macOS Release build ad hoc-signed, and the Sparkle re-sign step uses that same identity via $EXPANDED_CODE_SIGN_IDENTITY. The hard-coded DEVELOPMENT_TEAM also bakes environment-specific signing into the feature diff. Move these settings to local/CI config unless this PR is meant to change release signing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland.xcodeproj/project.pbxproj` around lines 459 - 464, The shared
project settings for the macOS target are carrying environment-specific signing
values that should not be committed here. Remove the macOS-specific
CODE_SIGN_IDENTITY override and the hard-coded DEVELOPMENT_TEAM from the
project.pbxproj entry for the affected target/configuration, and move those
signing settings into local or CI-specific configuration instead. Keep the
project file limited to general build settings so Sparkle and release signing do
not inherit an ad hoc identity from this shared diff.

Comment thread DynamicIsland/ContentView.swift Outdated
Comment thread DynamicIsland/ContentView.swift Outdated
Comment thread DynamicIsland/DynamicIslandApp.swift Outdated
Comment thread DynamicIsland/managers/ScreenRecordingManager.swift
Comment thread DynamicIsland/managers/ScreenRecordingManager.swift Outdated
Comment thread DynamicIsland/managers/ScreenRecordingManager.swift Outdated
@Ebullioscopic

Copy link
Copy Markdown
Owner

@Ruken16 Need to perform some changes:

  1. Adding SettingsView options for screen recording, whether it is just an indicator or with the button
  2. Have option to have floating button to turn off recording, along with Multi Live Activity support, as if I needed to record Atoll inside the screen recording, I am not able to do it currently
  3. The default mode is not looking consistent with Atoll non Minimalistic mode, make sure this option is only available in minimalistic mode
  4. Address the issues that have been stated by @coderabbitai

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

The PR description image shows the "Screen Recording" settings panel: a dark-themed card with "Enable Screen Recording Detection" (toggle on), "Show Recording Indicator" (toggle on), "Recording hover style" with a segmented control ("Predefinito" / "In linea", with "In linea" selected in blue) and caption "Default uses the expanded recording HUD. Inline keeps the stop control inside the notch height.", a "Detection Status" row showing "Active - No Recording" in green, and a footer note "Uses event-driven private API for real-time screen recording detection."

@Ebullioscopic, noted — this is a solid follow-up plan for @Ruken16. For item 4, here's a quick recap of the concerns I flagged earlier so they're easy to track while implementing:

  1. stopSystemScreenCaptureProcesses() fallback — killing ScreenCaptureKitAgent/ScreenCaptureUI as a last resort can interrupt unrelated apps (Zoom, Slack, Loom, etc.) using ScreenCaptureKit. Recommend re-verifying via isNativeMacOSScreenRecordingProcessActive() right before the killall call, or dropping those two processes from the kill list entirely.
  2. Synthetic keystroke reliability — the Cmd+Control+Esc dispatch (AppleScript + CGEvent) silently fails if the shortcut is remapped or Accessibility/Automation permission isn't granted; failures are only print()-logged. Consider surfacing a failure state via isSendingStopRequest or a brief HUD message.
  3. Redundant gesture handlers in stopButton/inlineStopButton — both .onTapGesture and .highPriorityGesture(TapGesture().onEnded:) call the same action; the latter takes precedence, so removing the .onTapGesture should be safe.
  4. Debug print() calls added to ScreenRecordingManager — worth gating behind #if DEBUG or a logger before this ships.
  5. HUD visibility change from (isRecording || !isRecorderIdle) to just isRecording — functionally fine given isRecorderIdle isn't read elsewhere, just flagging in case the idle buffer was intentionally masking detection flicker.

On your points 1–3 (settings granularity, floating stop button + multi-live-activity support for recording Atoll itself, and gating the default hover style to minimalistic mode only) — those all sound like reasonable UX/product decisions for @Ruken16 to implement. Happy to do a full review pass once the changes are pushed.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
DynamicIsland/components/Notch/NotchLLMUsageView.swift (1)

27-29: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fixed card height may clip richer content states.

llmUsageProviderCardHeight (164) is applied uniformly across loading/failure/success states, including the success branch with two quota gauges plus a compact window pair (Lines 69-76). If a provider ever reports both session and week limits, the stacked quotaGauge + window views could exceed the fixed height. Worth a visual sanity check with a provider that has both limits populated.

Also applies to: 42-59

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/components/Notch/NotchLLMUsageView.swift` around lines 27 - 29,
The fixed `llmUsageProviderCardHeight` used by `NotchLLMUsageView` may be too
small for the success layout when both session and week quotas are shown. Review
the `body` success branch and the `quotaGauge`/`window` stacking to either
increase or make the card height adaptive so richer provider states are not
clipped, and verify the rendering with a provider that has both limits
populated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@DynamicIsland/components/Notch/NotchLLMUsageView.swift`:
- Around line 27-29: The fixed `llmUsageProviderCardHeight` used by
`NotchLLMUsageView` may be too small for the success layout when both session
and week quotas are shown. Review the `body` success branch and the
`quotaGauge`/`window` stacking to either increase or make the card height
adaptive so richer provider states are not clipped, and verify the rendering
with a provider that has both limits populated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd1e8c28-8c77-4d02-a506-2ec1372f139f

📥 Commits

Reviewing files that changed from the base of the PR and between c0d95b0 and 07d9d5a.

📒 Files selected for processing (10)
  • DynamicIsland/ContentView.swift
  • DynamicIsland/DynamicIslandApp.swift
  • DynamicIsland/components/Notch/NotchLLMUsageView.swift
  • DynamicIsland/components/Recording/RecordingLiveActivity.swift
  • DynamicIsland/components/Settings/SettingsView.swift
  • DynamicIsland/components/Tabs/TabSelectionView.swift
  • DynamicIsland/managers/ScreenRecordingManager.swift
  • DynamicIsland/models/Constants.swift
  • DynamicIsland/models/DynamicIslandViewModel.swift
  • DynamicIsland/sizing/matters.swift
✅ Files skipped from review due to trivial changes (1)
  • DynamicIsland/components/Tabs/TabSelectionView.swift
🚧 Files skipped from review as they are similar to previous changes (2)
  • DynamicIsland/DynamicIslandApp.swift
  • DynamicIsland/components/Recording/RecordingLiveActivity.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
DynamicIsland/DynamicIslandApp.swift (1)

532-545: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Share the music-pairing eligibility helper

closedMusicPairingEligibleForSizing() still mirrors ContentView.closedMusicPairingEligible with the same gating (closedMusicContentEnabled / shouldDelayPostUnlockMusicHUD equivalents). Extract this into a shared visibility helper so the sizing path and view logic can’t drift.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/DynamicIslandApp.swift` around lines 532 - 545, The
music-pairing eligibility logic in closedMusicPairingEligibleForSizing() is
duplicated from the ContentView closed-state visibility check and can drift over
time. Extract the shared gating into a common helper used by both
closedMusicPairingEligibleForSizing() and
ContentView.closedMusicPairingEligible, keeping the same conditions around
MusicManager, coordinator.musicLiveActivityEnabled, Defaults flags,
vm.hideOnClosed, and LockScreenManager state so both paths stay aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@DynamicIsland/DynamicIslandApp.swift`:
- Around line 532-545: The music-pairing eligibility logic in
closedMusicPairingEligibleForSizing() is duplicated from the ContentView
closed-state visibility check and can drift over time. Extract the shared gating
into a common helper used by both closedMusicPairingEligibleForSizing() and
ContentView.closedMusicPairingEligible, keeping the same conditions around
MusicManager, coordinator.musicLiveActivityEnabled, Defaults flags,
vm.hideOnClosed, and LockScreenManager state so both paths stay aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7970d544-dc2a-4eb1-9416-73f735ea6e9f

📥 Commits

Reviewing files that changed from the base of the PR and between 07d9d5a and 899c273.

📒 Files selected for processing (1)
  • DynamicIsland/DynamicIslandApp.swift

@StudioKeys StudioKeys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the effort and the implementation @Ruken16, but this needs some changes

  1. Code Complexity Explosion

Issue: The 80-line recording indicator expanded to 400+ lines with 3 nearly identical HUD variants.

Specific Problems:

a. Three HUD variants (compactRecordingHUD, inlineRecordingHUD, expandedRecordingHUD) with ~90% shared code
b. 8+ overlapping state flags instead of clean state management
c. Six different async tasks running simultaneously

  1. Architectural Anti-Patterns

Issue: Copy-paste programming and mixed responsibilities.

Specific Problems:

a. Duplicate PulsingModifier between RecordingLiveActivity and PrivacyLiveActivity
b. ScreenRecordingManager handles monitoring, stopping, AND process killing
c. Hard-to-test coupled logic

  1. Performance Risks

Issue: Animation thrash and timer overhead during recording.

Specific Problems:

a. Constant switching between three view layouts
b. Multiple timers: durationTimer, stopAvailabilityRefreshInterval, and task chains
c. Background killall and pgrep calls

  1. Backward Compatibility

Issue: Changes to notch behavior and window attributes.

Specific Problems:

a. Removed .never hide option from CGSSpace membership
b. Added .utilityWindow, .hudWindow style masks
c. Window now always joins spaces (previously conditional)

Hope these will be looked upon and addressed!
Cheers

@Ruken16
Ruken16 changed the base branch from main to dev July 20, 2026 12:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
DynamicIsland/components/Recording/RecordingLiveActivity.swift (1)

1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Recording HUD extra-size constants (132/140/176/70) are duplicated across three files. Any future tweak to one of these layout numbers is easy to miss in the other two, causing sizing drift between the actual RecordingLiveActivity view and the window/notch sizing computed independently in ContentView and DynamicIslandApp.

  • DynamicIsland/components/Recording/RecordingLiveActivity.swift#L218-237: keep RecordingHUDPresentation as the single source of truth for these values (already the most centralized definition).
  • DynamicIsland/ContentView.swift#L519-531: reuse RecordingHUDPresentation's width/height instead of re-declaring 132/140/176/70 in recordingHUDExtraWidth/recordingHUDExtraHeight.
  • DynamicIsland/DynamicIslandApp.swift#L463-483: reuse the same shared source instead of the inline closures re-encoding 132/140/176/70.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DynamicIsland/components/Recording/RecordingLiveActivity.swift` at line 1,
Centralize the recording HUD sizing constants in RecordingHUDPresentation and
remove duplicate numeric values from
ContentView.recordingHUDExtraWidth/recordingHUDExtraHeight and
DynamicIslandApp’s inline sizing closures. Reuse RecordingHUDPresentation’s
shared width and height values so the live activity view and window/notch sizing
remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@DynamicIsland/components/Recording/RecordingLiveActivity.swift`:
- Line 1: Centralize the recording HUD sizing constants in
RecordingHUDPresentation and remove duplicate numeric values from
ContentView.recordingHUDExtraWidth/recordingHUDExtraHeight and
DynamicIslandApp’s inline sizing closures. Reuse RecordingHUDPresentation’s
shared width and height values so the live activity view and window/notch sizing
remain consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cbeba5e9-d41d-431c-b01c-b627fbaca2ed

📥 Commits

Reviewing files that changed from the base of the PR and between 899c273 and 25ebb48.

📒 Files selected for processing (7)
  • DynamicIsland/ContentView.swift
  • DynamicIsland/DynamicIslandApp.swift
  • DynamicIsland/components/Live activities/PulsingModifier.swift
  • DynamicIsland/components/Notch/DynamicIslandWindow.swift
  • DynamicIsland/components/Notch/NotchLLMUsageView.swift
  • DynamicIsland/components/Recording/RecordingLiveActivity.swift
  • DynamicIsland/components/Settings/SettingsView.swift
🚧 Files skipped from review as they are similar to previous changes (2)
  • DynamicIsland/components/Notch/NotchLLMUsageView.swift
  • DynamicIsland/components/Settings/SettingsView.swift

@StudioKeys
StudioKeys dismissed their stale review July 21, 2026 04:23

Fixed in subsequent changesets

@StudioKeys StudioKeys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took the time to go through the changes which were updated and kept, have some stuff that still needs attention

  1. Add comment warning about private API usage in ScreenRecordingManager.swift just for maintainability by other contributors in future
  2. Consider extracting shared recording HUD visibility/sizing logic to avoid duplication between ContentView and AppDelegate
  3. Verify space membership behavior change is intentional (the .never hide option gating was removed)

Others than these, rest looks all good from my end :)

@StudioKeys

Copy link
Copy Markdown
Collaborator

Solid work on the Screen Recording HUD and the Space pinning fix — both are genuinely useful improvements.

That said, there are a few things that need to land before this can merge:

Must fix (blockers):

  • ScreenRecordingManager: synchronous pgrep/killall on the main actor will jank the UI — kick that to a detached task
  • Same file: if both stop shortcuts fail, the HUD silently pretends it worked — surface an error/beep and keep isRecording = true
  • Debug print() calls will spam Console.app in Release — wrap in #if DEBUG or swap for os.Logger
  • killall ScreenCaptureKitAgent is too aggressive; it nukes unrelated screen-sharing sessions — drop it or gate behind a confirmation
  • ContentView.swift:2133 hover-open race — the recording-lock check runs before the sleep, so a recording that starts during the delay still opens the notch. Re-check inside the MainActor.run block.

Should fix:

  • RecordingLiveActivity.swift:214-260 — both stop buttons have onTapGesture + highPriorityGesture calling the same action. The high-priority one always wins, so the first is dead code.
  • DynamicIslandApp.swift:532 — music-pairing eligibility is copy-pasted from ContentView. Extract to the shared isClosedMusicPairingEligible helper you already created.
  • HUD sizing constants (132/140/176/70) are duplicated in three places — RecordingHUDPresentation should be the single source of truth.

Nits:

  • New localization keys in Localizable.xcstrings are missing translator comments (other recent keys have them).
  • NotchLLMUsageView.swift hardcodes llmUsageProviderCardHeight = 164 — if a provider returns both session + week quotas, content clips. Quick visual check with a dual-quota provider would confirm.

Good stuff:

  • Space pinning via NSWorkspace.activeSpaceDidChangeNotification + pinnedCollectionBehavior is the right approach.
  • ClosedMusicPairingVisibility.swift and RecordingHUDLayout.swift as shared helpers — clean extraction.
  • New settings (showRecordingIndicator, recordingHoverStyle, recordingControlMode) with sensible defaults.
  • LLM Usage sizing constants added.

CI is green, but the branch is CONFLICTING — needs a rebase onto dev. CodeRabbit autofix can handle most of the nits if you want to apply it.

Happy to pair on the blocker fixes if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in progress This PR/issue is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants