Skip to content

fix: keep lifecycle window out of Mission Control - #2997

Merged
steipete merged 2 commits into
mainfrom
fix/2955-keepalive-mission-control
Aug 17, 2026
Merged

fix: keep lifecycle window out of Mission Control#2997
steipete merged 2 commits into
mainfrom
fix/2955-keepalive-mission-control

Conversation

@steipete

@steipete steipete commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep the SwiftUI lifecycle window alive so the native Settings scene and toolbar tabs continue working
  • stop that invisible window from being a floating, all-Spaces WindowServer participant
  • lock the inert window properties down with focused regression assertions

Why

Reporter diagnostics ruled out activation-policy transitions and the recurring OpenAI web-extras window. The remaining behavior matches CodexBar's alpha-zero, 1×1 lifecycle window being ordered as a floating window across every Space. That WindowServer footprint appears to trigger a macOS 27 Mission Control regression.

The lifecycle scene itself is still required: it keeps SwiftUI's Settings scene alive after the menu UI moved to AppKit. This change therefore leaves the scene ordered, offscreen, transparent, transient, cycle-ignored, and mouse-ignored, while returning it to normal window level and removing all-Spaces membership.

Verification

  • swift test --filter SettingsWindowOpeningTests
  • make check
  • structured autoreview: clean

The full suite was also attempted with CODEXBAR_TEST_GROUP_SIZE=6 make test. It advanced through 52 groups before unrelated CodexUsageFetcherFallbackTests RPC timing assertions failed on the shared, CPU-constrained host; issue-specific tests remained green.

Mission Control on macOS 27 is not reproducible on the available macOS 26.6.1 host. This removes the WindowServer traits that match the reporter's diagnostics, but the result still needs reporter verification on the next macOS 27 build.

Fixes #2955

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 10:34 PM ET / August 17, 2026, 02:34 UTC.

ClawSweeper review

What this changes

The PR changes CodexBar’s hidden SwiftUI lifecycle window from floating across all Spaces to normal-level and Space-local, with focused assertions for its inert properties.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This owner-authored PR is a focused, source-consistent fix for the linked Mission Control failure. The remaining uncertainty is affected-OS validation on macOS 27, not a discrete patch defect.

Priority: P2
Reviewed head: 804af93423ba976bd4c687125706d31e646b64da
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is narrow and well-covered, with the remaining confidence gap limited to unavailable macOS 27 runtime validation.
Proof confidence 🌊 off-meta tidepool Not applicable: This owner-authored PR is not subject to the external-contributor proof gate; macOS 27 runtime confirmation remains a merge-confidence risk.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This owner-authored PR is not subject to the external-contributor proof gate; macOS 27 runtime confirmation remains a merge-confidence risk.
Evidence reviewed 6 items Repository policy: Repository guidance calls for focused coverage and uses bundle-level validation when runtime UI behavior needs verification; that supports the added focused assertions while leaving affected-OS validation as a separate concern.
Current-main behavior: Current main configures the lifecycle window as borderless, transparent, offscreen, floating, and able to join all Spaces; the PR targets only the two traits implicated by the report.
Proposed implementation: The supplied PR diff removes all-Spaces membership and changes the hidden window to normal level while retaining its transient, noninteractive lifecycle characteristics.
Findings None None.
Security None None.

How this fits together

CodexBar keeps a tiny hidden SwiftUI window alive so native Settings and toolbar scenes remain available after the menu UI moved to AppKit. AppKit configures that window’s WindowServer traits, which affect Spaces and Mission Control.

flowchart LR
  A[Menu bar app starts] --> B[SwiftUI lifecycle scene]
  B --> C[Hidden keepalive window]
  C --> D[AppKit window configuration]
  D --> E[WindowServer Spaces behavior]
  E --> F[Mission Control]
  C --> G[Settings and toolbar scenes]
Loading

Decision needed

Question Recommendation
Should this macOS 27-specific WindowServer change merge on focused source and test evidence, or wait for affected-OS runtime confirmation? Obtain macOS 27 confirmation: Validate Mission Control plus native Settings and toolbar behavior with the freshly built bundle on macOS 27 before merging.

Why: Only an affected macOS 27 environment can directly confirm both recovery from Mission Control dismissal and preservation of the required lifecycle scene behavior.

Before merge

  • Resolve merge risk (P1) - The exact Mission Control failure is macOS 27-specific and was not runnable on the available macOS 26 host; merging without affected-OS confirmation accepts that residual compatibility uncertainty.
  • Complete next step (P2) - The remaining action is an affected-OS merge judgment, not a mechanical repair; the PR author is also the repository owner.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch surface 3 files affected; production 3 added, 3 removed; tests 14 added, 1 removed The functional change is restricted to two window traits and is paired with focused invariant coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #2955
Summary: This PR is the focused candidate fix for the linked macOS 27 Mission Control report.

Members:

  • canonical: Mission Control Issue #2955 - The PR explicitly targets the report’s Mission Control dismissal and changes the diagnosed hidden-window traits.

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Verify on macOS 27 before merge (recommended)
    Confirm the freshly built app leaves Mission Control open and still opens native Settings and toolbar tabs on the affected OS.
  2. Accept targeted platform risk
    Merge based on the narrow source change and focused assertions despite unavailable affected-OS proof.

Technical review

Best possible solution:

Validate the freshly built bundle on macOS 27, confirming that Mission Control remains open and native Settings and toolbar scenes still work, then merge the narrow fix.

Do we have a high-confidence way to reproduce the issue?

No for the exact runtime symptom in this review environment: the linked report gives clear macOS 27 steps and current source exposes the matching traits, but the available host is macOS 26.

Is this the best way to solve the issue?

Yes, conditionally: removing only floating and all-Spaces traits is the narrowest source-consistent response while preserving the lifecycle window’s inert properties; macOS 27 confirmation remains the best final check.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against dbd54a8bcc8e.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Changing the lifecycle window’s level and Spaces membership could affect existing Settings and toolbar scene behavior.

Label justifications:

  • P2: The PR addresses a reproducible, macOS 27-specific user-facing Mission Control failure with limited blast radius.
  • merge-risk: 🚨 compatibility: Changing the lifecycle window’s level and Spaces membership could affect existing Settings and toolbar scene behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This owner-authored PR is not subject to the external-contributor proof gate; macOS 27 runtime confirmation remains a merge-confidence risk.

Evidence

What I checked:

  • Repository policy: Repository guidance calls for focused coverage and uses bundle-level validation when runtime UI behavior needs verification; that supports the added focused assertions while leaving affected-OS validation as a separate concern. (AGENTS.md:1, dbd54a8bcc8e)
  • Current-main behavior: Current main configures the lifecycle window as borderless, transparent, offscreen, floating, and able to join all Spaces; the PR targets only the two traits implicated by the report. (Sources/CodexBar/HiddenWindowView.swift:107, dbd54a8bcc8e)
  • Proposed implementation: The supplied PR diff removes all-Spaces membership and changes the hidden window to normal level while retaining its transient, noninteractive lifecycle characteristics. (Sources/CodexBar/HiddenWindowView.swift:110, 804af93423ba)
  • Focused regression coverage: The supplied PR test separately asserts normal level, no all-Spaces membership, and the remaining inert window properties while retaining the settings-fallback coverage. (Tests/CodexBarTests/SettingsWindowOpeningTests.swift:8, 804af93423ba)
  • Reporter evidence: The linked report provides concrete macOS 27 steps: Mission Control immediately dismisses while CodexBar runs and recovers after quitting it.
  • History limitation: Current-main source and blame were inspected, but this partial checkout could not materialize the PR commit through its promisor remote because GitHub DNS was unavailable; exact PR diff evidence therefore comes from the provided review context. (Sources/CodexBar/HiddenWindowView.swift:107, 208ae357982a)

Likely related people:

  • steipete: Repository-owner metadata identifies the author of the targeted change, and current-main blame attributes the existing lifecycle-window configuration to Peter Steinberger. (role: recent area contributor; confidence: high; commits: 208ae357982a, 26c612e935ba; files: Sources/CodexBar/HiddenWindowView.swift, Tests/CodexBarTests/SettingsWindowOpeningTests.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture a redacted macOS 27 validation showing Mission Control remains open with the freshly built app and Settings still works.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-17T02:27:49.480Z sha 26c612e :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. label Aug 17, 2026
@steipete
steipete merged commit 9548a00 into main Aug 17, 2026
9 checks passed
@steipete steipete mentioned this pull request Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mission Control Issue

1 participant