Repository navigation
Bar panel: audio/OSD/battery/weather/night light, cloned-bar Loader props - #12115
chessing234 wants to merge 30 commits into
Conversation
Headphones returned early, so a muted headset never showed as muted. An unbound sink (.audio null) reused the muted speaker glyph, so a Bluetooth output connected after shell start looked silenced.
PwObjectTracker only saw candidateSinks from nodes.values. Keep the current default sink/source in the set so .audio populates without a shell restart.
Launch feedback uses duration 0 and relies on an explicit close. If that close IPC is dropped or loses a race to show, the card stayed forever.
Guarding close on launchOsdOpen meant a close that arrived before show never cleared the later sticky OSD, and the flag then blocked retries.
Critical notifications ignore the send timeout, so "Time to recharge!" stayed up after UPower moved to AC. Dismiss it when we leave the low-discharging state.
Timezone / reported-country changes can flip °C↔°F with no escape hatch even though shell.json already accepts a unit override.
Persists through the same updateEntryInline path the clock panel uses for week-start, so the preference survives restarts.
Multi-frame wallpapers (GIF/video) made ImageMagick decode every frame before the crop and could exhaust system memory.
Frame 0 was dark-topped, so the correct answer was #ffffff — the same value fallback() prints when sampling fails. Without the [0] selector the pipeline emits one triple per frame, "32,32,320,255,00,0,255", which the regex guard rejects, so the script fell back to #ffffff and the assertion passed on unfixed code. Removing [0] and rerunning the suite confirmed it: 4 passed. Light-topping frame 0 makes the expected result #101010, which fallback() cannot produce. The same mutation now fails with "expected #101010, got #ffffff". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
bar-test accepts plain properties again, and video-background-test matches the braced magick frame syntax. |
Automated AI review
Follow-up to the earlier review and the author's reply, checked at head Verified: the two failing shell tests are resolved. The two new commits change only those two test files. The product code is unchanged, so the other findings from the earlier review still apply, and each is confirmed again on this head (by probe or mutation, and by unchanged source for the bar initial-properties note). The PR now also conflicts with current
Verified, shell suite: in this review's sandbox, The charge-limit band can come from UPower's preset, not the configured limit
This PR now uses that band to decide hold versus stall (
Impact: on hardware where UPower exposes its preset, a pack that reports Suggested change: read the band from the same pack's sysfs Merge conflict with current Related open PR: #8278 (Celsius/Fahrenheit toggle) also edits Review informationTest scope: Source review of head AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
@chessing234 I opened chessing234#3 targeting your Changes & Enhancements Folded from #9763
Verification
If preferred over the GitHub UI PR, the commit can be pulled directly: git pull https://github.com/edgseu/omarchy.git fold/bar-panel-audio-osd-battery-weather |
[Medium impact] The PR changes several parts of the desktop shell, while its effects stay within shell workflows. Fix clone loading and the repeated dismissal commands before merging; the latter must also satisfy the repository’s background-work rule. Findings
SummaryThis PR updates audio icons, battery states and warning dismissal, weather unit controls, app-launch feedback, and bar loading.
Reviews (5) · Last reviewed commit: "Reuse the CLI translation when dismissin..." · Reviewed by Greptile |
| } | ||
| // Clones of the built-in bar know these properties. Independently | ||
| // authored bars may have a different property contract. | ||
| var metadata = manifest && manifest.metadata |
There was a problem hiding this comment.
Bar clones miss initial properties
loadBar reads manifest.metadata.clonedFrom, but omarchy-plugin-clone writes manifest.omarchy.clonedFrom. Real bar clones therefore skip barInitialProperties and receive no properties at construction. A clone that requires those properties still fails to load and falls back to the built-in bar—the case this helper is meant to fix. Read the clone marker from manifest.omarchy.
| var metadata = manifest && manifest.metadata | |
| var metadata = manifest && manifest.omarchy |
| toggle_from() { | ||
| printf '%s\n' "$1" >"$STATE" | ||
| nightlight_cli >/dev/null | ||
| cat "$STATE" | ||
| } |
There was a problem hiding this comment.
Nightlight checks run inside stub
The new temperature checks are inside the heredoc that writes the fake sleep command, not in the test itself. When that command runs, it lacks the test’s functions and variables, so these checks cannot enforce their assertions. The test can pass without checking the added temperature cases. Move the block below the closing SH delimiter.
| # Pure bash cycle checks mirroring Model.nextTempUnitOverride | ||
| next_for() { | ||
| case "$1" in | ||
| metric) echo imperial ;; | ||
| imperial) echo "" ;; | ||
| *) echo metric ;; | ||
| esac | ||
| } | ||
| [[ $(next_for "") == "metric" ]] || fail "auto cycles to metric" | ||
| [[ $(next_for metric) == "imperial" ]] || fail "metric cycles to imperial" | ||
| [[ $(next_for imperial) == "" ]] || fail "imperial cycles back to auto" |
There was a problem hiding this comment.
These checks test a Bash copy of the temperature cycle rather than Model.nextTempUnitOverride, so breaking the real helper leaves them green. This violates AGENTS.md: “Don't restate the implementation” and “Don't test your own stub.” The source-string checks here, in audio-test.sh, and in plugin-clone-test.sh follow the same pattern elsewhere.
Call the real helper from the existing weather suite and test behavior instead. This repository requirement must be satisfied before merging.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| run_node_test <<'JS' | ||
| const fs = require('fs') | ||
| const vm = require('vm') | ||
| const qml = fs.readFileSync(path.join(root, 'shell/plugins/services/battery/Service.qml'), 'utf8') |
There was a problem hiding this comment.
Battery checks split across files.
battery-clear-on-ac-test.sh adds a separate suite even though battery-test.sh already tests low-battery warnings and recovery. AGENTS.md requires: “Extend the area's existing test file … rather than adding a new *-test.sh.” Move these cases into the existing battery suite to keep related checks together.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| // Dismissal can precede notification insertion or time out silently. Keep | ||
| // retrying on the existing poll until a new low-battery episode starts. | ||
| if (root.lowBatteryClearPending) clearLowBatteryWarning() |
There was a problem hiding this comment.
Battery dismissal never stops. After a low-battery warning is cleared on AC,
lowBatteryClearPending stays true until another low-battery episode. Every 30-second poll therefore starts another dismissal command, even after the warning has expired or been dismissed successfully.
AGENTS.md requires long-running code to react to events rather than poll when possible. Clear the pending flag after success, and bound retries for a delayed notification instead of retrying throughout the charging session.
File Used: AGENTS.md (source)
Summary
Test plan