Skip to content

feat(ui): the app takes the iOS app's palette - #109

Merged
frahlg merged 2 commits into
mainfrom
web-ios-palette
Oct 25, 2026
Merged

frahlg merged 2 commits into
mainfrom
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. Step 1 was the tabs (#108). This is the palette, paired with the box page in srcfl/ftw#1857, which shares the tokens. Merge both together.

Contract-pair: srcfl/ftw@286ac14

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.

Re-copied components

ftw-energy-flow.js and ftw-price-chart.js are copied again from the box branch, with headers stamped and digests re-recorded. The copies also bring two master changes the web app had not taken yet: the estimated-load mark, and polling that pauses while hidden (the app feeds the chart, so it skips polling).

Checks

  • npm run verify: svelte-check 0 errors, 1 133 tests, 48 stats tests, both builds. flow.test.ts battery colours updated.
  • check-token-drift.mjs against the box branch: no drift.
  • In the browser (demo, mobile width): Now, Plan and Today in dark, and Now in light, with main merged in (the four tabs).

🤖 Generated with Claude Code

frahlg and others added 2 commits October 25, 2026 18:24
tokens.css now carries the phone's colours, in step with the box's
theme.css: a blue-black ground, ink for the interface and its accent,
one grid hue both ways, solar, a battery that stores in cyan and gives
in orange (new --energy-gives), a violet car, and two states, --live
and --alarm. Freshness reads them: live is --live, stale ink2.

Every use of an energy name for a state moves: ok, done and confirmed
to --live; failed, blocked, danger buttons and warnings that need
action to --alarm. Battery and car flows that sat on the grid names
take their own hue. Savings are ink, and so are prices, through the
re-copied price chart and energy flow from the box.

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:19.811249Z 2d0e83f 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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ftw-webapp 2d0e83f Commit Preview URL

Branch Preview URL
Oct 25 2026, 05:33 PM

@frahlg
frahlg merged commit c70eb87 into main Oct 25, 2026
4 of 5 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