Repository navigation
Simplify the Quattro upgrade, and stop it leaving an error bar behind - #6716
Conversation
omarchy-setup-lock was renamed to omarchy-apply-lock in 536fcd5, but the upgrade calls into whatever the channel just installed, and every released package still ships the old name. The rename only moves in lockstep for the ISO, which installs the runtime from the mirror it ships with; the upgrade has no such guarantee, so it aborted every run with "omarchy-apply-lock is unavailable" right before the point of no return. Prefer the new name and fall back to the old one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The upgrade tried to start Quickshell in the live session, and only stopped waybar/walker/elephant if that worked. Every branch of it could fail, so it needed a warning for each, and those warnings were the first thing users read at the end of an upgrade that had otherwise succeeded. The reboot is the cutover. Swapping the UI out underneath a running session buys nothing, so drop the attempt and both functions with it. The Omarchy 3 bar, launcher, and notifications keep working until the reboot, which is what happened anyway whenever the start failed. Also warn up front when the live Hyprland session cannot be reached, and drop the package_mode label that was set on both branches of the dev-package check and never read. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
populate_legacy_hypr_defaults tried a sparse git clone of master, then a curl of the master tarball, and only if both failed the backup taken a few lines earlier. That backup is the checkout the running session is sourcing right now: it is the correct content, it is already on disk, and it needs no network in the middle of an upgrade. master is a guess that is wrong for any machine not on master. Try the backup first and drop the git clone, which fetched the same thing as the tarball by a longer route. The network path stays for the case that has no backup, where the legacy root was already a symlink. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The two settings were applied through both the keyword and the Lua API, in four calls on the way out and three on the way in, split differently each time. Fold that into one helper that takes the value. The error bar needed more than suppression. An explicit hyprctl reload re-reads the config from disk, which resets both keywords before it reports what it found, so suppression cannot survive one; anything that reloaded during the swap left the bar on screen. Hyprland then keeps it up until a later clean reload, which this script deliberately never performs, so it was still there when the upgrade finished. Clear the overlay on the way out, once the shims have made the legacy config resolve again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
configure_snapper_policy and configure_lock_authentication already call into the installed tree; apply_firewall_defaults reimplemented install/config/firewall.sh inline instead, and had already drifted from it. The packaged script also installs the ufw-docker rules, so upgraded machines came up without the Docker firewall protections a fresh install gets. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Simplifies the Quattro upgrade and improves compatibility and post-upgrade session behavior.
Changes:
- Keeps the legacy UI running until reboot and clears stale Hyprland errors.
- Adds lock-command compatibility and backup-first Hyprland shims.
- Reuses packaged firewall configuration.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/omarchy-upgrade-to-quattro |
Simplifies session cutover and updates upgrade configuration steps. |
test/shell.d/upgrade-to-quattro-test.sh |
Updates final-step ordering coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # The reboot is the cutover, so the last mutating step hands the live session | ||
| # back rather than swapping the shell out underneath it. | ||
| last_step_line=$(grep -n '^restore_hyprland_config_reload$' "$upgrade_to_quattro" | cut -d: -f1) |
There was a problem hiding this comment.
Good catch — fixed in 0a3f0e1's follow-up.
The ordering check only proved completion follows restore_hyprland_config_reload, so reintroducing either entry point would have passed while the comment above it claimed otherwise. Both are now named explicitly:
! grep -q 'start_omarchy_shell_session' "$upgrade_to_quattro" ||
fail "Omarchy 4 upgrade does not start the shell in the session it is replacing"
! grep -q 'stop_retired_session_processes' "$upgrade_to_quattro" ||
fail "Omarchy 4 upgrade leaves the retired session processes running until reboot"Verified both ways: passes as-is, and appending a stub stop_retired_session_processes makes it report not ok.
— 🤖 Claude, posting on behalf of @dhh
This is the reload behind the "source= globbing error" bar users see during a Quattro upgrade. The upgrade runs the packaged migrations against a still-running Omarchy 3 session, and this one ends with hyprctl reload. That re-parses a legacy config whose theme source= has nothing to resolve to yet, so Hyprland paints an error bar and keeps it up until a later clean reload the upgrade deliberately never performs. It was still on screen when the upgrade finished. The upgrade already exports OMARCHY_UPGRADE_TO_QUATTRO_LIVE for exactly this, and 1782002156 honors it. Do the same here. Nothing in that session reads the toggle being removed; the reboot applies it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The ordering check would still pass if either came back, while the comment above it claims they cannot. Name them. 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 (2)
migrations/1784767406.sh:12
- This new live-upgrade branch has no regression coverage. Add a shell test with a stub
hyprctlthat verifies a normal migration reloads once whileOMARCHY_UPGRADE_TO_QUATTRO_LIVE=1performs no reload; otherwise the error-bar fix can regress unnoticed.
if [[ ${OMARCHY_UPGRADE_TO_QUATTRO_LIVE:-0} != "1" ]]; then
hyprctl reload >/dev/null 2>&1 || true
fi
test/shell.d/upgrade-to-quattro-test.sh:113
- This check assumes
restore_hyprland_config_reloadis the last step but only verifies that completion occurs later. Reintroducingstart_omarchy_shell_sessionor the retired-process stop block after this line would still pass, so the test does not enforce the new no-live-shell-swap contract. Add negative assertions for those removed calls.
last_step_line=$(grep -n '^restore_hyprland_config_reload$' "$upgrade_to_quattro" | cut -d: -f1)
[[ -n $started_line && -n $completed_line && -n $suppress_line && -n $last_step_line ]] ||
fail "upgrade progress markers and the mutating step range exist"
(( started_line < suppress_line )) || fail "the upgrade is marked started before the first mutation"
(( completed_line > last_step_line )) || fail "the upgrade is marked complete only after the last step"
The upgrade always defaulted to stable, so an rc machine taking it landed on production packages from the stable repo. rc callers worked around that by passing --channel rc, which then forced every caller onto rc, stable machines included. Read the channel off the mirrorlist the way omarchy-version-channel does and follow it: stable machines get omarchy and omarchy-settings from stable, and rc or edge machines get omarchy-dev and omarchy-settings-dev from edge, which is what --dev already selects. An explicit --channel or --dev still wins, and an unrecognized mirrorlist still falls back to stable. 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)
migrations/1784767406.sh:11
- This live-upgrade guard is the central error-bar fix, but no shell test runs the migration with a stubbed
hyprctl. Add cases provingOMARCHY_UPGRADE_TO_QUATTRO_LIVE=1skips reload while a normal migration still performs it.
if [[ ${OMARCHY_UPGRADE_TO_QUATTRO_LIVE:-0} != "1" ]]; then
hyprctl reload >/dev/null 2>&1 || true
--dev forced the edge channel, so an rc machine following its own channel was moved onto the edge Arch mirror as well. The constraint is narrower than that: the dev packages are only published to the edge package repo, which the rc and edge channels both already point at. Only stable is incompatible. Reject --dev only for stable, and default to edge just when no channel was chosen. rc machines now upgrade against rc-mirror with the dev packages out of the edge repo, which is where Quattro lives until it ships. 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)
migrations/1784767406.sh:12
- Add a migration test that stubs
hyprctland verifies both branches: normal migration invokesreload, whileOMARCHY_UPGRADE_TO_QUATTRO_LIVE=1does not. This guard is the primary fix for the persistent error bar, but the current shell tests do not exercise it.
if [[ ${OMARCHY_UPGRADE_TO_QUATTRO_LIVE:-0} != "1" ]]; then
hyprctl reload >/dev/null 2>&1 || true
fi
…omacom#6716) * Accept either name for the lock authentication command omarchy-setup-lock was renamed to omarchy-apply-lock in 536fcd5, but the upgrade calls into whatever the channel just installed, and every released package still ships the old name. The rename only moves in lockstep for the ISO, which installs the runtime from the mirror it ships with; the upgrade has no such guarantee, so it aborted every run with "omarchy-apply-lock is unavailable" right before the point of no return. Prefer the new name and fall back to the old one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Leave the Omarchy 3 session alone until the reboot The upgrade tried to start Quickshell in the live session, and only stopped waybar/walker/elephant if that worked. Every branch of it could fail, so it needed a warning for each, and those warnings were the first thing users read at the end of an upgrade that had otherwise succeeded. The reboot is the cutover. Swapping the UI out underneath a running session buys nothing, so drop the attempt and both functions with it. The Omarchy 3 bar, launcher, and notifications keep working until the reboot, which is what happened anyway whenever the start failed. Also warn up front when the live Hyprland session cannot be reached, and drop the package_mode label that was set on both branches of the dev-package check and never read. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Shim the legacy Hyprland defaults from the backup, not from GitHub populate_legacy_hypr_defaults tried a sparse git clone of master, then a curl of the master tarball, and only if both failed the backup taken a few lines earlier. That backup is the checkout the running session is sourcing right now: it is the correct content, it is already on disk, and it needs no network in the middle of an upgrade. master is a guess that is wrong for any machine not on master. Try the backup first and drop the git clone, which fetched the same thing as the tarball by a longer route. The network path stays for the case that has no backup, where the legacy root was already a symlink. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Clear the Hyprland error bar the upgrade leaves behind The two settings were applied through both the keyword and the Lua API, in four calls on the way out and three on the way in, split differently each time. Fold that into one helper that takes the value. The error bar needed more than suppression. An explicit hyprctl reload re-reads the config from disk, which resets both keywords before it reports what it found, so suppression cannot survive one; anything that reloaded during the swap left the bar on screen. Hyprland then keeps it up until a later clean reload, which this script deliberately never performs, so it was still there when the upgrade finished. Clear the overlay on the way out, once the shims have made the legacy config resolve again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Run the packaged firewall config instead of a copy of it configure_snapper_policy and configure_lock_authentication already call into the installed tree; apply_firewall_defaults reimplemented install/config/firewall.sh inline instead, and had already drifted from it. The packaged script also installs the ufw-docker rules, so upgraded machines came up without the Docker firewall protections a fresh install gets. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Stop the Voxtype toggle migration reloading a mid-swap session This is the reload behind the "source= globbing error" bar users see during a Quattro upgrade. The upgrade runs the packaged migrations against a still-running Omarchy 3 session, and this one ends with hyprctl reload. That re-parses a legacy config whose theme source= has nothing to resolve to yet, so Hyprland paints an error bar and keeps it up until a later clean reload the upgrade deliberately never performs. It was still on screen when the upgrade finished. The upgrade already exports OMARCHY_UPGRADE_TO_QUATTRO_LIVE for exactly this, and 1782002156 honors it. Do the same here. Nothing in that session reads the toggle being removed; the reboot applies it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Assert the retired session entry points stay gone The ordering check would still pass if either came back, while the comment above it claims they cannot. Name them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Upgrade onto the channel the machine is already on The upgrade always defaulted to stable, so an rc machine taking it landed on production packages from the stable repo. rc callers worked around that by passing --channel rc, which then forced every caller onto rc, stable machines included. Read the channel off the mirrorlist the way omarchy-version-channel does and follow it: stable machines get omarchy and omarchy-settings from stable, and rc or edge machines get omarchy-dev and omarchy-settings-dev from edge, which is what --dev already selects. An explicit --channel or --dev still wins, and an unrecognized mirrorlist still falls back to stable. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Keep rc machines on the rc mirror when taking dev packages --dev forced the edge channel, so an rc machine following its own channel was moved onto the edge Arch mirror as well. The constraint is narrower than that: the dev packages are only published to the edge package repo, which the rc and edge channels both already point at. Only stable is incompatible. Reject --dev only for stable, and default to edge just when no channel was chosen. rc machines now upgrade against rc-mirror with the dev packages out of the edge repo, which is where Quattro lives until it ships. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…omacom#6716) * Accept either name for the lock authentication command omarchy-setup-lock was renamed to omarchy-apply-lock in 536fcd5, but the upgrade calls into whatever the channel just installed, and every released package still ships the old name. The rename only moves in lockstep for the ISO, which installs the runtime from the mirror it ships with; the upgrade has no such guarantee, so it aborted every run with "omarchy-apply-lock is unavailable" right before the point of no return. Prefer the new name and fall back to the old one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Leave the Omarchy 3 session alone until the reboot The upgrade tried to start Quickshell in the live session, and only stopped waybar/walker/elephant if that worked. Every branch of it could fail, so it needed a warning for each, and those warnings were the first thing users read at the end of an upgrade that had otherwise succeeded. The reboot is the cutover. Swapping the UI out underneath a running session buys nothing, so drop the attempt and both functions with it. The Omarchy 3 bar, launcher, and notifications keep working until the reboot, which is what happened anyway whenever the start failed. Also warn up front when the live Hyprland session cannot be reached, and drop the package_mode label that was set on both branches of the dev-package check and never read. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Shim the legacy Hyprland defaults from the backup, not from GitHub populate_legacy_hypr_defaults tried a sparse git clone of master, then a curl of the master tarball, and only if both failed the backup taken a few lines earlier. That backup is the checkout the running session is sourcing right now: it is the correct content, it is already on disk, and it needs no network in the middle of an upgrade. master is a guess that is wrong for any machine not on master. Try the backup first and drop the git clone, which fetched the same thing as the tarball by a longer route. The network path stays for the case that has no backup, where the legacy root was already a symlink. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Clear the Hyprland error bar the upgrade leaves behind The two settings were applied through both the keyword and the Lua API, in four calls on the way out and three on the way in, split differently each time. Fold that into one helper that takes the value. The error bar needed more than suppression. An explicit hyprctl reload re-reads the config from disk, which resets both keywords before it reports what it found, so suppression cannot survive one; anything that reloaded during the swap left the bar on screen. Hyprland then keeps it up until a later clean reload, which this script deliberately never performs, so it was still there when the upgrade finished. Clear the overlay on the way out, once the shims have made the legacy config resolve again. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Run the packaged firewall config instead of a copy of it configure_snapper_policy and configure_lock_authentication already call into the installed tree; apply_firewall_defaults reimplemented install/config/firewall.sh inline instead, and had already drifted from it. The packaged script also installs the ufw-docker rules, so upgraded machines came up without the Docker firewall protections a fresh install gets. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Stop the Voxtype toggle migration reloading a mid-swap session This is the reload behind the "source= globbing error" bar users see during a Quattro upgrade. The upgrade runs the packaged migrations against a still-running Omarchy 3 session, and this one ends with hyprctl reload. That re-parses a legacy config whose theme source= has nothing to resolve to yet, so Hyprland paints an error bar and keeps it up until a later clean reload the upgrade deliberately never performs. It was still on screen when the upgrade finished. The upgrade already exports OMARCHY_UPGRADE_TO_QUATTRO_LIVE for exactly this, and 1782002156 honors it. Do the same here. Nothing in that session reads the toggle being removed; the reboot applies it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Assert the retired session entry points stay gone The ordering check would still pass if either came back, while the comment above it claims they cannot. Name them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Upgrade onto the channel the machine is already on The upgrade always defaulted to stable, so an rc machine taking it landed on production packages from the stable repo. rc callers worked around that by passing --channel rc, which then forced every caller onto rc, stable machines included. Read the channel off the mirrorlist the way omarchy-version-channel does and follow it: stable machines get omarchy and omarchy-settings from stable, and rc or edge machines get omarchy-dev and omarchy-settings-dev from edge, which is what --dev already selects. An explicit --channel or --dev still wins, and an unrecognized mirrorlist still falls back to stable. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Keep rc machines on the rc mirror when taking dev packages --dev forced the edge channel, so an rc machine following its own channel was moved onto the edge Arch mirror as well. The constraint is narrower than that: the dev packages are only published to the edge package repo, which the rc and edge channels both already point at. Only stable is incompatible. Reject --dev only for stable, and default to edge just when no channel was chosen. rc machines now upgrade against rc-mirror with the dev packages out of the edge repo, which is where Quattro lives until it ships. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
A review of
omarchy-upgrade-to-quattrofor dead code and simplification, plus the two things that made a successful upgrade look broken.Includes #6714. This branch is stacked on it, so merging this makes that one redundant. It has to be: reverting to the old
omarchy-apply-lockreference here would undo the fix if #6714 merged first.Stop the error bar at its source
The
source= globbing errorbar was still on screen when the upgrade finished. The upgrade is not the one reloading — it goes out of its way not to, and even skipsomarchy-theme-set's live hooks because one of them reloads. The reload comes from a packaged migration:The upgrade runs the packaged migrations against a still-running Omarchy 3 session, so that re-parses a legacy config whose theme
source=has nothing to resolve to yet. Hyprland paints the bar and keeps it up until a later clean reload the upgrade deliberately never performs.The upgrade already exports
OMARCHY_UPGRADE_TO_QUATTRO_LIVEfor exactly this case and1782002156honors it, so this migration now does too. Nothing in that session reads the toggle being removed; the reboot applies it.A
seterror disableon the way out stays as a backstop, since suppression cannot survive a reload either way: a reload re-reads the config from disk, resettingdebug:suppress_errorsbefore it reports what it found. The suppression itself also collapses from seven hyprctl calls into one helper. Both APIs stay — the legacy parser only takeskeyword, and Quattro's Lua parser rejects it withkeyword can't work with non-legacy parsers.Stop starting Quickshell in the live session
The upgrade tried to start Quickshell in the running session, and only stopped waybar/walker/elephant if that worked. Every branch could fail, so each needed a warning, and those were the first thing users read at the end of an upgrade that had otherwise succeeded:
"No live Hyprland session" reads as nonsense on a machine with Hyprland plainly on screen — it is one arm of an
||that also catches shell startup failing. The reboot is the cutover. Swapping the UI out underneath a running session buys nothing, so both functions go and the Omarchy 3 session keeps its bar, launcher, and notifications until the reboot — which is what happened anyway whenever the start failed.-56/+3.Shim the legacy Hyprland defaults from the backup
populate_legacy_hypr_defaultstried a sparsegit cloneof master, then acurlof the master tarball, and only if both failed the backup taken a few lines earlier. That backup is the checkout the running session is sourcing right now — correct content, already on disk, no network needed mid-upgrade. master is a guess that is wrong for any machine not on master. Backup first, and thegit clonegoes since it fetched the same thing as the tarball by a longer route.Run the packaged firewall config
configure_snapper_policyandconfigure_lock_authenticationalready call into the installed tree.apply_firewall_defaultsreimplementedinstall/config/firewall.shinline and had drifted from it: the packaged script also installs the ufw-docker rules, so upgraded machines came up without the Docker firewall protections a fresh install gets.Dead code
One variable:
package_mode, set on both branches of the dev-package check and never read. All 76 functions are reachable.Not done
apply_system_transitionstill hand-rolls whatinstall/config/{docker,enable-services,fix-powerprofilesctl-shebang,increase-lockout-limit}.shdo, andomarchy-apply-system --upgradeexists as the entry point for exactly this. I left it: the inline versions do extra things the packaged scripts don't (the resolv.conf symlink, disabling iwd and docker.service), so it needs a careful per-script comparison rather than a swap.— 🤖 Claude, posting on behalf of @dhh