Files
hermes-webui/tests/test_zeus_skin.py
nesquena-hermes 703aba3f3e
Some checks failed
Release & Docker / release (push) Has been cancelled
Release v0.51.250 — Release HR (stage-q22) (#3526)
## Release v0.51.250 — Release HR (stage-q22)

UX-approved (dark + light-fallback screenshots).

### Added
| PR | Author | Feature |
|----|--------|---------|
| #3328 | @heagandev | **Zeus appearance skin** — OLED-near-black dark surfaces that keep the default **gold accent** (a high-contrast "gold on black" look no existing skin offered). Selectable from Settings → Appearance or `/theme skin zeus`. Dark-focused; falls back to the default light palette in light mode. |

### Notes
- The PR was 2 days / ~19 releases stale and CONFLICTING; re-applied surgically onto current master (CSS palette + `zeus` registered at all 5 sites: config allowlist, boot.js swatch, index.html boot-map, i18n `cmd_theme` ×12 locales, picker) + THEMES.md doc row. The PR's own `test_zeus_skin.py` (6 tests) passes against the re-applied version.
- Fully scoped + additive: Codex verified every new CSS rule is under `:root.dark[data-skin="zeus"]` — no bleed into the default appearance or other skins.

### Gate
- Full pytest suite: **7563 passed, 0 failed**
- ESLint: CLEAN · ruff: CLEAN · browser-smoke: CLEAN · vision-verified dark (OLED+gold) + light (clean fallback)
- Codex (regression): **SAFE TO SHIP**

Co-authored-by: heagandev <heagandev@users.noreply.github.com>
2026-06-03 20:54:02 -07:00

50 lines
1.8 KiB
Python

"""Zeus skin registration and dark-surface affordances."""
from pathlib import Path
REPO = Path(__file__).parent.parent
CSS = (REPO / "static" / "style.css").read_text(encoding="utf-8")
BOOT_JS = (REPO / "static" / "boot.js").read_text(encoding="utf-8")
CONFIG_PY = (REPO / "api" / "config.py").read_text(encoding="utf-8")
INDEX_HTML = (REPO / "static" / "index.html").read_text(encoding="utf-8")
I18N_JS = (REPO / "static" / "i18n.js").read_text(encoding="utf-8")
def test_zeus_skin_is_registered_in_all_files():
assert "{name:'Zeus'" in BOOT_JS
assert "zeus:1" in INDEX_HTML
assert '"zeus"' in CONFIG_PY
def test_zeus_dark_surfaces_are_near_black():
assert ':root.dark[data-skin="zeus"]' in CSS
assert "--bg:#0F0F0F" in CSS
assert "--sidebar:#111111" in CSS
assert "--surface:#181818" in CSS
def test_zeus_preserves_default_gold_accent():
# Zeus does NOT redefine --accent; it stays with the default gold.
# Verify gold-tinted border/focus vars are present instead.
assert "--border2:rgba(255,215,0,0.18)" in CSS
assert "--focus-ring:rgba(255,215,0,.4)" in CSS
assert "--hover-bg:rgba(255,215,0,.06)" in CSS
def test_zeus_active_session_uses_gold_highlight():
assert ':root.dark[data-skin="zeus"] .session-item.active' in CSS
assert "border-left:2px solid #FFD700" in CSS
def test_zeus_modals_are_not_navy():
# Modals/dialogs default to a hardcoded navy gradient — Zeus must override
assert ':root.dark[data-skin="zeus"] .app-dialog' in CSS
assert ':root.dark[data-skin="zeus"] .kanban-modal' in CSS
assert "rgba(24,24,24,.99)" in CSS
def test_zeus_i18n_lists_skin_in_all_locales():
# Zeus is the last skin in each locale's cmd_theme string, so it appears
# as `…/zeus)` rather than `/zeus/`. There are 10 locales.
assert I18N_JS.count("zeus)") == 10