Repository navigation
feat(macos): add a --no-activate launch flag for background automation - #163758
Conversation
Keep automation windows behind the active app through one focus owner. Defer interactive system dialogs and external navigation with recoverable existing errors and logs. Preserve normal launch behavior and document background Accessibility and window-ID capture.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 4:25 PM ET / 20:25 UTC (Revision 2). ClawSweeper reviewWhat this changesAdds a macOS --no-activate launch flag that keeps automation windows behind other apps and defers interactive dialogs and external navigation. Merge readiness✅ Ready for maintainer review The PR remains useful and has no identified blocking correctness defect. The documented maintainer waiver resolves the previous native runtime proof request; desktop focus behavior remains explicitly unverified. Priority: P2 Review scores
Verification
How this fits togetherThe macOS app translates launch arguments and navigation requests into native windows, permission prompts, and external application launches. The new activation owner applies the selected focus policy throughout the process. flowchart TD
A[Launch arguments] --> B[Launch policy]
C[Chat and dashboard requests] --> D[Activation owner]
B --> D
D --> E[Normal foreground presentation]
D --> F[Background window ordering]
B --> G[Defer interactive system dialogs]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs +26, Other +492. Total +518 across 73 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep background automation as an explicit process-level opt-in, with one activation owner and documented recovery for deferred interactions. Do we have a high-confidence way to reproduce the issue? Not applicable as a new launch mode; source shows the existing foreground presentation paths, but desktop focus behavior was not exercised in this read-only review. Is this the best way to solve the issue? Yes. A shared activation owner addresses later window presentations that --background-only and launcher flags alone do not cover, while preserving the normal launch default. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e3df0defba44. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash auto-merge.
|
* commit '79be075e5aa46be9e42dbd53ed6e30e81469210a': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (#163780) fix(ui): gate system information at the shared reader (#160982) chore(db): reclassify worker inventory sites with caller evidence (#163754) refactor(channels): deslop Slack and Matrix (#163740) fix(agents): reject empty sessions_search queries in the tool schema (#129120) perf(nodes): load only what a worker turn needs (#160442) test(cli): assert concise Gateway failure copy in CLI process tests (#163649) refactor(discord): deslop discord (#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (#163761) test(gateway): add sustained heap retention diagnostics (#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (#163718) feat(macos): add a --no-activate launch flag for background automation (#163758) fix(agents): preserve host authority across module reloads (#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (#163690) fix: keep video widgets scrollable and preload initial frames (#163762) feat(memory): add a provider-neutral memory provider runtime (#162175) ...
openclaw#163758) Keep automation windows behind the active app through one focus owner. Defer interactive system dialogs and external navigation with recoverable existing errors and logs. Preserve normal launch behavior and document background Accessibility and window-ID capture.
* commit '1fda703fb4d3630e4633461967b2a2186e8f15fd': (33 commits) fix(ui): keep selected-text comment input readable while scrolling (openclaw#163772) test(memory): open corpus database explicitly fix: bound Doctor migration capture to plugin data (openclaw#163780) fix(ui): gate system information at the shared reader (openclaw#160982) chore(db): reclassify worker inventory sites with caller evidence (openclaw#163754) refactor(channels): deslop Slack and Matrix (openclaw#163740) fix(agents): reject empty sessions_search queries in the tool schema (openclaw#129120) perf(nodes): load only what a worker turn needs (openclaw#160442) test(cli): assert concise Gateway failure copy in CLI process tests (openclaw#163649) refactor(discord): deslop discord (openclaw#163728) fix(workboard): make Sessions boards work on multi-agent Gateways (openclaw#163761) test(gateway): add sustained heap retention diagnostics (openclaw#163764) test(ui): disambiguate session filter controls refactor(plugins): deslop imessage, mattermost, and voice-call (openclaw#163767) fix(qa): run Telegram plugin source in --source-gateway userbot runs (openclaw#163718) feat(macos): add a --no-activate launch flag for background automation (openclaw#163758) fix(agents): preserve host authority across module reloads (openclaw#163725) perf(gateway): serve the listener before multi-gigabyte store validation and honor clean-close receipts at startup (openclaw#163690) fix: keep video widgets scrollable and preload initial frames (openclaw#163762) feat(memory): add a provider-neutral memory provider runtime (openclaw#162175) ...
What Problem This Solves
Automation launches of the macOS app steal focus while opening chat, dashboards, approvals, and overlays.
Solution
Parse
--no-activateonce in the launch plan and route app activation/window ordering throughAppActivation. Automation windows use normal-level back ordering; existing attached sheets may become key inside the inactive app. Standalone confirmations use the existing alert presenter, preserving their response actions and accessory controls.Defer interaction-requiring Keychain access, file dialogs, permission requests, WebKit media consent, update UI, and external navigation through existing recoverable errors/logs. Sparkle uses the existing disabled-updater implementation during automation. Legacy Keychain queries require process-wide interaction suppression before app initialization: query-only suppression does not protect legacy items. Preserve the flag on app-initiated relaunches.
SwiftLint supports scoped custom rules, so the activation-owner rule rejects direct activation/front-order calls outside the owner without adding a source-scanning test.
Impact
--no-activate --chatand--no-activate --dashboardsupport background Accessibility and window-ID capture. Normal launches keep their existing focus behavior. Operations needing deferred dialogs require relaunching without the flag, granting access, and retrying.This is a behavior-only automation change, with no normal UI visual change; no screenshots are needed. The operator explicitly prohibited app/GUI/browser launches, so validation uses builds, source/API contract inspection, and pure tests instead of live desktop proof.
Evidence
OpenClawbuilds; native test compilation.git diff --check.Files with migrated focus calls
All paths below are in
apps/macos/Sources/OpenClaw/:AppNavigationActions.swift,ApplicationRelocator.swift,CanvasWindowController+Window.swift,ControlChannel.swift,DashboardAlertPresenter.swift,DashboardManager+Routes.swift,DashboardManager.swift,DashboardWindowController.swift,DebugActions.swift,DeviceSettingsPanels.swift,ExecApprovalsPromptPresenter.swift,GatewayBrowserOnboardingController.swift,NativeConversationView.swift,NotifyOverlay.swift,Onboarding.swift,OverlayPanelFactory.swift,PairingApprovalCenter.swift,PostUpdate.swift,QuickChatController.swift,QuickChatWindowPicker.swift,TalkOverlay.swift,VoiceWakeOverlayController+Window.swift, andWebChatSwiftUI.swift.Additional external-navigation call sites:
CanvasWindowController+Navigation.swift,ControlUIDocumentHost+NavigationPolicy.swift,DebugSettings.swift,GatewayBrowserSignInProgress.swift,NativeConversationBridge.swift,OnboardingAISetupSheet.swift,OnboardingAISetupView.swift,SessionActions.swift,SystemSettingsURLSupport.swift, andTailscaleService.swift. SwiftUI links in About, onboarding, and Tailscale views also use the policy.