Skip to content

feat(web): the dashboard takes the iOS app's palette - #1857

Merged
frahlg merged 1 commit into
masterfrom
web-ios-palette
Oct 25, 2026
Merged

frahlg merged 1 commit into
masterfrom
web-ios-palette

Conversation

@frahlg

@frahlg frahlg commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Why

Fredrik, 25 October 2026: the web app should take the iOS design, step by step, and the box page and the web app should take the iOS palette together ("Båda, i par"). They share color tokens: scripts/check-token-drift.mjs in srcfl/ftw-webapp holds them equal.

This is the box half. The web app half is srcfl/ftw-webapp#109. Merge both together.

The palette

From the iOS app (ftw-app appleApp/FTWCharts/Theme.xcassets), light / dark:

Role Light Dark
ground / raised / hairline F5F6F8 / FFFFFF / DCE0E7 05080F / 0B111C / 1B2433
ink / ink2 / ink3 0A0F1A / 545E70 / 677184 EEF3FF / 9AA5B8 / 727D90
solar 8A6C00 FFE14D
battery storing (and its level) / giving 00739A / A35700 18D9FF / FFB000
grid, both ways C2186F FF5FA8
car 6A48D8 B69CFF
live (a state) / alarm (a state) 2F7A00 / D70015 83F52C / FF453A
  • Energy and state are apart. The red/green names used to mark both the grid's direction and ok/failed. Every use was classified: grid direction stays on the energy role, which is now one pink both ways, with the sign and the word saying buy or sell. ok, connected and done → --live. Failed, refused, blocked and danger buttons → --alarm. New in both files: --live, --alarm, --energy-gives.
  • The accent is ink, as the iPhone's tint: primary buttons are ink with the ground for text (--on-accent). About 15 places that hard-coded black or white text on the accent now read --on-accent.
  • Prices are levels of ink, never red or green. Negative prices stay solar.
  • Freshness: --fresh-live is --live, and --fresh-stale is ink2.

Before and after, the box page against the home box (read only) and the web app on the demo:

Choices a reviewer may want to change

  1. Warnings that need no action now use --alarm in some places: control warnings (as the iOS control sheet does), the forecast's "waiting for data", and "charger saved with warnings". "Unconfirmed" in Plan could be ink2 instead.
  2. The fuse bar no longer turns yellow at 70 %. It stays grid like the iOS meter, and turns alarm from 90 %.
  3. Accent used as a warning now shows ink: the plan "warn" badge, editor warnings, WARN log lines and diagnostics "degraded".

Not done yet

Canvases and palettes with raw hex values do not read roles, so they keep the old colours. This covers the box's plan.js price bars (green/red) and charge/discharge, the energy-history.js series, heating.js, BATTERY_PALETTE/EV_PALETTE in app.js, and some raw rgba in style.css. The webapp's stats page has its own palette. These are the next step.

Open PRs that touch the same files

These will need a rebase after this merges: #1832 (style.css, lan-auth.js), #1792 and #1789 (app.js), #1751 (energy-flow-readings.js), #1547 (style.css). Most of the overlap is single colour lines.

Checks

  • npm test: 886/886. Palette assertions in web/theme-unification.test.mjs and web/header-status-marks.test.mjs are updated, and a new test checks grid, gives, live and alarm in both themes.
  • make verify passes.
  • Against the web app branch, check-token-drift.mjs reports 35 vendored token names checked in both themes, with no drift.
  • In the browser, against the home box through a GET-only proxy that refuses /api/config: Overview in dark and light, before and after. The repository asks a person to inspect the rendered page before merge.

🤖 Generated with Claude Code

theme.css now carries the phone's colours: a blue-black ground, ink for
the interface, one grid hue both ways, solar, a battery that stores in
cyan and gives in orange, a violet car, and two states, --live and
--alarm. --green and --red now alias those states; energy keeps the -e
names.

Every use of a red, green or amber name is sorted into energy or state.
States (ok, connected, done, failed, blocked, danger buttons, warnings
that need action) move to --live or --alarm; warnings that need no
action move to ink2. Battery, car and solar flows that sat on the grid
names move to their own hue. Prices and savings become ink levels.
Text on an accent fill reads --on-accent, now that the accent is ink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T17:34:35.673737Z 6d8e870 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@frahlg
frahlg merged commit 286ac14 into master Oct 25, 2026
17 checks 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