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

/pricing says in one line what happens when a plan lapses (the grace, then paused, never deleted), from the same constant the lapse uses #15667

Merged opened this

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

Merged

The checkout confirmation now shows the lapse line. /pricing already had it, from #12513. The new test, the existing pricing tests and tsc pass.

Notes

shipped production is serving it deploy 496afdb

opened this

The checkout confirmation now shows the lapse line. /pricing already had it, from #12513. The new test, the existing pricing tests and tsc pass. The gate rewrapped comments in one file, but I didn't see which, and git status afterwards showed only my two files. I didn't run the full suite or boot the app.

What changed

  • /pricing/done now prints the same sentence as /pricing: "If a payment lapses, you have N days of grace. After that your forge sleeps and keeps its data." It is on the "ready", "taken over" and "link shown already" states, and on neither the failed-order page nor the waiting states. The change is in src/web/pages/pricing.ts; the checkout flow is untouched.
  • N comes from billing.grace_days, the setting the lapse code reads, through lapseRule() / lapseRuleWords().
  • test/pricing-lapse-line.test.ts places a paid order and checks both pages against the default and against 11 days. It also checks the word "dunning" is absent.

What I left out

  • Wording: I did not change it to "paused, never deleted". The forge deletes a lapsed forge's data after billing.retention_days (30 by default), so "never deleted" would be false. The existing "sleeps and keeps its data" stays, and /terms still names the retention window.
  • Duplicate test: the /pricing half of "changing the constant changes the page" was already tested in test/pricing-order.test.ts. It is repeated in the new file, so it is tested in two places.

Try it

  • Open /pricing and read the line under "After you pay".
  • Complete a checkout and open the confirmation to read the same line.
  • Change the grace days in settings and reload both pages.
[{"go":"/pricing","look":"the lapse sentence under 'After you pay'","expect":"states N days of grace, then the forge sleeps and keeps its data"},{"go":"/pricing/done?order=<paid order>","look":"small muted line under the claim link","expect":"the same sentence, same N"}]

Closes #15644

2 earlier comments
commented

The checkout confirmation now shows the lapse line. /pricing already had it, from #12513. The new test, the existing pricing tests and tsc pass. The gate rewrapped comments in one file, but I didn't see which, and git status afterwards showed only my two files. I didn't run the full suite or boot the app.

What changed

  • /pricing/done now prints the same sentence as /pricing: "If a payment lapses, you have N days of grace. After that your forge sleeps and keeps its data." It is on the "ready", "taken over" and "link shown already" states, and on neither the failed-order page nor the waiting states. The change is in src/web/pages/pricing.ts; the checkout flow is untouched.
  • N comes from billing.grace_days, the setting the lapse code reads, through lapseRule() / lapseRuleWords().
  • test/pricing-lapse-line.test.ts places a paid order and checks both pages against the default and against 11 days. It also checks the word "dunning" is absent.

What I left out

  • Wording: I did not change it to "paused, never deleted". The forge deletes a lapsed forge's data after billing.retention_days (30 by default), so "never deleted" would be false. The existing "sleeps and keeps its data" stays, and /terms still names the retention window.
  • Duplicate test: the /pricing half of "changing the constant changes the page" was already tested in test/pricing-order.test.ts. It is repeated in the new file, so it is tested in two places.

Try it

  • Open /pricing and read the line under "After you pay".
  • Complete a checkout and open the confirmation to read the same line.
  • Change the grace days in settings and reload both pages.
[{"go":"/pricing","look":"the lapse sentence under 'After you pay'","expect":"states N days of grace, then the forge sleeps and keeps its data"},{"go":"/pricing/done?order=<paid order>","look":"small muted line under the claim link","expect":"the same sentence, same N"}]
commented

<!-- look-pages 30607e2b3e6b --> Look pages for 30607e2, 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

The lapse line is now on the checkout confirmation, and the terminal's pricing form says it too. The local gate is clean. I ran tsc and the tui-pricing, pricing-order and pricing-after-pay tests, which pass (40 tests); I didn't run the full suite. The forge check on the new push hasn't reported yet.

What changed

  • /pricing/done prints "If a payment lapses, you have N days of grace. After that your forge sleeps and keeps its data." under the claim link. It shows on the ready, taken-over and link-already-shown states, and not on the failed-order or waiting pages.
  • /pricing already carried the line (from #12513). The terminal's Get a forge screen now prints it after the after-payment steps, only where a checkout is connected.
  • N comes from billing.grace_days, the setting the lapse code reads, so changing it changes all three places.
  • docs/features/pricing-lapse-line.md is the how-to the gate's "both doors" rule asked for.

Tests

  • test/pricing-order.test.ts has a new test that pays an order and checks /pricing and the confirmation at the default and at 11 days. It also checks "dunning" is absent.
  • I dropped the separate test/pricing-lapse-line.test.ts that the issue names. The gate flagged its buy helper as a copy of the one in pricing-order.test.ts, so the test lives there now. That file is also where the existing /pricing grace-days test sits.
  • test/tui-pricing.test.ts has a new test for the terminal line.

What I left out

  • Wording: I didn't change it to "paused, never deleted". A lapsed forge's data is deleted after billing.retention_days (30 by default), so "never deleted" would be false. /terms names that window.
  • Terminal confirmation: the terminal's post-payment confirmation screen doesn't show the line yet.
  • Checkout flow: untouched, as the issue asked.

Commit-message lines for the gate

  • Looks: /pricing was rejected, because /pricing isn't a page in forge.json's looks. A later commit carries a "No look:" line instead.
  • A "Direction:" line (naming #6534) was added after the gate's pipeline rules asked for it. Both are empty-commit workarounds, so a reviewer should confirm they fit.

Try it

  • Open /pricing where a checkout provider is connected and read the line under "After you pay".
  • Pay an order and open /pricing/done to see the same line under the claim link.
  • Change the grace days at /admin/limits and reload both pages.
  • Open the terminal's Get a forge screen to see the same line there.
[{"go":"/pricing","look":"the lapse sentence under 'After you pay'","expect":"states N days of grace, then the forge sleeps and keeps its data"},{"go":"/pricing/done?order=<paid order>","look":"small muted line under the claim link","expect":"the same sentence, same N"}]
Approved

Approved. The preview /pricing shows the line with 7 days, read from lapseRule (billing.grace_days); the confirmation adds it as small muted text in a plain <p>, tokens only, works without JS, no new dependency, no README change, how-to in docs/features. Tests: the web test flips the constant (default and 11) and checks both pages and absence of dunning; the TUI test checks the terminal. Two things I would do next: (1) the plain() wrapper shows the line on every non-failed state, so confirm the waiting/pending states are not carrying a sleep sentence before payment is known, and limit it to ready states if they are; (2) give the terminal confirmation screen the line too, so all doors match. Wording stays as the builder justified: retention_days means never deleted would be false.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs