Skip to content

Colors pane: popover edits actually save, headers name the columns - #8

Merged
camwilso merged 1 commit into
mainfrom
fix/colors-pane-states
Aug 14, 2026
Merged

Colors pane: popover edits actually save, headers name the columns#8
camwilso merged 1 commit into
mainfrom
fix/colors-pane-states

Conversation

@camwilso

Copy link
Copy Markdown
Owner

The save bug (issue reproduced on any machine)

Color and speed edits reverted on relaunch while effect and brightness stuck. The split is the diagnosis: effect and brightness live in the row, color and speed live in the swatch's popover — and popover content hosts in its own window, across which macOS does not reliably propagate custom SwiftUI environment values. The editor silently resolved the default BoardCommands, whose closures are all no-ops, so bindingsChanged() neither saved nor repainted. The config file showed it plainly: customised brightness values everywhere, every color still a default.

Fix: the popover re-injects the model and commands explicitly. One more instance of this project's signature bug class — correct code that nothing calls.

Headers

The states table now has column headers (EFFECT, BRIGHTNESS), and the leading header teaches the pane's least discoverable control: the swatch, which hides color, hex and speed behind a click.

New defaults

Every state defaults to shallow-breath — one visual language instead of three effects — except error, which breathes deep so a failure is unmistakably not routine, and ended, which stays dark. Existing configs are untouched: saved state blocks override defaults field by field.

Focus adapts to the new resting language: a focused shallow-breathing key deepens to breath, a solid key starts breathing (the old rule, kept for anyone who configures solid back), and error/rainbow/off are left alone.

Tests

445/445. Focus-pulse tests updated to the new language, plus a new case pinning the solid-key rule.

🤖 Generated with Claude Code

Three changes, one section:

Color and speed edits vanished on relaunch — on every machine. The editor
lives in a popover, popover content hosts in its own window, and macOS does
not reliably carry custom environment values across that boundary: the
editor resolved the default BoardCommands, whose closures are silent no-ops,
so bindingsChanged() saved nothing while the swatch happily updated. The
row's own controls (effect, brightness) inherit normally, which is why only
colors failed to stick. The popover now re-injects the model and commands.

The states table gets column headers. The swatch is the least discoverable
control on the pane — it hides color, hex and speed — so its header says so
instead of naming a column.

Defaults settle on shallow-breath for every state: one visual language
instead of three effects. Two exceptions that mean something: error breathes
deep so a failure is unmistakably not routine, and ended stays dark. Focus
adapts to the new resting language — a focused shallow-breathing key now
breathes deep (solid keys still start breathing), error and rainbow are
left alone as before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@camwilso
camwilso merged commit db7400d into main Aug 14, 2026
1 check passed
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