Skip to content

feat(gui): the window has a temperature - frost, styles, sound, Frost's voice - #33

Merged
I4cTime merged 23 commits into
mainfrom
feat/cryo-feel
Nov 12, 2026
Merged

I4cTime merged 23 commits into
mainfrom
feat/cryo-feel

Conversation

@I4cTime

@I4cTime I4cTime commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

The window has a temperature. This is the "cryo feel" pass: the GUI now behaves like its subject.

  • Thermal chrome. Frost frames the window when the machine is cool and recedes as it heats; the backdrop washes move between each style's cold and hot colours.
  • Flash freeze. When Thermal Guard engages, frost sweeps across the window, holds as a frame while the guard is on, and thaws on release.
  • Ice material. Panels are slabs with a lit facet edge and a hover glow. The emoji mode glyphs are replaced by a 25-icon vector set.
  • Living mark. Motes orbit the header crystal at a speed that follows the fastest fan; the mark goes grey and still when cryod is unreachable.
  • Alive touches. Rolling digits on temperatures and fan speeds, a frost bloom under a pressed mode button, a breathing connection dot, sections that crystallize in.
  • Sound. Three synthesized sets (Ice, Glass, Deep), off by default, with volume and preview.
  • Frost's voice. A one-line status in the footer, rule-based and local. Lines about fan behaviour only appear when the fan reading supports them.
  • Styles and accent. A Settings view with four styles (Cryo, Aurora, Glacier which is light, Blackout), an accent override that is kept readable per style, toggles for the effects and for reduce motion.

Also in this PR: a refreshed uv.lock (the pytest floor was raised without relocking), README and CONTRIBUTING updates, and docs/THEME.md as the token contract.

Type

Feature (GUI only). No daemon, hw, cli or socket protocol changes. No new dependencies.

Checklist

  • uv sync --frozen, compileall, import smoke, cryoctl --help, version consistency, uv lock --check
  • uv run pytest -q: 582 passed, three runs in a row, also with CI=1
  • Generated assets are fresh: tools/build_shaders.py --check, tools/gen_sounds.py --check
  • No em dashes (count is 0)
  • Wheel built and inspected: all 108 QML, shader, icon, sound and font files are packaged

Verification

  • Looked at: the headless tour (tools/tour.py, OpenGL through gamescope) for every scene in all four styles, plus 440 px width, the software renderer, reduce motion and effects off.
  • Cost: focused and idle, three interleaved 20 s samples each: main 13.05 / 13.40 / 12.50 percent of one core, this branch 13.20 / 13.20 / 12.60. Heat moves in whole-degree steps at the telemetry cadence, so the chrome adds no frames at rest. A test proves no frame is produced while the window is not live, and a lint test requires every loop to be gated on Ambient.motion.
  • Rules enforced by tests: no colour literals outside Theme.qml, every style has the same token set, text and accent contrast per style, reduce motion gives pixel-identical frames on static telemetry, no emoji in QML, stale shader binaries and sound files fail.
  • Not covered: a real Thermal Guard trip on hardware (demo daemon only); the sounds have been validated as files and loaded silently, but nobody has listened to them; Wayland fractional scaling and X11; machines other than the m18 R2; the split GUI has only been exercised against the live daemon by a headless render, not by hand.
  • Known weak spots: frost is faint on the light Glacier style; on the software renderer the frost is a static image without the flash freeze.

Breaking changes

None. Settings are new and default to the previous look plus the effects; sound is off until enabled.

🤖 Generated with Claude Code

I4cTime and others added 23 commits November 11, 2026 22:08
25 plain-path SVG icons (24 px grid, white on transparent, tinted at
runtime) to replace the emoji mode glyphs and cover the new Settings
chrome. A structural test keeps them Qt SVG Tiny safe, and
tools/icon_sheet.py renders a contact sheet for review.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
Three UI sound sets (ice, glass, deep), nine events each, generated by
tools/gen_sounds.py from the stdlib with fixed seeds and committed as
WAV; a test regenerates them and compares bytes so they cannot go stale.

voice.py is the rule-based line Frost shows in the footer: situations
with priority, hysteresis and dwell, deterministic under an injected
rng and clock. Lines that describe fan behaviour are only eligible when
the fan reading supports them.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
A window-frost layer driven by one amount value. A pre-baked growth map
(freeze order, crystal detail, sparkle) generated by tools/gen_frost.py
is thresholded in a small fragment shader with a bright rim at the
growth front, so frost can creep, hold or sweep with no per-frame cost
at rest. On the software renderer a pre-baked static image stands in.

tools/build_shaders.py compiles shaders to .qsb with a source hash
sidecar; a test fails when a binary is stale.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
… tour

Main.qml was one 1872-line file with its colour tokens on the window.
It is now a thin shell over a QML module (qml/Cryo) with Theme and
Ambient singletons and one file per component and section. No pixel
changes: tour shots before and after match on the software renderer and
differ only by GPU run-to-run noise (1 LSB) on OpenGL.

cryo-gui --demo runs the full GUI against a scripted daemon
(DemoDaemon) on any machine, with scenarios and a feed/set_state API.
A test pins its telemetry frame to a real engine tick so it cannot
drift. tools/tour.py renders scenes headless (gamescope for the GPU
path, offscreen for software) and can sample CPU use.

A GUI smoke test loads the window offscreen and fails on any QML
warning; CI installs the Qt runtime libraries so it runs there.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
Review follow-up. A runner image that lost a Qt library would have
skipped the GUI tests and stayed green; on CI the import now raises.
The smoke fixture also asserts that no QML warning was emitted while
tearing down the engine and the bridge.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
Dependabot raised the floor in pyproject.toml without relocking.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
…ctor icons

The window now has a temperature. Ambient derives a heat value from the
hotter of CPU and GPU in whole-degree steps at the telemetry cadence
(no continuous easing, so nothing repaints at rest) and from it a frost
amount: frost frames the window when cool, recedes as it warms, sweeps
across when Thermal Guard engages, holds, and thaws on release. The
backdrop washes move between each style's cold and hot colours.

Theme gains four styles (cryo, aurora, glacier, blackout) defined as
data with identical keys, plus an accent override, all read through
tokens; a test forbids colour literals outside Theme and checks every
style. Prefs persists the choices with QtCore Settings.

Emoji mode glyphs are replaced by the SVG icon set through an image
provider that tints with QPainter, so icons work on the software
renderer too. Seams for the next pieces: LivingMark, ConnDot,
SettingsPage and Sfx stubs, and a settings page switch in the header.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
# Conflicts:
#	tests/conftest.py
#	tests/test_gui_smoke.py
Settings (gear in the header) holds appearance (four style cards with
live previews, accent override), effects (frost and thermal chrome,
reduce motion), sound, the Frost status line and about. Choices apply
at once and persist.

Sound is off by default. When enabled, SfxBank creates QtMultimedia
SoundEffects for the chosen set; state-driven cues are wired in one
place (profile change, guard engage and release, connection lost and
regained, daemon errors) and controls add tap and toggle cues. If the
bank cannot load, Settings says sound is unavailable and nothing else
changes. A dry-run hook lets tests and the tour assert cues silently.

The bridge owns a FrostVoice and exposes frostLine and frostLineKey;
the footer shows the line, or the old daemon text when it is off.

Accent overrides are made readable per style: Theme.readableOn moves
only lightness until the colour reaches 4.5:1 on that style's panel.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
Panels become slabs of ice: a gradient, a lit facet edge that fades
toward both ends, and an accent glow on hover. Mode buttons bloom a
six-fold crystal from the press point. Motes orbit the header mark at
a speed that follows the fastest fan, turn frost white under the
guard, and vanish while the mark goes grey when cryod is unreachable.
Temperatures and fan speeds roll digit by digit, the connection dot
breathes, and sections crystallize in once at first show.

A disconnected window holds a light fixed frost. Every loop is gated
on Ambient.motion; a lint test enforces it and another proves no frame
is produced while the window is not live.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
# Conflicts:
#	src/cryo/gui/qml/Cryo/qmldir
README gains the feel pass and cryo-gui --demo. CONTRIBUTING describes
the Cryo QML module, the token rule, the generators and their freshness
tests, the tour, and the rule that every loop is gated on
Ambient.motion.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
- Settings closes from the spot where the gear opens it; the corner
  back button is gone.
- The frost overlay overflows the window more at the bottom and sides,
  so idle frost no longer covers the last row of content, and a soft
  clear patch keeps the header controls visible.
- Disconnected looks dormant and stale: light fixed frost, dimmed
  tiles with muted arcs and numbers, fans stopped.
- frostInk token for frost that stays visible on every style.
- Turning interface sounds on plays its cue once the bank has loaded.
- The header mark and gauge arcs render on the software renderer.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
…e lookup, sound retry

- Frost no longer announces a profile change at every start: the voice
  gets a connected snapshot only from the first telemetry frame of a
  connection, and an empty profile is never said or counted as a change.
- Guard and gaming read false from a disconnect until the first frame
  of the next connection, so a daemon restart cannot replay a flash
  freeze from stale data. The stale readings stay on screen, dimmed.
- The thaw blends from the held frost to the live idle target, so it
  ends without a jump when the target moves or the daemon drops.
- Style names are validated against the style list; a settings file
  naming an object built-in falls back to the default style.
- Sound that failed to load retries on a later cue after a cooldown
  instead of staying unavailable until toggled.
- Timing tests wait on conditions instead of fixed delays.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
The frost sat above the whole window, so ice covered labels and
buttons. It now sits between the backdrop and both pages: every
label, icon, control and panel is drawn above it in every state,
including the guard sweep.

- Main.qml: frost and its crossfade ghost move below the pages; the
  header clear patch is gone (QML, shader, .qsb).
- Retuned for the new layer: bleed 28/32/40 px, idle max 0.48,
  dormant 0.42, held 0.60, sweep peak 1.0.
- Panels take part in the flash freeze without being covered:
  Ambient.edgeIce eases the border and the facet highlight toward
  frostInk through sweep, hold and thaw.
- New panelOpacity style token (panel fill only). All four styles
  ship at 1.0: at 0.86 the worst-case contrast test fails on the
  three dark styles.
- Blackout muted #7A7A7A to #7D7D7D (4.44:1 on the iced panel top).
- Tests: stacking order replaces the clear patch tests; contrast
  helper reads panelOpacity.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
With the frost behind the content, labels that sit straight on the
backdrop had fern behind them: section titles lost their first
letters while the guard held, and the gear and the Settings close
button sank into the top-right corner.

- Clearing.qml: a feathered backing behind an on-backdrop label, in
  the colour the backdrop has at that spot (Backdrop.colourAt), so
  it is invisible where there is no frost. Static Canvas, no timers,
  works on the software renderer. Opacity follows the frost amount
  and is 0 with effects off.
- Applied to every section title, both header subtitles, the dGPU
  load row and the footer lines.
- IconButton gains an opt-in round keycap; the gear and the Settings
  close button use it.
- tour.py: new footer-held scene.
- Tests: stacking order, no layout cost, opacity gating, colourAt
  against the drawn backdrop, keycaps, and a pixel check at the held
  amount.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
@I4cTime
I4cTime merged commit 7f6d445 into main Nov 12, 2026
2 checks passed
@I4cTime
I4cTime deleted the feat/cryo-feel branch November 12, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant