Repository navigation
Offer to reboot when toggling sudoless Docker; show only the relevant menu entry - #8098
Merged
Merged
Conversation
… menu entry Group membership only takes effect on a fresh session, and in practice a logout or newgrp isn't enough — only a reboot reliably applies it. So the setup/remove commands now flag the reboot and offer to do it now with a gum confirm (like the GPU toggle), and the notices say "after a reboot" instead of pointing at logout or newgrp. The existing-user migration passes OMARCHY_DEFER_REBOOT so it does not prompt mid-update — omarchy-update-restart still handles the reboot once the whole update finishes. The Setup > Security menu also showed Sudoless Docker under both Setup and Remove. Condition the Setup entry on the group being absent (Remove already conditions on it being present), so only the applicable one appears. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T
Contributor
There was a problem hiding this comment.
Pull request overview
Adds reboot handling for Docker group changes and conditionally displays the sudoless Docker menu action.
Changes:
- Offers or defers reboot after toggling group membership.
- Adds menu visibility guards.
- Expands toggle and migration tests.
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 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
bin/omarchy-setup-security-sudoless-docker |
Offers reboot after setup. |
bin/omarchy-remove-security-sudoless-docker |
Offers reboot after removal. |
migrations/1787580187.sh |
Defers migration-triggered reboot. |
default/omarchy/omarchy-menu.jsonc |
Guards the Setup menu entry. |
test/shell.d/docker-group-migration-test.sh |
Tests deferred migration reboot. |
test/shell.d/sudoless-docker-toggle-test.sh |
Tests toggle and reboot behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Every place that chooses between talking to Docker directly and elevating was testing group membership by hand, and the menu guards tested the wrong thing: they read the running session's groups, which do not change until the reboot, so after enabling sudoless Docker the menu still offered Setup — the one action that could no longer do anything — while Remove stayed hidden. Add omarchy-sudo-docker as the single answer, with the two questions that actually differ in that window. By default it asks whether this session can reach the socket, which is what decides if a command must elevate: lazydocker and the Windows VM keep prompting until the reboot lands. With --configured it asks whether the account is set up for sudoless Docker, which is what the menu and the toggles need, so the menu switches to the action that can change state as soon as the group is written. Also correct a comment: nothing surfaces reboot-required in the bar; it is omarchy-update-restart that reads it during a later update. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T
omarchybot
added a commit
that referenced
this pull request
Aug 25, 2026
… menu entry (backport of #8098) Backport of the sudoless Docker follow-up (PR #8098, merged to quattro as 06a3dbc) onto the v4-0-1 release branch, on top of the #8056 and #8080 backports it follows. Group membership only takes effect on a fresh session, and in practice a logout or newgrp is not enough -- only a reboot reliably applies it. The setup and remove commands now flag the reboot and offer to do it right away with a gum confirm, the same shape as the GPU toggle, and their notices say "after a reboot" instead of pointing at logout or newgrp. The existing-user migration reuses the removal command inside omarchy update, so it passes OMARCHY_DEFER_REBOOT to skip the prompt there and lets omarchy-update-restart handle the reboot once the whole update has finished. Setup > Security showed Sudoless Docker under both Setup and Remove, and the guards tested the running session's groups, which do not change until the reboot: after enabling sudoless Docker the menu still offered Setup, the one action that could no longer do anything, while Remove stayed hidden. Add omarchy-sudo-docker as the single answer to both questions that differ in that window -- by default whether this session can reach the socket, which is what decides if a command must elevate, and with --configured whether the account is set up for it, which is what the menu and the toggles need. It succeeds when sudo is needed, so the Setup entry appears while sudoless Docker is off and Remove once it is on. lazydocker and the Windows VM keep prompting until the reboot lands. Clean cherry-pick on top of the earlier backports: every file is byte-identical to quattro except default/omarchy/omarchy-menu.jsonc, which merged into this branch's menu and whose two Sudoless Docker lines match quattro exactly. test/shell passes: 188 files, including the two this adds. test/cli passes, so the new command's metadata is well-formed. Exercised the helper here: with no socket it reports sudo is needed, and --configured answers from the account's groups. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_018DEMYa9UWtroz93DhMTtcV
Closed
nick1udwig
pushed a commit
to nick1udwig/omarchy
that referenced
this pull request
Sep 9, 2026
… menu entry (omacom#8098) * Offer to reboot when toggling sudoless Docker; show only the relevant menu entry Group membership only takes effect on a fresh session, and in practice a logout or newgrp isn't enough — only a reboot reliably applies it. So the setup/remove commands now flag the reboot and offer to do it now with a gum confirm (like the GPU toggle), and the notices say "after a reboot" instead of pointing at logout or newgrp. The existing-user migration passes OMARCHY_DEFER_REBOOT so it does not prompt mid-update — omarchy-update-restart still handles the reboot once the whole update finishes. The Setup > Security menu also showed Sudoless Docker under both Setup and Remove. Condition the Setup entry on the group being absent (Remove already conditions on it being present), so only the applicable one appears. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T * Ask omarchy-sudo-docker whether Docker needs sudo Every place that chooses between talking to Docker directly and elevating was testing group membership by hand, and the menu guards tested the wrong thing: they read the running session's groups, which do not change until the reboot, so after enabling sudoless Docker the menu still offered Setup — the one action that could no longer do anything — while Remove stayed hidden. Add omarchy-sudo-docker as the single answer, with the two questions that actually differ in that window. By default it asks whether this session can reach the socket, which is what decides if a command must elevate: lazydocker and the Windows VM keep prompting until the reboot lands. With --configured it asks whether the account is set up for sudoless Docker, which is what the menu and the toggles need, so the menu switches to the action that can change state as soon as the group is written. Also correct a comment: nothing surfaces reboot-required in the bar; it is omarchy-update-restart that reads it during a later update. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T --------- Co-authored-by: David Heinemeier Hansson <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #8056 / #8080.
Two fixes for toggling sudoless Docker.
Reboot to apply. A
dockergroup change is only picked up by a fresh session, and in practice a logout ornewgrpisn't enough — only a reboot reliably applies it. Soomarchy-setup-security-sudoless-dockerandomarchy-remove-security-sudoless-dockernow flag the reboot and offer to do it right away with agum confirm(the same shape as the GPU toggle), and the notices say "after a reboot" rather than pointing at logout/newgrp. The existing-user migration reuses the removal command insideomarchy update, so it passesOMARCHY_DEFER_REBOOTto skip the prompt there —omarchy-update-restartstill handles the reboot once the whole update has finished, instead of cutting it short.Only the entry you need. Setup > Security showed Sudoless Docker under both Setup and Remove. The Setup entry is now conditioned on the group being absent (Remove already conditions on it being present), so exactly one shows: Setup when it's off, Remove when it's on.
🤖 Generated by Opus 4.8 in Claude Code.