Skip to content

Make the panel demos live, and true to the app - #50

Merged
ishanmalu merged 2 commits into
mainfrom
site-live-brightness
Sep 4, 2026
Merged

ishanmalu merged 2 commits into
mainfrom
site-live-brightness

Conversation

@ishanmalu

Copy link
Copy Markdown
Owner

Two things: the brightness and Night Mode controls now act on the page, and a deep audit of the homepage against the app source turned up several places where the demo showed something Perch does not do.

The controls work

The brightness slider dims the page and Night Mode warms it.

Brightness reuses the app's own mechanism rather than approximating it. Where Perch has no backlight to move it floats a black overlay above everything, click-through, clamped at 0.85 so the slider never disappears (Brightness.swift:97). The page does the same with a fixed scrim and the same clamp.

Night Mode needs two layers. Multiply takes blue out of anything light, but against a near-black backdrop it multiplies to near-black, so the dark theme would not shift at all. A screen layer lifts red and green in the shadows, and the pair reads as one warm ramp in either theme.

Both are real controls now: pointer drag with capture, arrow and page keys, Home and End, and the ARIA a span with a click handler was missing.

The demo was showing things the app does not do

Sound was missing entirely — the headline feature of 1.9.0 was nowhere on the homepage. It is now the sixth tab, with no trace drawn, because volume is a setting rather than a measurement and the app omits the graph there too.

GPU showed a ranked list of processes. Perch has no per-process GPU breakdown; gpuDetail is the renderer and its thermal state. The page's own caption already said so, so the widget was contradicting the words next to it. Disk and network had a milder version of the same problem — both are value rows in the app, and network is two right-aligned columns. Only CPU and memory rank anything, so only they keep bars.

Memory was tinted purple against .green in SystemMetric.tint.

Bugs found on the way

  • The footer read 1.8.0 in three places, through two releases. The release workflow now refuses to publish if the homepage does not name the version being tagged.
  • Switching metric kept the previous one's headline formatter until the next 1.5s tick, so memory briefly rendered as a percentage.
  • Reduced motion drew no trace at all — the path only ever got a d from the animation frame, so the graph was blank for anyone who asked for less movement.
  • The metric tabs were divs with a click handler, unreachable by keyboard.
  • The Privacy section never closed its .wrap.
  • "4 MB" was neither the 2.5 MB download nor the 7 MB install.
  • cd perch after cloning Perch fails on a case-sensitive volume.
  • Privacy said two network features; downloading an update is a third.

Verified

Every tab driven in a browser in both themes: headline, caption, row shape and trace checked against the app source; brightness drag, release, keyboard and clamp; Night Mode on and off, light and dark.

Noted, not fixed

nudgeAll() in Brightness.swift:82 has no callers — brightness has no shortcut, which is why the slider is captioned "in the panel". Either wire it to a hotkey or delete it.

The Screen tab demo had a brightness slider drawn at 100 with a knob
painted at zero, and a Night Mode toggle that only wrote a caption. Both
are now live: dragging the slider dims the page, and Night Mode warms it.

Brightness reuses the app's own mechanism rather than approximating it.
Where Perch has no backlight to move it floats a black overlay above
everything, click-through, clamped at 0.85 so the slider never disappears
(Brightness.swift). The page does the same with a fixed scrim.

Night Mode needs two layers. Multiply takes the blue out of anything
light, but against a near-black backdrop it multiplies to near-black, so
the dark theme would not shift at all. A screen layer lifts red and green
in the shadows, and the pair reads as one warm ramp in either theme.

The slider is a real slider: pointer drag with capture, arrow and page
keys, Home and End, and the ARIA a span with a click handler was missing.
It is captioned "in the panel" because brightness has no shortcut —
nudgeAll() in Brightness.swift is unreferenced.

Also fixes the scrim being declared after the script that looks for it,
which left the whole block skipped.
The demo panel had drifted from the app it claims to be a picture of.

Sound was missing entirely — the headline feature of 1.9.0 was nowhere on
the homepage. It is now the sixth tab, with no trace drawn, because volume
is a setting rather than a measurement and the app omits the graph there
too. The capability grid says plainly why there are no per-app sliders.

GPU showed a ranked list of processes. Perch has no per-process GPU
breakdown and never has; gpuDetail is the renderer and its thermal state.
The page's own caption already said so, so the widget was contradicting
the words beside it. Disk and network had the same problem in a milder
form: both are value rows in the app, not bars, and network is two
right-aligned columns. Only CPU and memory rank anything, so only they
keep bars.

Memory was tinted purple against .green in SystemMetric.tint.

Also in this pass:

- The panel footer read 1.8.0 in three places, through two releases.
  The release workflow now refuses to publish if the homepage does not
  name the version being tagged.
- Switching metric kept the previous one's headline formatter until the
  next 1.5s text tick, so memory briefly rendered as a percentage.
- Reduced motion drew no trace at all: the path only ever got a `d` from
  the animation frame, so the graph was blank for anyone who asked for
  less movement.
- The metric tabs were divs with a click handler, unreachable by keyboard.
- The Privacy section never closed its .wrap.
- "4 MB" was neither the 2.5 MB download nor the 7 MB install.
- `cd perch` after cloning Perch fails on a case-sensitive volume.
- Privacy said two network features; downloading an update is a third.
- Dropped two screenshots byte-identical to the pair the README uses.
@ishanmalu
ishanmalu merged commit d190278 into main Sep 4, 2026
1 check passed
@ishanmalu
ishanmalu deleted the site-live-brightness branch September 4, 2026 18:39
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