Error display surface, theming, and a bug-hunting pass - #15
Merged
Conversation
…g we found coincidentally.
…et when stock profiles are chosen
…l daemon was not running. other misc fixes.
…ing will re-enable lighting properly on the next activation of that zone.
…wing the chosen theme.
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.
Error display surface, theming support, and the bug-hunting pass that followed it.
Targets v1.3.0, a minor bump, since it adds capability as well as fixing things.
Requires z13ctl v1.2.1 or newer. The fan-curve floor mirrors a rule the daemon
enforces from that version. Against an older daemon the drawer still works; the
floor just is not drawn.
What this adds
a rejected request looked exactly like a button that did nothing — which is how
the custom-TDP permission failure went unnoticed for weeks (z13ctl#14). One error
bar now serves all four views in both backends.
errorcolour, with a palette-matched value for each of the 15built-in themes. Existing
theme.tomlfiles are unaffected; an omitted keyinherits the default.
point below 80% duty and refuses a fan reset. The editor draws the floor, clamps
drags to it, and disables Reset Fans with a tooltip pointing at Reset TDP.
represent are never misreported.
Worth reviewing closely
internal/daemon—api.Send*signals "daemon not running" withhandled=falseand a nil error. All thirteen call sites read onlyerr, sowith the daemon stopped every operation took its success path: Save TDP cleared
the error bar, logged "custom TDP saved", and left the typed values on screen.
daemon.Errtakes a call's results directly so a site cannot read one and forgetthe other, and its contract test dials a temp
XDG_RUNTIME_DIRto pin the apiconvention rather than trusting a doc comment.
show/hideissued grab and release from separategoroutines with no ordering. A grab landing after a hide left every controller
exclusively grabbed with nothing on screen.
SetGrabbed(seq, grab)now dropssuperseded requests, sequenced from the GTK thread.
Window.visibleis anatomic.Bool— it was read from the gamepad reader'sgoroutine while written on the GTK thread.
internal/guiis excluded fromgo test -race, so this class of race cannot be reported here and has to be madeimpossible instead.
neither the
@z13-*tokens nor the gamescope scaling. Both now come fromBackend.Scale()andWindow.colors.Testing
Logic moved out of
internal/gui, which needs CGO and GTK4 headers and so cannotbe unit tested at all. Ten pure packages now cover TDP and fan rules, daemon result
handling, focus navigation, gamepad auto-repeat, colour conversion, lighting state,
UI scaling, argument parsing, log filtering and toggle debouncing — 96.6% coverage.
Several fixes here were found by writing those tests, including a fan-curve constraint cascade that collapsed points onto the minimum temperature, and a
Limitsinvariant the tests asserted but the code never enforced.CI is new in this branch: tests, race detector, dependency tidiness,
gofmt,golangci-lintand a full build on every push and PR. Previously nothing ranautomatically.
Verified on hardware
Error bar, fan curve editing including the high-TDP floor, TDP basic/advanced
behaviour, profile switching, and gamepad navigation in both Wayland and gamescope.