Fix Settings window opening - #3029
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 18, 2026, 12:03 AM ET / 04:03 UTC. ClawSweeper reviewWhat this changesThe PR adds a retained AppKit Settings window and menu/Dock coordination, but also removes the Overview spend summary, its tests, proof artifact, and unreleased changelog entry. Merge readiness⛔ Blocked until real behavior proof is added - 6 items remain The Settings repair is blocked by an unrelated removal of the existing Overview spend feature and its release entry; the patch needs narrowing before it can merge. Priority: P2 Review scores
Verification
How this fits togetherCodexBar menu actions open Settings through a shared native-window path that coordinates app activation and Dock policy. Independently, the Overview menu renders usage and spend summaries from provider data. flowchart LR
A[Status and app menus] --> B[Settings controller]
B --> C[Create or reuse Settings window]
C --> D[Dock activation policy]
D --> E[Visible Settings UI]
F[Provider usage data] --> G[Overview spend summary]
G --> H[Status menu]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Restore every unrelated Overview spend, screenshot, test, and release-note deletion, then validate the retained Settings flow in a freshly packaged app. Do we have a high-confidence way to reproduce the issue? Source-reproducible: comparison with current main proves this patch removes the Overview spend summary; the original Settings-opening failure still lacks a live current-head trace. Is this the best way to solve the issue? No: a Settings fix should not remove the unrelated Overview spend surface; restore that feature and retain a focused native-window repair. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8c113bb03221. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Summary
Problem
After the Settings path introduced around #3003, opening Settings could fail silently or create the window behind the previously active application. The responder-chain dispatch did not prove that a Settings window was actually created or retained, and promoting the accessory app before the status menu finished tracking allowed AppKit to restore the prior foreground application after presentation.
Language changes could also temporarily leave a stale or duplicate Settings command while SwiftUI rebuilt the application menu.
Root cause
The old path treated selector dispatch as success even though window creation, ownership, activation, and menu-tracking completion are separate AppKit events. Settings and Sparkle presentation also shared an unbounded Dock-promotion path without an explicit completion signal.
Implementation
Verification
swift test --filter 'StatusItemControllerShutdownTests|SettingsApplicationMenuTests|DockIconPolicyDecisionTests|SettingsWindowControllerTests|AppDelegateTests'— 29 tests passedmake check— formatting, repository checks, and strict SwiftLint passed with zero violationsgit diff --check upstream/main...HEAD