Defer status-menu quit during shutdown - #1354
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 5:57 PM ET / 21:57 UTC. Summary Reproducibility: yes. for the reporter's affected setup: the linked issue describes the current status-menu Quit wedge, and the PR comment provides installed-build terminal proof that the branch avoids it. I did not run live macOS validation in this read-only review. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow deferred status-menu Quit path with the regression test and keep the linked issue open until the PR is merged or rejected. Do we have a high-confidence way to reproduce the issue? Yes for the reporter's affected setup: the linked issue describes the current status-menu Quit wedge, and the PR comment provides installed-build terminal proof that the branch avoids it. I did not run live macOS validation in this read-only review. Is this the best way to solve the issue? Yes. The PR is a narrow fix that preserves the existing shutdown cleanup and adds only the missing status-menu/AppKit deferral, with a state-seam regression test aligned with repository guidance. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against db184430bc4b. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Installed-build validation from the affected machine:
This is the affected-machine manual check that the cleanup-only path was missing. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d1cde897b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let total = models.values.reduce(0) { partial, packed in | ||
| partial + (packed[safe: 0] ?? 0) + (packed[safe: 2] ?? 0) | ||
| } | ||
| return total > Self.codexMaxTokensPerFileDay ? day : nil |
There was a problem hiding this comment.
Avoid dropping high-volume valid Codex days
This cap is applied unconditionally in both full and incremental Codex scans, so any real session file whose input+output exceeds 50M tokens in a local day (including non-forked sessions or forks with a resolved parent) is removed from days and all matching rows; the usage report then silently shows no tokens/cost for that valid work. The anomalous replay case should be gated on the unresolved-fork/replay context or another targeted signal rather than a blanket per-file token ceiling.
Useful? React with 👍 / 👎.
8d1cde8 to
7f4bac6
Compare
|
Affected-machine proof for the Dock/status-menu Quit fix only, from the installed PR build at This verifies the installed app binary matches the repo-packaged build, the status-menu Quit item exits CodexBar, and Dock autohide remains active without a Dock restart. The Dock accessibility position changes after moving to the Dock edge, while the Dock PID remains unchanged. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Fixes #1353. Follow-up to #1174.
Verification
swift test --filter 'AppDelegateTests|StatusItemControllerShutdownTests'git diff --checkAffected-machine Proof
7f4bac64over/Applications/CodexBar.app.6a9999f82f284b3b4d69fd644a6c9e141edf63b3792b12fda7c037593bb6c30b.Quititem on the affected Mac.Notes/Risks
prepareForAppShutdown()cleanup from589b77ca; it only adds the status-menu/AppKit ordering piece that was missing from the Quit action.swift test --filter StatusMenuTests; currentmainin this checkout has an unrelated failure inStatusMenuClosedPreparationTests.swift:48(controller.menuVersions[key]is2instead ofnil). The targeted shutdown tests for this patch pass.