fix(gateway): reaffirm YAML skins on connect via skin.changed - #84803
Open
Zirillian wants to merge 1 commit into
Open
fix(gateway): reaffirm YAML skins on connect via skin.changed#84803Zirillian wants to merge 1 commit into
Zirillian wants to merge 1 commit into
Conversation
Desktop gateway.ready seeds skins with apply=false so a reconnect cannot stomp a built-in Appearance pick. That same rule leaves user YAML skins (not in Desktop BUILTIN_THEMES) stuck on nous after every cold boot: normalizeSkin rejects the persisted name until the seed lands, then never applies it. Send a follow-up skin.changed for on-disk YAML skins only. Existing Desktop clients already treat seed-only + same-name changed as missed-activation recovery. Built-ins are skipped. Fixes NousResearch#71446
Contributor
fix(gateway): reaffirm YAML skins on connect via skin.changed
|
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.
What does this PR do?
Fixes custom YAML skins (
~/.hermes/skins/*.yaml, e.g. mythos) resetting to nous after every Desktop restart, without requiring a Desktop client rebuild.gateway.readyseeds the skin withapply: falseso a reconnect cannot stomp a built-in Appearance pick. That same rule leaves user YAML skins stuck:normalizeSkinrejects the persisted name until the seed lands, then never applies it. Built-ins already persist because they resolve on the first frame.This PR sends a follow-up
skin.changedonly when the resolved skin is an on-disk user YAML (not a Desktop built-in). Current Desktop clients already treat seed-only + same-nameskin.changedas missed-activation recovery (seebackend-synctests / #69533).This is not another renderer-only persist PR. It is the gateway half that makes already-shipped Desktop binaries recover. Renderer-only PRs (#71447, #76648, #82483, #82951, #74018) still need a new Desktop build to help remote/Windows clients.
Verified on Windows Desktop (official binary) + Linux isolated
hermes serve --isolated: reopen paints nous briefly, then auto-switches to the YAML skin with no Appearance click.Related Issue
Fixes #71446
Also related (same class, first-use / renderer): #73987
Type of Change
Changes Made
tui_gateway/server.py—should_reaffirm_yaml_skin_on_connect(); true only for on-disk YAML names that are not Desktop built-ins (nous,midnight,ember,mono,cyberpunk,slate,default)tui_gateway/ws.py— after a successfulgateway.readyseed +register_live_transport, emitskin.changedwhen the helper is truetests/tui_gateway/test_protocol.py— helper: mythos True; nous/slate False; missing file False;{}/NoneFalseHow to Test
hermes config set display.skin mythos(or any name with~/.hermes/skins/<name>.yaml)hermes serve --isolatedif needed, reopen and reconnectUnit:
Sabotage check: helper forced
return False→ that test fails; restore → pass.Checklist
Code
fix(gateway):)test_unregister_live_transport_stops_delivery+test_skin_live_switch_end_to_end) passed. Fullpytest tests/ -qnot run in this checkout (no project pytest in the live venv until this run; CI will cover the rest)Documentation & Housekeeping
skin.changed; no Windows rebuild required for this halfWhy not change
gateway.readytoapply: true?That would stomp a user who picked Slate in Appearance while
display.skinis still a YAML name. The seed contract staysapply: false. Only YAML skins get the extraskin.changed.