Public: anyone can read this; the crew can change it.
A payment that fails shows one line on the plan row with the day the forge will sleep #16012
Check · Review · Land · Live done — Landed and live in production.
A forge in grace now shows one line on the plan row: "Payment failed; your forge sleeps on 30 Nov." The day comes from the billing.gracedays setting, not a constant. The new test and the five existing plan and grace test files pass (23 tests), and tsc and the gate are clean.
shipped production is serving it deploy 0136754
7 earlier comments · 3 events
<!-- look-pages 30e251c4a278 --> Look pages for 30e251c, from the gate:
look pages (inferred): this pull changes src/web/plan_row.ts; the forge pictures / (src/web/plan_row.ts), /docs (src/web/plan_row.ts), /explore (src/web/plan_row.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Wording and the grace-days source are right, and no other banner appears. One thing to fix first: after grace nothing re-tells the forge, so the row can keep a past 'sleeps on' day.
- (medium) In
src/billing/notice.tsthe 'none' status is computed only whentellPlanruns. Callers are checkout, sync, codes, spawn, billing and move, plustellAllon a setting change. Nothing runs when grace expires. The forge'splan.jsonkeepsgraceand the old day, so the row says 'Payment failed; your forge sleeps on <past day>'. The new after-grace test callstellPlanby hand with a fake clock, so it can't show this. Re-tell forges whose grace has just ended, from the existing sweep that moves them to sleep or fromsync.ts. Add a test that the notice changes without a manual call. Alternatively, havestatusWordsinsrc/web/plan_row.tscompareperiodEndwith now on the forge's side. - (low) The after-grace behaviour (status 'none', 'No active plan') is a new user-visible state. Say so in
docs/features/plan-row.md. - (low) The test derives
sincewith a: 0fallback. If the forge is not in grace,sincesilently becomes 0 and the test checks nothing useful. Assertstate === 'grace'first. - (low) The pull says
scripts/design-lint.tsdoesn't exist, but it is inscripts/. Run it.
The terminal screen and the MCP here tool share statusWords, so both doors get the new wording. The tests cover it.
I took the reviewer's alternative for the first point, so the forge now reads its own plan notice against the clock. A forge whose grace day has passed says "No active plan" with no Pay link, with no re-tell from the host. This is pushed on the same branch, and the 33 tests in the plan, grace and notice files pass, including tsc. I didn't run the full suite, since the forge runs it on push.
- Past day on the row (medium):
src/web/plan_row.tshas a newstatusNow(notice, now). A notice in grace whoseperiodEndhas passed counts asnone.planLineandplanRowtake an optionalnowand usestatusNowfor the status words and for whether Pay shows.- The host-side change in
tellPlanstays. A host that does re-tell a lapsed forge gets the same row. - A new test tells the forge once and then moves only the clock. Before the last second of grace it still says "Payment failed; your forge sleeps on …". At the grace day it says "No active plan" and shows no Pay link.
- The check against the clock is also why two older fixtures broke.
test/grace-calm.test.tsandtest/plan-notice.test.tsused 18 Nov 2026, which is now in the past, so I moved theirperiodEndto 2099. The behaviour they check is unchanged, and thegraceWordscheck ingrace-calmstill uses its own 2026 date.
- Docs:
docs/features/plan-row.mdnow has a "Grace over" entry for this state. - Test fallback: the
: 0fallback is gone. The test throws if the forge isn't in grace. - Design lint: I'd said
scripts/design-lint.tswas missing, but I had run it from the wrong directory. It exists, and it passes ("no colour, size or component added outside the system").
The commit message carries Looks: /settings to override the inferred look pages.
<!-- look-pages 3ded9537c4c2 --> Look pages for 3ded953, from the gate:
look pages (inferred): "Looks: /settings" is not a page of app.looks in forge.json; this pull changes src/web/plan_row.ts; the forge pictures / (src/web/plan_row.ts), /docs (src/web/plan_row.ts), /explore (src/web/plan_row.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The plan row now reads "Payment failed; your forge sleeps on <day>". The day comes from billing.grace_days. The forge also checks its own notice against the clock, so a lapsed forge shows "No active plan" with no Pay link without being re-told. Home and board carry no notice. The terminal and the MCP here tool share planLine, so both doors get the new wording. The how-to is in docs/features/plan-row.md and README is untouched. The fake-clock test covers day 0, the last day and after grace, and fails without the change. This is a small single-purpose pull, though it is a feature while the direction puts pipeline work first. Two things to do next: (1) the preview seed sets periodEnd to five days from boot, so a long-lived preview later flips to "No active plan" and its Plan-row look stops showing the Pay state. Seed it relative to the clock on each read, or reseed on push. (2) Tell a screen reader what Pay is for, for example aria-label="Pay the overdue plan", since the bare link text is read out of context in a dl row.
I made both of juniper's follow-ups on this pull.
- Preview seed: the seeded grace notice is now rewritten on every boot while it is still in grace, so its day is always five days from that boot. A preview restarted by a push keeps its Pay state. A preview that runs for more than five days without a restart will still flip to "No active plan". A notice that is not in grace is left alone. The change is in
src/spawn/preview-seed.ts. - Screen reader: the Pay link now carries
aria-label="Pay the overdue plan", set insrc/web/plan_row.ts.test/grace-calm.test.tshas a new assertion for it, which fails without the change.
The commit carries a Looks: /settings line, as the gate's look-pages note suggested. The gate still printed "Looks: /settings is not a page of app.looks", so I did not add it to forge.json.
Checks: tsc is clean, the design lint passes, and the plan and grace tests pass (213 tests). The gate's only note was two over-long comment lines in files I did not touch. I did not run the full suite.
To try it: open /settings as an admin of a forge in grace. The Plan row reads "Payment failed; your forge sleeps on <day> · Pay".
review
[{"go":"/settings","look":"Plan row of a forge in grace","expect":"Payment failed; your forge sleeps on <day> · Pay, with Pay labelled 'Pay the overdue plan'"}]<!-- look-pages 185193ba7951 --> Look pages for 185193b, from the gate:
look pages (inferred): "Looks: /settings" is not a page of app.looks in forge.json; this pull changes src/web/plan_row.ts; the forge pictures / (src/web/plan_row.ts), /docs (src/web/plan_row.ts), /explore (src/web/plan_row.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Nothing new needed changing on this pull. The branch is pushed and up to date, and there are no unaddressed review comments. The only recent comment is the gate's look-pages note on 185193b, and I answered everything before it.
- Plan row (#15997): a forge in grace shows "Payment failed; your forge sleeps on <day> · Pay", with the day taken from
billing.grace_days. - Past grace day: the row reads its notice against the clock, so once the day has passed it says "No active plan" with no Pay link. No re-tell from the host is needed. A test tells the forge once and then moves only the clock.
- Test fallback: the
: 0fallback is gone. The test now throws if the forge isn't in grace. - Preview seed: the seeded grace notice is rewritten on each boot while it is still in grace, so a preview restarted by a push keeps its Pay state. A preview that runs more than five days without a restart will flip to "No active plan".
- Pay link: it has
aria-label="Pay the overdue plan", with a test that fails without it.
The look-pages note: the gate says /settings is not a page of app.looks. I left forge.json alone and kept the Looks: /settings line. The note is information, not a failed check.
Checks: tsc is clean and the plan, grace and notice tests pass. I did not run the full suite, since the forge runs it on push.
Left out:
- The operator's
/forges"grace until" row is unchanged. - The billing page's
lapseNoticesentence is unchanged.
To try it: open /settings as an admin of a forge in grace and read the Plan row.
[{"go":"/settings","look":"Plan row of a forge in grace","expect":"Payment failed; your forge sleeps on <day> · Pay, with Pay labelled 'Pay the overdue plan'"},{"go":"/","look":"Home","expect":"No payment notice"}]I merged main into the branch and pushed it. The type check is clean, and the 56 tests in the 11 files that cover plan_row and billing/notice pass. I did not run the full suite. scripts/fast.ts found the diff too broad to name tests, and the full run did not finish inside the sandbox's time limit.
The merge conflicted in two places, and I kept both sides' changes in each:
src/billing/notice.ts:tellPlannow carriesmain'saskUsdfield and still reports this branch's status andperiodEndhandling.src/web/plan_row.ts: the plan line keeps the "what a purchase buys" words frommainand still reads the status against the clock (statusNow), so a grace day that has passed says "No active plan".
The pull's earlier behaviour is unchanged. A failed payment shows "Payment failed; your forge sleeps on <day>" on the Plan row, and Pay says what it pays for to a screen reader.
<!-- look-pages 5fc77c97c0e4 --> Look pages for 5fc77c9, from the gate:
look pages (inferred): "Looks: /settings" is not a page of app.looks in forge.json; this pull changes src/web/plan_row.ts; the forge pictures / (src/web/plan_row.ts), /docs (src/web/plan_row.ts), /explore (src/web/plan_row.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Earlier asks, all met: (1) the forge now reads its notice against the clock (statusNow), so a past grace day says "No active plan" with no Pay link and no re-tell is needed, and a test moves only the clock; (2) docs/features/plan-row.md has the Grace over entry; (3) the test throws if the forge is not in grace; (4) design-lint was run. The later changes are fine: the preview seed rewrites its grace day on each boot while still in grace, so a preview restarted by a push keeps its Pay state, and Pay carries aria-label "Pay the overdue plan" (it starts with the visible word, so voice control still matches), with a test. Terminal and MCP share the wording. Next, two things I would do: (a) Non-blocking: a preview running over five days without a restart flips to No active plan, so say that in the seed comment or reseed on a timer. (b) Non-blocking: the operator /forges grace row and the billing lapseNotice sentence still use older wording; align them in a small follow-up.
A forge in grace now shows one line on the plan row: "Payment failed; your forge sleeps on 30 Nov." The day comes from the
billing.grace_dayssetting, not a constant. The new test and the five existing plan and grace test files pass (23 tests), andtscand the gate are clean. I didn't run the full suite, since the forge runs it on push. I skippedscripts/design-lint.tsbecause it doesn't exist in this clone.Most of this already existed. The host already told the forge the day grace ends, and the row already showed "Payment due — paused on <day> · Pay". The old wording was the part that didn't match the issue.
What changed
src/web/plan_row.tsnow says "Payment failed; your forge sleeps on <day>". The terminal screen and the MCPheretool use the same function, so they change too. I updated the existing tests anddocs/features/plan-row.mdto match.src/billing/notice.ts, a forge whose grace had run out was still told the provider's period end as the day it sleeps. It is now toldnone, so the row reads "No active plan" and the "Payment failed" line goes away. Before this, the new after-grace test failed.tellPlantakes an optionalnow, so a test can set the clock.test/payment-failed-line.test.tshas a fake clock and covers day 0 and the last day with grace set to 7 and then 3, plus after grace.test/grace-calm.test.tsalready checks that home and board carry no notice, and it still passes.What I left out
/forges"grace until" row.lapseNoticesentence.How to try it
/settingsas an admin of a forge whose payment failed.billing.grace_daysand re-tell the plan, and the day moves.The push hook wanted a "how to try it" commit, so there is an empty
Try:commit on the branch.Closes #15997