Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to Patternflow will be documented in this file, newest first
- **A module's data now goes to PSRAM first, as its code already did.** Only a module that holds no internal RAM at all is kept, so the console and Wi-Fi give up nothing for parked patterns. Measured A-B-B-A on two boards: 13 of 16 module runs within noise (-1.1..+0.8%), Burgers +2.6% (38.9 -> 39.9 ms a frame), Wave Cascade +2.2%, Breakout Arcade +0.85%; in exchange 4-6 KB more internal heap with a module running, up to 9.9 KB.
- **Parked patterns give their memory back.** Least recently used first, whenever a new load would otherwise start with less than 4.5 MB of PSRAM free (the most one pattern may allocate, plus 512 KB), and whenever a running pattern's own allocation would leave less than 512 KB. A pattern installed, replaced or deleted - from the console, or by a feature that installs patterns - is never resumed from the old file. Checked on two boards with 12-13 modules parked: internal heap stayed flat, an install emptied the table and PSRAM came back by exactly the parked bytes (683 KB), and with five 1.5 MB test modules PSRAM never fell under about 3.1 MB free, with no refused load. `/api/status` gains `load.resumed`, `load.resumeUs` and `moduleMemory.resident`.
- **What this takes away:** a pattern that wants a fresh start every time it is picked cannot have one. `setup()` runs once per load, as `firmware/CUSTOM_PATTERNS.md` now says.
- **The console is light, and its six core pages look like one thing.** It opens light; dark is still the toggle in the header, and a choice made there is remembered. Console, Patterns, Status, Wi-Fi, Knobs and Update now share one set of parts - buttons, chips, list rows, fields, notices, section titles - from a base block every page opens with (`console/README.md`, "The look"), with one accent, the LED orange, kept for what is live: the current tab, the playing pattern, the panel being on. The home page leads with the panel itself: what is playing with its arrows, on/sleep, brightness and the four knobs, with the device's facts under them in the same card; the arrow keys step through patterns as the arrow buttons do. Which edition the panel runs has a card of its own instead of being one more row among the facts: its name, its versions, the feature pages it carries as links, the update notice when there is one, and a button to the other editions (or a line saying the panel's own hotspot has no internet). The numbered index of every page with a paragraph each is now a list of one-line links. The header no longer scrolls sideways on a phone: Console and Patterns, the build's own feature pages, then Wi-Fi, Knobs, Update and Status, wrapped onto rows. Long explanations are a line, with the rest behind a disclosure where it is needed. Windows showed every small label in Courier New because no font in the monospace list was a Windows one; the list now includes Cascadia Mono and Consolas. The Knobs page has an *All* row that sets direction and edges per click for the four at once (it reads *Mixed* while they differ). The Status page shows the crash record (`crash` in `/api/status`) when there is one, with a button to clear it. Feature pages are not edited and take the light palette from the header. Home is 8.9 KB gzipped (was 10.9), Knobs grew by 0.15 KB for its All row, the others are the same or slightly smaller, and the header script is 9.6 KB. On a panel on the home network a page still opens in about 0.1 s the first time and in under 0.01 s after. Every request, control and message the pages had is still there; checked on a panel by stepping through patterns, sleeping and waking it, dimming it, dragging a knob and playing a pattern from the list. The guide's live console demo is regenerated to match.

## [3.10.5] - 2026-10-02

Expand Down
22 changes: 22 additions & 0 deletions firmware/patternflow/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ is editable the same way. The chrome draws itself inside a shadow root
page, so do not style or query its insides. What a page may use is
`window.PF`, below.

## The look

The console is light unless someone picks dark. The choice is the toggle in
the header, kept in `localStorage` as `pf-theme`, and the chrome sets
`data-theme` on `<html>` before the first paint. Every core page opens its
`<style>` with the same base block (the `Console base` comment): the tokens,
light in `:root` and dark under `html[data-theme=dark]`, then the parts every
page shares: `.btn` (`.pri`, `.dan`, `.sm`), `.chip`, `.notice`, `.list`,
the fields and the footer. Copy it rather than restyle it, and leave out the
rules for parts a page never uses. Identical text costs almost nothing
gzipped, and a page that is a little different is how the console stopped
looking like one thing before.

The chrome injects the same light palette for every token name a page might
use, which is what turns the feature pages light without editing them. If
you change a light token value, change it in the chrome (the `html:root[data-theme=light]`
rule in `theme_index.h`) and in every core page's `:root` together, or the
chrome's copy wins. The accent is the LED orange, and only for what is live:
the current tab, the playing pattern, the panel's on state. Labels are
sentence case in the sans; mono is for numbers, addresses, versions and
file names.

## Writing a page: `window.PF`

The panel's web server answers one connection at a time, and on its own
Expand Down
Loading
Loading