feat: faster, correct preset editor; default presets use their own pattern

- Editing a preset can change its pattern (the dropdown was disabled).
- on, off and rainbow are built-in patterns and are always listed, so the
  editor no longer falls back to the first pattern (aurora) for them.
- The editor loads the pattern names once and only the selected pattern's
  definition (new GET /patterns/names and GET /patterns/<name>).
- A shared GET cache (fetch_cache.js) reuses profile, palette, zone, preset,
  group and pattern lookups; any write clears it and entries expire at 30 s.
- The seeded rainbow preset uses the rainbow pattern.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-11-10 01:46:11 +13:00
1 parent d4118072f6
commit 38162d4b89
9 files changed
+189 -81

No files matched your search

+2 -2
View File
@@ -69,9 +69,9 @@ def test_clone(c, profile):
assert c.delete(f"/profiles/{clone}").status_code == 200
def test_seeded_rainbow_uses_colour_cycle(c, profile):
def test_seeded_rainbow_uses_rainbow(c, profile):
presets = c.get("/presets").json().values()
assert next(p for p in presets if p["name"] == "rainbow")["pattern"] == "colour_cycle"
assert next(p for p in presets if p["name"] == "rainbow")["pattern"] == "rainbow"
def test_delete(c):