Heat: seven steps on human boundaries; recolour the wordmark
JP's spec for the heard-age scale, replacing the four-step ladder: white under 5 minutes, then yellow at 5m, light red at 1h, brown at 1d, red at 1w, light grey at 1mo, and one cold grey for over a year — which is also "never heard", since past a year the distinction stops earning a colour. The `heat.*` styles are renamed for what they describe: a node heard eight minutes ago is `heat.minutes`, one heard eight days ago is `heat.days`. The old hot/warm/cool/cold read as temperature but had to carry an age, and at seven rungs that stopped being sayable. The steps themselves move into a table, so the ladder is one thing to read. Three of the seven land in the VT's dim bank, so they say `not bold` — a selected row would otherwise jump them a rung (brown to yellow, red to light red), which is the one way a heat colour can lie about an age. The splash wordmark's vertical ramp becomes white / yellow / light red / red / light black, each picked to quantize onto exactly one palette slot (15, 11, 9, 1, 8) while staying a warm fade in truecolour. Its rows are art rather than renderables, so they had never passed through the fold and the console was downsampling them on its own — they do now, which is what makes the slot choice hold. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d79d85b7ee
commit
5aeb034c06
7 files changed
+96
-35
No files matched your search
@@ -270,6 +270,34 @@ def test_node_type_marks_stay_distinct_on_the_console() -> None:
|
||||
assert theme.mark_rgb("type.repeater") != theme.mark_rgb("muted")
|
||||
|
||||
|
||||
def test_heat_ladder_walks_jps_seven_slots_in_order() -> None:
|
||||
"""The heard-age scale, pinned to its spec: seven steps on plain human boundaries.
|
||||
|
||||
White under 5 minutes, then yellow, light red, brown, red, light grey, and one cold
|
||||
grey shared by "over a year" and "never heard".
|
||||
"""
|
||||
from meshterm.ui.widgets import _recency_style
|
||||
|
||||
set_platform(PICOCALC)
|
||||
slots = {hex_: slot for slot, _, hex_ in theme._VT_SLOTS}
|
||||
expected = [
|
||||
(60, 15), (299, 15), # under 5 minutes — white
|
||||
(300, 11), (3599, 11), # 5 minutes — yellow
|
||||
(3600, 9), (86399, 9), # 1 hour — light red
|
||||
(86400, 3), (604799, 3), # 1 day — brown
|
||||
(604800, 1), (2591999, 1), # 1 week — red
|
||||
(2592000, 7), (31535999, 7), # 1 month — light grey
|
||||
(31536000, 8), (None, 8), # 1 year, and never — dark grey
|
||||
]
|
||||
for secs, slot in expected:
|
||||
style = MESH_THEME_16.styles[_recency_style(secs)]
|
||||
assert style.color is not None and style.color.number == slot, (secs, style)
|
||||
assert not style.bold or slot >= 8, f"bold on dim slot {slot} would jump a rung"
|
||||
# The regular platform answers the same question with a continuous hue instead.
|
||||
set_platform(REGULAR)
|
||||
assert _recency_style(1200).startswith("#")
|
||||
|
||||
|
||||
def test_canvas_drops_emphasis_where_bold_means_brightness() -> None:
|
||||
"""A braille canvas may not embolden on the console: the VT would recolour the run.
|
||||
|
||||
|
||||
Reference in new issue
Block a user