The Plan row in a forge's settings (#11141)
A forge's admins see one status-rows dl row (Plan) at the top of /settings: the plan's name and size, the crew credit used this month, and the status (Active, or in grace Payment due — paused on <day> · Pay, #11394). With a billing portal set and a Stripe payer, Manage billing links to the provider's customer-portal sign-in (the buyer signs in with the email they paid with); Change size links to the host's /pricing. A forge with no notice (never told, or a host that is not its parent) shows no row.
- Grace (#11394): while a payment is late the row says
Payment due — paused on <day>(the day grace ends, UTC) followed by one Pay link: the provider's portal when one is set, else the host's/pricing. Pay takes the place of Manage billing, and when Pay already goes to/pricing, Change size is dropped so the row never offers two links to one place. Home and board carry no notice. - Operator: on the host's
/forges(operator only) a forge in grace showsgrace until <YYYY-MM-DD>in its row (graceWordsinsrc/spawn/clients.ts); the terminal's forges screen says the same. - Host: Settings → Billing → Billing portal sets
billing.portal_url(https only, empty clears). Changing it tells every forge sent from here. - How a forge learns its plan: the host writes a notice (
src/billing/notice.ts) into that one forge's ownplan.json(neverparent.json) when the forge is made, a gift is redeemed, a plan is granted, or Stripe changes the subscription. The forge reads only its own file and calls nothing on the host, so it cannot read another forge's plan; the notice has no forge name, customer or subscription id. - Terminal: the palette entry Plan (
src/tui/screens/planrow.ts, any admin) shows the same plan line (planLine) and, for an admin who is a person, sets the billing portal address with Enter throughchangePortalUrl, as the page does. - Preview (#11549): a preview is seeded in grace (
seedGraceinsrc/spawn/preview-seed.ts, only whenFORGE_APP_ENV=preview): its ownplan.jsonsays payment is late and one client forge is in grace, so the forge's looks of/settings(the Plan row) and/forges(grace until <date>), light and dark, desk and phone, are on every pull's looks page (PREVIEW_OWNER_LOOKS).