Repository navigation
scxtui: Say on the Configured line whether the unit starts at boot - #3973
Merged
Merged
Conversation
The first question after switching schedulers is whether the choice survives a reboot. The answer is in the listing already, as `unit.enabled`, and neither scxtui's panel nor `scxcli get` said it: a user had to know that `start ID` runs `systemctl enable` and that `start default` disables the unit, or go and ask systemctl. The first tester to try scxtui worked it out in a couple of seconds and then asked for it to be on screen. Put it on the Configured line, since that is the configuration it applies to: `cosmos (running, starts at boot)`, `cosmos (not running, starts at boot)` after `s`, and `nothing (not at boot)` after `start default`. The one state a user would not guess gets a colour: a scheduler that runs now but will not come back, which is what a `systemctl disable` by hand leaves behind, shows as `(running, not at boot)` in yellow; so does an enabled unit with nothing to run, which only a hand edit produces (`start default` disables the unit) and which at boot starts, runs nothing (`exec` of an empty expansion is a no-op to bash) and exits. An override in effect is still said first, with the boot state after it. `scxcli get` prints the same on its `configured:` line. `starts at boot` is systemd's declaration that the unit is enabled, not a promise that the scheduler will run after the reboot; a kernel without sched_ext skips the unit, a binary gone with an upgrade fails it, and the panel learns that after the fact, from `failure` and `kernel`. The spec says so. No new field and no new mechanism: `--json` is unchanged, the panel only shows what the backend already reports. Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
arighi
approved these changes
Nov 10, 2026
| /// hand `systemctl disable` clear, and it belongs next to the | ||
| /// configuration it applies to. | ||
| fn configured_line(current: &Current) -> (String, Color) { | ||
| let boot = if current.unit.enabled { |
Contributor
There was a problem hiding this comment.
Small edge case, not a blocker: unit.enabled is true for both enabled and enabled-runtime (e.g., if an admin runs sudo systemctl enable --runtime scx.service), so it doesn't necessarily mean the service always starts at boot (with --runtime it disappears on reboot).
Can we distinguish persistent and runtime enablement before choosing this label? The same applies to the label in scxcli.
…boot The first question after switching schedulers is whether the choice survives a reboot. The answer is in the listing already, as `unit.enabled`, and neither scxtui's panel nor `scxcli get` said it: a user had to know that `start ID` runs `systemctl enable` and that `start default` disables the unit, or go and ask systemctl. The first tester to try scxtui worked it out in a couple of seconds and then asked for it to be on screen. `starts at boot` is systemd's declaration that the unit is enabled, not a promise that the scheduler will run after the reboot; a kernel without sched_ext skips the unit, a binary gone with an upgrade fails it, and the panel learns that after the fact, from `failure` and `kernel`. The spec says so. No new mechanism: the existing unit state now distinguishes persistent and runtime enablement. The JSON contract remains backward-compatible through an optional field, and both clients render the state reported by the backend. Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
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.
The first question after switching schedulers is whether the choice survives a reboot. The answer is in the listing already, as
unit.enabled, and neither scxtui's panel norscxcli getsaid it: a user had to know thatstart IDrunssystemctl enableand thatstart defaultdisables the unit, or go and ask systemctl. The first tester to try scxtui worked it out in a couple of seconds and then asked for it to be on screen.Put it on the Configured line, since that is the configuration it applies to:
cosmos (running, starts at boot),cosmos (not running, starts at boot)afters, andnothing (not at boot)afterstart default. The one state a user would not guess gets a colour: a scheduler that runs now but will not come back, which is what asystemctl disableby hand leaves behind, shows as(running, not at boot)in yellow; so does an enabled unit with nothing to run, which only a hand edit produces (start defaultdisables the unit) and which at boot starts, runs nothing (execof an empty expansion is a no-op to bash) and exits. An override in effect is still said first, with the boot state after it.scxcli getprints the same on itsconfigured:line.starts at bootis systemd's declaration that the unit is enabled, not a promise that the scheduler will run after the reboot; a kernel without sched_ext skips the unit, a binary gone with an upgrade fails it, and the panel learns that after the fact, fromfailureandkernel. The spec says so.No new field and no new mechanism:
--jsonis unchanged, the panel only shows what the backend already reports.