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

The /pricing page says in one line what each plan costs per month and per extra forge, read from the plan table not typed in the page #14551

Merged opened this

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

Merged

/pricing now takes every plan's price from planWords(p).price in billing/planwords.ts, which is also what the home page and terminal use. src/web/pages/pricing.ts no longer builds its own "$N a month" string. The new test and the existing pricing tests pass (20 tests), and tsc and gate.ts --fix are clean.

Notes

shipped production is serving it deploy f813815

opened this

/pricing now takes every plan's price from planWords(p).price in billing/plan_words.ts, which is also what the home page and terminal use. src/web/pages/pricing.ts no longer builds its own "$N a month" string. The new test and the existing pricing tests pass (20 tests), and tsc and gate.ts --fix are clean.

The checkout already read the same plan rows: placeOrder passes plan.priceUsd from getPlan. I left it alone, as the issue asked.

  • Test: test/pricing-checkout-same-rows.test.ts changes the Small plan's price from 19 to 37 and checks that both the /pricing card and the amount sent to the fake checkout follow.
  • Source check: a second test in the same file fails if pricing.ts ever contains a $<digit> price literal or the words "a month".
  • Left out: the plan table has no per-extra-forge price. The only forge figure is "Up to N forges", which was already shown from p.forges. I did not invent a price column; if one is wanted, it needs its own issue.
  • Not run: the full bun test; the forge runs it on push.

To try it: open /pricing, change a plan's price in the plans setting, and reload. The card's price follows.

I also pushed an empty "Try:" commit because the pre-push hook required one.

🤖 Generated with Claude Code

Closes #14506

3 earlier comments
commented

/pricing now takes every plan's price from planWords(p).price in billing/plan_words.ts, which is also what the home page and terminal use. src/web/pages/pricing.ts no longer builds its own "$N a month" string. The new test and the existing pricing tests pass (20 tests), and tsc and gate.ts --fix are clean.

The checkout already read the same plan rows: placeOrder passes plan.priceUsd from getPlan. I left it alone, as the issue asked.

  • Test: test/pricing-checkout-same-rows.test.ts changes the Small plan's price from 19 to 37 and checks that both the /pricing card and the amount sent to the fake checkout follow.
  • Source check: a second test in the same file fails if pricing.ts ever contains a $<digit> price literal or the words "a month".
  • Left out: the plan table has no per-extra-forge price. The only forge figure is "Up to N forges", which was already shown from p.forges. I did not invent a price column; if one is wanted, it needs its own issue.
  • Not run: the full bun test; the forge runs it on push.

To try it: open /pricing, change a plan's price in the plans setting, and reload. The card's price follows.

I also pushed an empty "Try:" commit because the pre-push hook required one.

🤖 Generated with Claude Code

commented

<!-- look-pages dbe711896858 --> Look pages for dbe7118, from the gate:

  • look pages (none): this pull changes src/web/pages/pricing.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

I pushed a new commit to the branch that adds a No door: line, which the failed "both doors" gate rule accepts when an edit shows nothing new. I have not seen the forge's check re-run, so I don't know yet whether it now passes.

The gate wants a change under src/tui/ or a how-to under docs/features/ whenever src/web/pages/pricing.ts changes. This change moves where the price string comes from, so what the page shows is the same and the terminal already prints the price through planWords. The No door: line in the commit message says this.

The same commit adds a No look: line for the unrelated "look pages" note about /settings/security/controls, which the gate says the reviewer decides. The commit changes no files. No code changed, so I did not re-run the tests.

🤖 Generated with Claude Code

commented

I pushed a commit with a Looks: /pricing line, which is the gate's answer to the look-pages note. The commit changes no files.

The gate flagged this pull because it could not trace the route for /settings/security/controls and so could not tell which page to look at. This pull does not touch that page. It edits only src/web/pages/pricing.ts, and /pricing renders exactly as before. The price string now comes from planWords instead of being built in the page.

The gate's note was written against the earlier commit dbe7118, so it may stay on the pull until it re-runs on the new one. I have not seen that re-run.

No code changed, so I did not re-run the tests.

🤖 Generated with Claude Code

Approved

Approved. /pricing now prints planWords(p).price, the same string the home page and terminal use, and the preview shows Free / $19 / $49 / $149 a month. The checkout already takes plan.priceUsd from getPlan, so both read the same row. The test changes the row and sees both move. Two things I would do next: (1) the price ternary in src/web/pages/pricing.ts now has the free and paid branches identical, so collapse them and keep only the buy-link / ask-the-operator difference. (2) The issue title says per extra forge, but the plan table has no such price. Open a follow-up issue for it rather than leave the title promising it. The source-literal test is a regex on the file text, so it is brittle; consider asserting that the page output equals planWords instead.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs