Repository navigation
Rebuild the home page around savings, the planner, AI and the app - #33
Conversation
The home page now says plainly what FTW does for a household and how to get it, in the iPhone app's Phosphor look. - Savings: an example day compares the same simulated home with and without a plan. Charging the car at night and holding the battery for the peaks takes the day from 77.77 to 50.40 kr. savings-model.mjs holds the model; a test checks the energy balance, the battery limits, equal ending storage and that the page's numbers match. The page labels it an example, not a measured result. - Planner: inputs, Energyplan, Core's checks and the command receipt, with the example day drawn as the app's plan dial. - AI: one MCP address and setup steps for Claude, ChatGPT, Grok, Cursor, Claude Code and Codex, from srcfl/ftw-plugin, plus an example chat and the access rules. - App: a recording of Now and real screens of Plan, Car, History and Price from the app's demo (ftw-app 95af454), shown as a tour. - Get FTW: a waitlist for Sourceful Energy Gateways set up for FTW, next to Home Assistant and Linux installs. - News with a newsletter sign-up, and a larger Discord block. Both forms post to /api/signup in the Pages worker, which stores the address, list, optional country and consent version in a separate D1 binding, SIGNUPS_DB. Without the binding it answers 503 and the forms say sign-up is closed. The privacy notice, in English and Swedish, describes the lists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a0e4c31b4
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <p class="stage-label">Waitlist · FTW box</p> | ||
| <h3>A box, ready to go.</h3> | ||
| <p>We have a stock of Sourceful Energy Gateways, built on the Raspberry Pi 4. We plan to sell them set up for FTW. Join the waitlist and we'll email you first when orders open, with the price and shipping.</p> | ||
| <form class="signup" data-list="gateway" novalidate> |
There was a problem hiding this comment.
Prevent native GET submission of signup addresses
When JavaScript is disabled or the module has not loaded, this form remains usable but defaults to a GET submission to the current page because it has neither method nor action. Submitting therefore puts the email address and country into the URL and browser history without actually registering the signup. The newsletter form has the same issue. Disable submission until the handler is installed, or provide a safe POST fallback, so an unavailable script cannot expose signup data in URLs.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying ftw with
|
| Latest commit: |
3e6ce9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4db557d1.ftw-613.pages.dev |
| Branch Preview URL: | https://web-clearer-story.ftw-613.pages.dev |
Fredrik liked the dark design from #33 better than the editorial reset in #34, but not its generic look. This keeps the app's dark ground and energy colours and drops what made it read as a template: no glows, gradients, rounded cards, pill buttons, scroll fades or grey second halves in headings. The layout stays editorial: a label rail beside the text, ruled lists, square corners, hairlines, underline form fields and the transcript. Headings use weight, not colour, for their one stressed word. The chart, plan dial and receipt use the app's energy colours, and the savings rail shows the example day's prices as the app's block bars. The page no longer loads sourceful.css; the other pages still do. Co-authored-by: Claude Opus 5.5 <[email protected]>
Problem
The home page did not say what FTW saves or how the planner works. It named only ChatGPT, though the FTW plugin already works in Claude, Grok, Cursor and Codex. Its app pictures came from an older build. It had no way to join a list for the Sourceful Energy Gateways we want to sell, no newsletter, and Discord was a small link.
What changes
The page now follows the iPhone app's Phosphor look (dark ground, ink interface, one colour per kind of energy, from
ftw-app'sTheme.xcassets) and runs in seven parts:srcfl/ftw-plugin's README. An example chat matches the example day. ChatGPT is marked as waiting for its directory listing.ftw-app95af454 on an iPhone 17 Pro simulator.Both forms post to
/api/signupin_worker.js. It takes same-origin JSON only, checks the address, list and country, ignores a filled hidden field, and gives the same answer for a new and a known address. Rows go to a new D1 binding,SIGNUPS_DB(signups.sql), kept apart from the anonymousFUTURE_DBvotes. Each row records a consent version that the newprivacy#emailsection describes, in English and Swedish. Motion respects Reduce Motion.Before this goes live
ftw-signups(32851378-602c-4b71-b3ea-69e85acff569) created in the EU jurisdiction,signups.sqlapplied, bound to the Pages project asSIGNUPS_DBfor production and preview next toFUTURE_DB. No other project setting changed.Evidence
node --test tests/*.test.mjs: 32 passed, 0 failed. New:tests/signups.test.mjs(storage, normalising, duplicates, bad input, origin, honeypot, missing binding) andtests/savings-model.test.mjs(energy balance each hour, battery limits, car energy and deadline, equal ending storage, page numbers match the model).[email protected],gateway,SE,gateway-2026-10-30; an invalid address was refused on the page.🤖 Generated with Claude Code