Repository navigation
Fix inverted on/off semantics in omarchy-toggle-bar - #7023
Amvurguezo wants to merge 4 commits into
Conversation
omarchy-toggle-bar forwarded the on/off argument straight through to the underlying bar-off flag, so `omarchy toggle bar on` hid the bar and `omarchy toggle bar off` showed it, the opposite of the command's own documented examples. Invert the mapping (leave toggle as-is) and update the shell and acceptance tests that had encoded the inverted behavior as expected. Fixes omacom#7022
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR flips the omarchy-toggle-bar CLI semantics so that on/off match “bar visible” expectations while still using the underlying bar-off toggle internally.
Changes:
- Invert
on/offbehavior inbin/omarchy-toggle-barto map tobar-offappropriately. - Update shell and acceptance tests to reflect the new visibility semantics for
omarchy-toggle-bar.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/shell.d/toggle-test.sh | Updates toggle/idempotency expectations to match inverted on/off semantics. |
| test/acceptance.d/session-test.sh | Swaps hide/reveal calls and exit trap restore behavior to align with new bar visibility meaning. |
| bin/omarchy-toggle-bar | Implements explicit argument mapping from on/off to underlying bar-off toggle states. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The new case statement routed everything that was not on or off into toggle, so a typo like `omarchy toggle bar onn` hid the bar and exited 0. Forwarding the argument to omarchy-toggle used to catch that with a usage error, matching omarchy-toggle-idle and omarchy-toggle-input-device. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
test/shell.d/toggle-test.sh:55
- This test only redirects stderr. If
omarchy-toggle-bar(or a wrapped command) ever emits stdout on error, it can add noise/flakiness to test output. Consider redirecting stdout as well (e.g.,>/dev/null 2>&1) for consistency with other suppressed calls in this file.
HOME="$test_home" omarchy-toggle-bar bogus 2>/dev/null && fail "bar rejects an unknown action"
|
Reviewed this and traced the whole chain rather than just the comparison. The fix is correct, and the one thing I most expected to be wrong here turns out not to be. No migration is needed, and that is worth stating explicitly. The persisted state is the flag file Nothing downstream was compensating for the old inversion either, so this does not move the bug elsewhere:
The third file, One real defect, which I have pushed a fix for (252057b):
Verified both on a VM. Since Idempotence is fine as written:
|
Keeps both sides of omarchy-toggle-bar: the corrected on/off mapping with its usage error, followed by quattro's syncHidden nudge to the shell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
omarchy-toggle-fullscreen-desktop landed on quattro after this branch was opened and passed its own on/off straight to omarchy-toggle-bar, relying on bar on meaning hidden. With the corrected mapping, full screen on would show the bar while removing the gaps, and the toggle would never leave full screen because the bar and gap flags could not both be set. Map full screen on to bar off, and make the half-hidden test hide the bar with bar off so it still exercises what it names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
This branch had fallen into conflict with The merge. A caller that depended on the old inversion. What was run, on a disposable Omarchy VM:
Second opinion: Codex at medium effort reviewed the head for proportionality, every caller of No migration is needed. The flag keeps its meaning (present means hidden), so nobody's saved bar state changes on upgrade. Next: this waits on the maintainer, and on the unrelated |
Summary
omarchy-toggle-barforwarded itson/offargument straight through to the underlyingbar-offstate flag without inverting it, soomarchy toggle bar onactually hid the bar andomarchy toggle bar offshowed it — the opposite of the command's own summary and documented examples.bin/omarchy-toggle-bar(on-> disablebar-off,off-> enablebar-off), leaving generictoggleuntouched since it's symmetric.test/shell.d/toggle-test.shandtest/acceptance.d/session-test.sh, which had encoded the previous (inverted) behavior as the expected/correct behavior.Fixes #7022
Test plan
./test/clipasses./test/shell— all suites pass except 3 pre-existing failures unrelated to this change (config-test.sh,snapper-test.sh,unowned-system-paths-test.sh), which also fail onmasterin this environment because noomarchy-pkgscheckout is available (OMARCHY_PKGS_PATHunset) — verified by stashing this change and re-running those 3 files against unmodifiedmastertest/shell.d/toggle-test.shpasses in isolation with the new expected on/off directionstest/acceptance.d/session-test.sh(graphical acceptance test) not run — requires the disposable VM environment; updated to match the corrected semantics but not executed here🤖 Generated with Claude Code