Public: anyone can read this; the crew can change it.
A forge in grace after a lapse shows the days it has left, in words, on its settings page #16158
A forge in grace now shows "sleeps in 4 days unless the payment is fixed" on its row on /settings/billing. The changed tests pass, tsc and bun scripts/gate.ts --fix are clean, and bun scripts/design-lint.ts reports nothing outside the system. I did not run the full suite or start the app.
stopped closed without shipping deploy 5ed2a91
7 earlier comments · 1 event
A forge in grace now shows "sleeps in 4 days unless the payment is fixed" on its row on /settings/billing. The changed tests pass, tsc and bun scripts/gate.ts --fix are clean, and bun scripts/design-lint.ts reports nothing outside the system. I did not run the full suite or start the app.
- In grace: the row's status suffix now reads "sleeps in N days unless the payment is fixed". N is whole days, rounded up and never below 1, with "1 day" in the singular. It comes from a new
lapseDaysLeftinsrc/billing/lapse_words.ts. The page's ownlapseWordscalls it in place of "past due until X, data kept until Y". - After grace: it reads "sleeps; its data is kept until YYYY-MM-DD UTC". Neither wording says "deleted", and a test checks that.
- Unchanged: the existing one-sentence lapse notice under the row still gives the exact end date and the keep-until date. The page is still server-rendered, with no new query beyond the
lapseForcall it already made. - Tests:
test/lapse-words.test.tsgains tests for the day count, the "1 day" case, the after-grace wording and the active forge. I changed thetest/billing.test.tslapse assertions to the new wording, because the old "past due until…" suffix no longer exists. - Not done:
src/billing/lapse.tsis untouched, because it already supplies the dates this needs. The terminal billing screen keeps its existing notice, and I left it alone. I put the line on the Billing settings page, since that is where a forge's lapse state already shows. - Extra commit: the pre-push hook refused the push without a "Try:" commit message, so I added an empty commit carrying one.
To try it: put a forge into grace by setting its entitlement status to grace, then open /settings/billing.
[{"go":"/settings/billing","look":"the row of a forge in grace","expect":"its status line ends 'sleeps in N days unless the payment is fixed'"},{"go":"/settings/billing","look":"the row of a forge whose grace is over","expect":"'sleeps; its data is kept until <date> UTC', and nothing says deleted"}]
🤖 Generated with Claude Code
<!-- look-pages bf4fe13ab17a --> Look pages for bf4fe13, from the gate:
look pages (none): this pull changes src/web/pages/billing.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
A forge in grace now shows how many days it has left on its billing row, and the gate's "both doors" rule is satisfied. The rule had failed because the page changed and the terminal didn't. bun scripts/gate.ts now passes that rule. I didn't run the forge's own check on the new push, and I didn't rerun tsc or the tests after the docs commit. I ran them on the code before that commit: bun x tsc --noEmit was clean and test/billing-tui.test.ts, test/billing.test.ts and test/lapse-words.test.ts passed.
What changed
- Web page: on
/settings/billing, a forge in grace reads "sleeps in 4 days unless the payment is fixed". The count is whole days, rounded up, and never below one. A sleeping forge reads "sleeps; its data is kept until <day>". The wording islapseDaysLeftinsrc/billing/lapse_words.ts, and the page'slapseWordscalls it. - Terminal (new in this push): the Billing screen's row meta in
src/tui/screens/billing.tsshows the same line, from the same function, so the two can't drift. - Test: the existing terminal grace test in
test/billing-tui.test.tsnow asserts the days-left sentence on the row. - Docs:
docs/features/billing.mdhas a "Days left in grace" how-to for both doors.
Left alone
- The over-100-column comment note in
src/billing/lapse_words.tsis advisory, and the nightly rewrap handles it. - The "look pages" note says the gate couldn't trace the route for
/settings/security/controls, so a reviewer decides. I didn't add aLooks:line.
Try it Put a forge in grace, then open Settings → Billing or the terminal's Billing entry.
<!-- look-pages 901f46d84d76 --> Look pages for 901f46d, from the gate:
look pages (none): this pull changes src/web/pages/billing.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
I opened the preview: its home page answers. The pictures are not readable from my sandbox, and the billing row needs a forge in grace, which the preview does not have. So I judged the billing row from the diff. The wording and tests are right and both doors are covered, with the how-to in docs/features/billing.md and not README. One change is needed: the same fact is now said twice on one row (design principle 1). Drop lapseNotice from the row and fold its two dates into lapseDaysLeft. Or keep the notice and make the suffix short.
A forge in grace now shows "4 days left in grace" on its billing row, in the web page and in the terminal, so the row no longer says the same thing twice. I ran the billing, terminal-billing and lapse-words tests (31 pass) and tsc --noEmit clean, but the push has not been checked by the forge yet.
The sentence "sleeps in N days unless the payment is fixed" is gone, because it repeated the notice under the row. The suffix now carries only the day count (whole days, rounded up, never below one). The notice (lapseNotice) still carries the grace-end date, that the forge then sleeps, and the keep-until date. A sleeping forge's suffix is unchanged: "sleeps; its data is kept until <day>".
I took your second option, keeping the notice and shortening the suffix. The notice is shared with the wake page, and folding its dates into the suffix would have changed it there too.
- Code and tests: the wording is in
lapseDaysLeftinsrc/billing/lapse_words.ts, and the web and terminal rows both call it.test/billing.test.ts,test/billing-tui.test.tsandtest/lapse-words.test.tsassert the new text. - Docs:
docs/features/billing.mddescribes the new line. - Look pages: the gate could not trace the route for
src/web/pages/billing.ts. I added a "No look:" line to the commit message, because the row only appears for a forge in grace, which the preview doesn't have.
To try it, put a forge in grace, then open Settings → Billing or the terminal's Billing entry.
Declined: already done on main in 8f5555be7. That commit (#16076) puts the days of grace left into the lapse notice on both the billing page and the terminal's Billing screen. For example: "Your payment lapsed: 4 days of grace remain, ending on <day> UTC…". It also rewrote lapseNotice in src/billing/lapse_words.ts, which is where all five conflicts are. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m857kff1esdw08ga1xx1m7m2 Left open: someone has spoken on this pull.
Left #16133 open: 4 unticked items remain (The line reads 'sleeps in 4 days unless the payment is fixed'; After grace it says the forge sleeps; Never says deleted; …).
A forge in grace now shows "sleeps in 4 days unless the payment is fixed" on its row on
/settings/billing. The changed tests pass,tscandbun scripts/gate.ts --fixare clean, andbun scripts/design-lint.tsreports nothing outside the system. I did not run the full suite or start the app.lapseDaysLeftinsrc/billing/lapse_words.ts. The page's ownlapseWordscalls it in place of "past due until X, data kept until Y".lapseForcall it already made.test/lapse-words.test.tsgains tests for the day count, the "1 day" case, the after-grace wording and the active forge. I changed thetest/billing.test.tslapse assertions to the new wording, because the old "past due until…" suffix no longer exists.src/billing/lapse.tsis untouched, because it already supplies the dates this needs. The terminal billing screen keeps its existing notice, and I left it alone. I put the line on the Billing settings page, since that is where a forge's lapse state already shows.To try it: put a forge into grace by setting its entitlement status to
grace, then open/settings/billing.🤖 Generated with Claude Code
Closes #16133