Repository navigation
Conversation
omarchy-battery-status ran `upower -i` and then handed the same report to eight separate awk invocations, one per field, each one reading to its first match and exiting. The power panel re-runs the command every five seconds while it is open. One awk pass now reads all eight. Each field still takes the first line that matches it, which is what the separate `exit` in each pass was doing, and the two threshold fields still come back empty when the report does not carry them, so the sysfs fallback below them is unchanged. Finding the battery went from `upower -e | grep BAT | head -n 1` to one awk with an `exit`, for the same reason. On this machine, with `--shell`: quattro 22 processes 46.5 ms patched 14 processes 34.5 ms Output is byte-identical in both modes.
[Low impact] The battery parser change appears safe to merge. Summary
VykosMolt accepted the known upstream startup/removal race pending #14656 and the notification issue pending #14668. Both corrective PRs await integration. Reviews (3) · Last reviewed commit: "Merge current quattro and keep one-pass ..." · Reviewed by Greptile |
| if home_in_use(provider, home): | ||
| raise AccountError(f"A running {PROVIDERS[provider]['name']} session uses {account['label']}. Quit it first, then remove the account.") | ||
| # Only the account's own directory goes. Its links point into the primary | ||
| # home, and rmtree removes a link without following it. | ||
| if home.resolve().parent == (accounts_root() / provider).resolve(): | ||
| shutil.rmtree(home, ignore_errors=True) |
There was a problem hiding this comment.
remove() can delete an account while a new session is starting. The launcher reads the selected home without taking the registry lock. If removal checks /proc after that read but before the launcher exports CODEX_HOME or the other provider home, it finds no session and deletes the login the launcher is about to use. Coordinate startup and removal with a shared lock or a session record.
There was a problem hiding this comment.
This finding concerns the shared upstream implementation. The tested fix is in #14656. Startup and removal now coordinate with a stable per-home claim acquired before exposing the selected home. Independent source review and the final branch account, real mise dispatch, autoswitch, usage, panel, and CLI suites pass. Keeping this thread open while that corrective PR awaits integration.
| // is one toast, not a stack of identical ones. The image and click target | ||
| // count too: every screen recording toast shares its text but previews and | ||
| // opens a different file. | ||
| var DUPLICATE_ROLES = ["app", "summary", "body", "image", "execArgv"] |
There was a problem hiding this comment.
isDuplicatePopup() ignores urgency and expireTimeout. A normal notification with the same text can replace a critical alert from the same app. removeDuplicatePopups() dismisses the critical alert and deletes its saved copy, while the normal replacement expires. Compare these fields too so alerts with different lifetimes are not treated as duplicates.
| var DUPLICATE_ROLES = ["app", "summary", "body", "image", "execArgv"] | |
| var DUPLICATE_ROLES = ["app", "summary", "body", "image", "execArgv", "urgency", "expireTimeout"] |
There was a problem hiding this comment.
The shared notification fix is now in #14668. Duplicate identity includes urgency and expiration, with strict numeric roles and missing/zero distinctions. All 147 logic, 17 notification-command, and 117 CLI checks pass. The installed desktop also preserves the original critical notification after an identical normal alert expires; identical normal alerts with different requested lifetimes expire independently. Actual screenshots and IDs were inspected. Keeping this thread open while the corrective PR awaits integration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The battery status command now reads the selected UPower report in one pass instead of running a separate awk process for each field. Each field keeps its first match, including explicit zero thresholds and missing values that need the existing sysfs fallback.
The merge with current quattro preserves machine-battery discovery, Apple Silicon native paths, signed live power readings, time estimates derived from live energy and power, battery-specific charge limits, and translated output. The parser supplies the new energy fields to those calculations.
Validation: all 11 focused battery checks pass, including Apple Silicon discovery, live-power duration, charge limits, fallback estimates, Danish output and threshold ordering. The process-count regression fails on current upstream, where awk runs 14 times; the candidate stays within six. Independent comparisons against current upstream also preserve output for ordinary, missing-field, zero-first duplicate and empty reports. Diff checks against the current base pass. The earlier timing measurements describe the previous source version; no new timing or physical-hardware result is claimed.
AI-assisted implementation and automated verification.