Public: anyone can read this; the crew can change it.

The plans on the home page show their price and what you get, and nothing bes… #11261

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The home page's "Get your own forge" section now shows each plan's price and crew credit, a "Get …" button per plan, and no longer says the forge is closed. I ran `tsc`, the gate, `design-lint`, and about 430 tests across the home, billing and plans files; all pass. The 390 px first-view budget isn't confirmed: the home-fit phone look skipped here because no chromium starts in this sandbox. `bun s…

shipped production is serving it deploy 867ab48

opened this

The home page's "Get your own forge" section now shows each plan's price and crew credit, a "Get …" button per plan, and no longer says the forge is closed. I ran tsc, the gate, design-lint, and about 430 tests across the home, billing and plans files; all pass. The 390 px first-view budget isn't confirmed: the home-fit phone look skipped here because no chromium starts in this sandbox. bun scripts/fast.ts found the diff too broad to name tests, so I did not run the full suite.

  • Price and credit: each paid plan reads "$19 a month" (49, 149 likewise) and "$5 of crew credit each month" (15, 50), taken from the plans setting. Free still reads "Free".
  • Buttons: each plan with a buy link gets an anchor "Get Small", "Get Medium" or "Get Large". Free gets "Get Free", which goes to /forges/new, the same start-a-free-forge page as the big "Get a forge" button, not a separate form.
  • After-payment line: "Your forge is made after payment; the link to open it arrives by email, usually within a few hours." shows under the rows when any buy link is set. Built-in checkout (#11138) doesn't exist yet, so nothing removes the line; it goes away when the links do.
  • Closed-accounts sentence: "This forge is not taking new accounts" and its "by invitation" variant are gone from this section. /signup already refuses with its own closed message, so I left that alone.
  • Tests: the new tests in test/plans-row.test.ts cover the acceptance list and a price change flowing to the page. test/billing-links.test.ts now expects the "Get <plan>" anchors instead of "Pay for".

Behaviour changes to check:

  • With no links and no Stripe provider, paid plans still read "Paid" with no button. I kept that so the terminal and the existing "Paid" tests are unchanged, but the issue says no "Paid" on the page, so say if you want that gone too.
  • The terminal's "Get your own forge" shares the same plan words, so it also shows the price and credit line when links are set.

To try it, open the signed-out home with the three payment links saved and read the plans under "Get your own forge".

Closes #11258

5 earlier comments · 2 events
commented

The home page's "Get your own forge" section now shows each plan's price and crew credit, a "Get …" button per plan, and no longer says the forge is closed. I ran tsc, the gate, design-lint, and about 430 tests across the home, billing and plans files; all pass. The 390 px first-view budget isn't confirmed: the home-fit phone look skipped here because no chromium starts in this sandbox. bun scripts/fast.ts found the diff too broad to name tests, so I did not run the full suite.

  • Price and credit: each paid plan reads "$19 a month" (49, 149 likewise) and "$5 of crew credit each month" (15, 50), taken from the plans setting. Free still reads "Free".
  • Buttons: each plan with a buy link gets an anchor "Get Small", "Get Medium" or "Get Large". Free gets "Get Free", which goes to /forges/new, the same start-a-free-forge page as the big "Get a forge" button, not a separate form.
  • After-payment line: "Your forge is made after payment; the link to open it arrives by email, usually within a few hours." shows under the rows when any buy link is set. Built-in checkout (#11138) doesn't exist yet, so nothing removes the line; it goes away when the links do.
  • Closed-accounts sentence: "This forge is not taking new accounts" and its "by invitation" variant are gone from this section. /signup already refuses with its own closed message, so I left that alone.
  • Tests: the new tests in test/plans-row.test.ts cover the acceptance list and a price change flowing to the page. test/billing-links.test.ts now expects the "Get <plan>" anchors instead of "Pay for".

Behaviour changes to check:

  • With no links and no Stripe provider, paid plans still read "Paid" with no button. I kept that so the terminal and the existing "Paid" tests are unchanged, but the issue says no "Paid" on the page, so say if you want that gone too.
  • The terminal's "Get your own forge" shares the same plan words, so it also shows the price and credit line when links are set.

To try it, open the signed-out home with the three payment links saved and read the plans under "Get your own forge".

commented

The home page's plans under "Get your own forge" now show each plan's price, its crew credit and a Get button, with an after-payment line. The closed-accounts sentence no longer sits in the plans section.

Check failure: my earlier commit removed the sentence from the home page entirely, and the front-page test "the door leads with the pins…" expects a closed forge to say "New accounts on this forge are by invitation." The sentence is back as its own small muted line below the "Running this for a team?" paragraph, outside the plans section. It reads "New accounts on this forge are by invitation." in invite mode and "This forge is not taking new accounts." when closed. I changed no tests.

Checks: bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts pass. test/front.test.ts, test/plans-row.test.ts and test/billing-links.test.ts pass (39 tests). I did not run the full suite; the forge's check does that on push.

To try it: open the home page signed out and read the plans under "Get your own forge". To see the closed-forge line, set signup to invite-only or closed.

commented

I merged main into this branch and pushed, so the pull should merge cleanly again. I ran tsc, scripts/gate.ts and the four relevant test files, which all pass. I did not run the full suite; the forge's check does that on push.

Conflict: there was one, in src/web/plans_row.ts. main (#11263) added a data-plan attribute to the plan links so Settings → Billing can count the selling funnel. My side had replaced the "Pay for" links with a "Get <plan>" button on each plan. I kept the "Get" buttons and put data-plan="<name>" on them, so the funnel still sees each plan's link.

Where the pull stands: the home page's "Get your own forge" shows each plan with its price, its crew credit and a Get button, plus an after-payment line. The closed-accounts sentence sits below the plans section, outside the "Get your own forge" section.

To try it: open the home page signed out and read the plans under "Get your own forge".

Tests that ran: test/funnel.test.ts, test/billing-links.test.ts, test/plans-row.test.ts and test/front.test.ts (46 tests).

Changes requested — before the latest push

Two things to fix first: (1) the home plans section now offers the same action twice ("Get Free" and the big "Get a forge" both go to /forges/new), against principle 1; (2) on a closed or invite-only forge the plans still offer "Get Free", but the sentence saying why it will be refused has moved to the foot of the page, away from the button. The preview with no links still shows "Paid" on three plans, which the issue said should not appear. Security looks fine: buy links are https-validated, rel=noopener is set, and output is escaped through html``.

commented

Pushed. I made three of the four changes and kept the fourth where it was, for the reason below. tsc, scripts/gate.ts, scripts/design-lint.ts and 58 tests across the plans, billing-links, funnel, front and terminal-screen files pass. fast.ts found the diff too broad to name tests (1829 of 2769 files), so I ran the files that cover the change by hand. The forge's check runs the full suite on push.

Changed:

  • Free row: it no longer has its own "Get Free" link. Only a plan with a buy link gets a "Get <plan>" anchor, so the big "Get a forge" button is the only way into /forges/new.
  • After-payment line: AFTER_PAYMENT is now a plain const in src/web/plans_row.ts. It reads "Your forge is made after payment; an email with the link to open it arrives." The "usually within a few hours" is gone. The issue asked for that phrase, but I agree the code can't back it.
  • "Paid": a paid plan now always shows its price, such as "$19 a month". The crew-credit line shows too, both from the plans setting. A plan no longer depends on the billing provider or on a buy link to show them. I removed the priced parameter from planWords, plansRow and getForgeLines, so the terminal's "Get your own forge" lists the prices as well. Tests updated to match.

Not changed: the closed-accounts sentence stays near the foot of the page, after the "Running this for a team?" paragraph. The issue says it must not appear in the plans section, and test/plans-row.test.ts asserts that. It also says signup being closed is about accounts on the top forge, not about getting a forge, so the "Get" links aren't refused by it. front.test.ts also still expects the sentence somewhere on the page. If you want it next to the button anyway, that means changing the issue's own acceptance line.

commented

The failing check is fixed and pushed. I ran only test/unreached.test.ts and test/plans-row.test.ts, which pass, and bun x tsc --noEmit, which is clean. I did not run the rest of the suite, and I did not run bun scripts/gate.ts or bun scripts/design-lint.ts; the forge's check does the full run on this push.

Cause: this pull made the home page and the terminal show every plan's price from the plans setting. That left src/billing/provider.ts (billingProvider() and FORGE_BILLING_PROVIDER) unused by anything under src/. Only a test imported it, so the "every module under src/ is imported by another, or allowed" test failed.

Change:

  • Deleted src/billing/provider.ts rather than adding it to the allow list, since nothing needs it.
  • Removed its unit test from test/plans-row.test.ts.
  • Renamed the test that set FORGE_BILLING_PROVIDER=stripe. It now says the real home shows prices from the setting whatever that variable says.
  • Dropped the FORGE_BILLING_PROVIDER section from docs/features/home-plans.md. The same doc now says "Get <plan>" instead of "Pay for <plan>", matching the button.
  • Fixed the stale comment in src/tui/screens/getforge.ts that still mentioned "Paid".

Left alone: the test file still saves, restores and deletes FORGE_BILLING_PROVIDER in its setup. That is harmless, and I did not strip it.

Changes requested — before the latest push

Mostly good: prices and credit now come from the plans setting, 'Paid' is gone, Get <plan> only appears with a buy link. Fix in one round: (1) Both doors: the after-payment line shows on the web only; the terminal's Get your own forge (src/tui/screens/getforge.ts) prints buy links but not that line. Print it there too, from one shared const (move AFTER_PAYMENT into billing/plan_words.ts). (2) Paid plans now replace the plan's own sentence (p.says) with the credit line, so a plan's description is lost; docs/features/home-plans.md still says the line carries 'its own sentence'. Show both, or update the doc. (3) docs: describe the credit line, the Get <plan> link and the after-payment line; remove the stray double blank line left where the provider section was. (4) test/plans-row.test.ts still saves/restores FORGE_BILLING_PROVIDER and the 'whatever it says' test sets a variable nothing reads: delete that dead setup. (5) The closed/invite sentence now sits at the foot of the page, far from the Get buttons (sentinel's point); put it directly under the plans/button as the muted line, outside the plans list, or say in the pull why not. I could not see the plans section in the preview (the #yours section came back empty to curl), so the phone view is unchecked.

commented

On the anonymous home and in the terminal, each plan now shows its price and crew credit from the plans setting. A plan with a buy link carries a "Get <plan>" link. The "Paid" label, the "Pay for" button and "Get Free" are gone.

This round, following review:

  • After-payment line on both pages: the line is now one const, AFTER_PAYMENT in src/billing/plan_words.ts. Both the web (src/web/plans_row.ts) and the terminal's Get your own forge (src/tui/screens/getforge.ts) print it whenever a plan has a buy link. The terminal's link line now reads Get <plan>: <link> instead of Pay: <link>.
  • A plan keeps its own sentence: planWords no longer replaces a paid plan's sentence with the credit. The line is now the machine, then the plan's sentence, then "$N of crew credit each month."
  • Docs: docs/features/home-plans.md now describes the price, the credit line, the Get <plan> link on each page and the after-payment line. The stray double blank line is gone.
  • Tests: dropped the unused FORGE_BILLING_PROVIDER save/restore and the "whatever it says" test. Added a test that a paid plan keeps its sentence and adds its credit after it. Added a test that the terminal prints Get Small: <link> and the after-payment line when a link is set, and neither when none is.

Not done: moving the closed/invite sentence under the Get a forge button. Issue #11258, from the owner, says "This forge is not taking new accounts" is about accounts on this forge, not about getting a forge. It says the sentence "does not appear in this section", and its acceptance test asserts there is no "not taking new accounts" in the plans section. Putting it under the button would bring back the misreading the issue was opened about: a visitor would think they cannot get a forge. If the owner wants it gone from the home page entirely, that is a one-line follow-up.

Not checked here: the 390 px phone view. Curl gets nothing back for the plans section on the preview, so it needs a browser.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts pass. scripts/fast.ts named 1829 test files, too many to run here, so I picked the covering ones: test/plans-row.test.ts, test/plan-words.test.ts, test/billing-links.test.ts, test/tui-plans.test.ts, test/home-start-forge.test.ts and test/funnel.test.ts, all passing (48 tests).

To try it: save buy links at Settings → Billing, then open /#yours signed out, or the terminal palette's Get your own forge.

🤖 Generated with Claude Code

Approved

Earlier asks are met. Free no longer has a Get Free link, so the big Get a forge button is the one way in. Paid plans always show their price and credit, with no Paid and no Pay for. The after-payment line is one const shared by the web and the terminal. The terminal reads Get <plan>: <link>. The plan keeps its own sentence. provider.ts is deleted, the doc is updated, and README is untouched. The preview shows $19/$49/$149 and the credit lines. I could not see the buy-link state there.

Sentinel's point about the closed-forge sentence moving to the foot of the page: the issue says it must not sit in the plans section, and front.test.ts still expects it on the page, so I accept where it is.

Next, both non-blocking:

  1. Non-blocking: the Small plan's own sentence already says "with a crew credit each month", and the credit is then appended, so the preview reads "with a crew credit each month. $5 of crew credit each month." That says the same thing twice (principle 1). Trim the credit words from the default says strings in src/settings/plans.ts, or drop the append.
  2. Non-blocking: the header comment in src/web/plans_row.ts is one very long line. Wrap it.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs