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

/terms says in plain words what a paid forge is: what you buy, what a lapse does, who owns the data #13214

opened this

Merged 18d 6h ago, live in production

/terms now answers 200 signed out with five short plain sentences. I ran test/terms-page.test.ts, pricing-size and pricing-order, plus tsc, design-lint and the gate, and all were green. I did not run the full suite: scripts/fast.ts said the diff reaches 2,720 test files, so I picked the covering ones myself.

Notes

opened this

/terms now answers 200 signed out with five short plain sentences. I ran test/terms-page.test.ts, pricing-size and pricing-order, plus tsc, design-lint and the gate, and all were green. I did not run the full suite: scripts/fast.ts said the diff reaches 2,720 test files, so I picked the covering ones myself.

What changed

  • Page: src/web/pages/terms.ts (new), registered with one line beside /privacy in server.ts, marked open in route_marks.ts, and terms added to reserved.ts.
  • Where the sentences come from:
    • The grace sentence is lapseRuleWords(lapseRule(db)), the same text /pricing prints.
    • The retention days are read from billing.retention_days.
    • The paid plan names are read from the plans setting.
    • A change to any of these changes the page.
  • What the page says:
    • What you buy: a forge sized by the plan you pick, with its crew credit.
    • Lapse: after the grace days the forge sleeps, and its data is kept for the retention days.
    • Data: yours, and you can ask for an export.
    • Cancel: end the subscription in the billing portal linked from your forge's Plan row.
    • Privacy: a link to /privacy.
  • Links and meta: /pricing and /signup both link to Terms and Privacy. /terms has its own <title> and meta description.
  • Test: test/terms-page.test.ts checks the 200, the title and description, the links on /pricing and /signup, and that terms is reserved. It also changes billing.grace_days to 9 and billing.retention_days to 45 and checks that the page follows.

Left out or different

  • Size: the page is 10.9 KB, not under 10 KB. The page itself is about 1.5 KB; the rest is the shared shell (topbar, palette, footer), which I did not touch. The test caps the <main> content at 2.5 KB and the whole response at 11.5 KB. The /pricing size test also allows 12.5 KB for the same reason.
  • "Never deleted": I did not write this. The code has billing.retention_days, so the page says the data is "kept for N days" and that nothing is deleted when the forge sleeps. I could not tell whether anything deletes after that period, so the page makes no promise beyond it.
  • Export: it is a request to the operator, as the lapsed-forge page already says. There is no self-serve export button, and the page does not claim one.
  • Cancel: the page points to the billing portal on the Plan row. I did not write a flow that isn't there.
  • Legal wording: it is the owner's to review.

Try it: open /terms signed out, then /pricing and /signup and follow the Terms link. Change billing.grace_days in admin limits and reload /terms.

Closes #13207

Show 1 earlier items

7 earlier comments
commented

This push fixes the failed check: comment wrapping is repaired and the other three gate rules now have commit lines. I haven't seen the forge's re-run result yet.

  • Comment wrapping: bun scripts/gate.ts --fix rewrapped comments to 100 columns in src/http/route_marks.ts, src/http/server.ts, src/web/pages/pricing.ts and src/web/pages/site.ts. That rewrap is the only code change.
  • Commit lines: the new commit carries the three lines the gate asked for. I chose Looks: / since / is the only existing app.looks page that could show the footer link, though I didn't check that the pictures actually show the change.
    • Looks: /.
    • No door: /terms is a public read-only page, so I did not add a terminal screen or a docs/features how-to.
    • Direction: a public statement of what a paid forge is was asked for by the issue itself.
  • Verification: locally bun scripts/gate.ts and bun x tsc --noEmit both came back clean. The pricing and terms test files pass (18 tests).
  • Not run: scripts/fast.ts named 2,720 test files for the diff, so I didn't run them here and left the full run to the forge's check. I started it once and it ran past my 120 s limit, but I couldn't stop it.

Try it at https://lab--13214--forge-trevato-apps.open-platform.sh/terms once the preview is up.

commented

/terms is now a public page that states what a paid forge is, using the billing constants. /pricing and /signup link to it.

The first push failed three tests, and I fixed two of them in this follow-up push:

  • Design audit: docs/design/audit.md had no entry for /terms, so I added one.
  • App looks: test/forge-looks.test.ts requires every top-level page to have a picture or a reason it has none. The cap of 24 looks is already spent, so /terms goes in the not-a-page list, as /pricing does. test/terms-page.test.ts covers the page.

I did not touch the third failure, test/preview-spec.test.ts ("a deployed preview's findings are stored under its run"). It took 30 s in the shard run and has nothing to do with this change, so I read it as load on the check machine. I did not re-run it here.

Locally, the design-audit, forge-looks and terms-page tests pass (14 tests) and bun x tsc --noEmit is clean. The gate rewrapped comments in one file, and that rewrap is in the commit.

To try it, open /terms signed out, then follow the Terms link from /pricing and /signup.

commented

I merged main into the branch and pushed it. The only conflict was signupPage in src/web/pages/site.ts, and I kept both sides there. main had added a meta description to the sign-up page, and this pull had added the Terms and Privacy links under the form. The sign-up page now has both.

bun x tsc --noEmit is clean, and the terms-page, design-audit and forge-looks tests pass (14 tests). I did not run the full suite here, so the forge's check on this push is the full run.

To try it, open /terms signed out, then follow the Terms link from /pricing and /signup.

commented

Items 2, 3 and 4 are done. Item 1, getting the whole response under 10 KB, can't be done on this page. tsc is clean, and the terms, terminal-terms, pricing-terminal, feature-orphans, design-audit and forge-looks tests passed on my last full run of them. After a one-line fix to the terminal screen I re-ran only test/terms-page.test.ts and test/tui-terms.test.ts, which pass.

What changed

  • One source for the sentences: src/billing/terms_words.ts now holds termRows(db) and TERMS_PURPOSE. The web page and the new terminal screen both read from it, so they cannot drift.
  • Purpose and rows: /terms has the h1 "Terms of a paid forge" and one sentence saying what the page is for. The five terms are a dl.status-rows of labelled rows.
  • Lapse wording: it now reads "Sleeping never deletes anything: the data waits N days for you to come back, and paying again wakes the forge at once. After those N days the operator may remove it, so ask for an export before then." This states what happens after retention. It follows the billing.retention_days setting description, which says "before anything is allowed to remove it", and matches docs/features/start.md ("never deleted").
  • Both doors: the terminal screen is src/tui/screens/terms.ts, with a palette entry offered to everyone in src/tui/forge.ts. docs/features/terms.md is the how-to, indexed in docs/features/README.md, with test/tui-terms.test.ts as its test.

Where I disagree: the 10 KB cap

  • Why it can't be met: the shared shell (head, topbar, palette, footer) is about 9.7 KB with an empty body. The page's own <main> is about 1.5 KB, so the whole response is 11.2 KB. /privacy is already 10.5 KB for the same reason. Getting under 10 KB would leave about 300 bytes for the body, and trimming the shell is a change to every page.
  • What the test asserts instead: I did not raise the cap. The test now holds <main> under 2,000 bytes and the shell under 10,000 bytes, with a comment saying why.
  • For you to decide: if you want the shell trimmed, that should be its own issue. I did not post to the issue myself.
commented

/terms now says in plain words what a paid forge is: one purpose sentence, then five labelled rows. They cover what you buy, what happens if a payment lapses, who owns the data, how to cancel, and what the forge keeps about a visitor. /pricing and /signup link to it, and the palette offers a terminal screen with the same rows.

This push fixes the two gate failures from the last check. bun scripts/gate.ts --fix is clean, bun x tsc --noEmit is clean, and test/tui-terms.test.ts and test/terms-page.test.ts pass (4 tests). I did not run the wider suite; the forge's check does that.

  • Feature-file count: the pull added three feature files (the page, the terminal screen and a how-to), and the gate allows two. I folded the how-to into a new section of docs/features/billing.md and deleted docs/features/terms.md. The index entry in docs/features/README.md now points at that section.
  • as never casts: test/tui-terms.test.ts builds a typed TuiIdentity. It also checks the palette command with the real tui.ctx instead of an empty cast object.

What to look at

  • One source for the sentences: termRows in src/billing/terms_words.ts feeds both src/web/pages/terms.ts and src/tui/screens/terms.ts, so the page and the terminal cannot drift.
  • Lapse wording: the grace and retention days come from the billing.grace_days and billing.retention_days settings, read when the page is drawn. The copy says sleeping never deletes anything and tells people to ask for an export first.

How to try it: open /terms signed out or in on the preview. In the terminal, open the palette and choose "Terms of a paid forge".

Left out: no change to the billing behaviour itself; the page only describes the existing grace and retention settings.

commented

I merged main into the branch and pushed. Gate, tsc and the touched tests are clean: test/forge-looks.test.ts, test/terms-page.test.ts and test/tui-terms.test.ts (11 tests). I did not run the wider suite; the forge's check does that.

The only conflict was in test/forge-looks.test.ts, in the table of pages that have no picture. Both sides had edited the /pricing line. I kept main's wording, "not in app.looks", for /pricing. I added a /terms line in the same wording, pointing at test/terms-page.test.ts. I dropped this branch's "cap of 24 looks is spent" reason for both pages, since main replaced it.

Nothing else about the pull changes: /terms still has its one purpose sentence and five labelled rows, a terminal screen, and the how-to folded into docs/features/billing.md. To try it, open /terms on the preview, or choose "Terms of a paid forge" in the terminal palette.

commented

The four failing palette-roster tests were my doing, and I've fixed them. The new "Terms of a paid forge" entry is in the terminal palette for everyone except an agent signed in with a plain account. The four expected rosters in test/palette-roster.test.ts didn't list it. I added the row after pricing, and the file passes (15 tests). Gate and tsc were clean before the push; I haven't seen the forge's new check result yet.

The other two failures were not caused by this pull:

  • test/mcp-doc-names-every-argument.test.ts: the check's own log says it is red on main too, so it isn't counted against this pull.
  • The crew concurrency test in test/capacity.test.ts: it passes here (16 tests). It failed in one shard of the check run, and I'm treating it as a flake, since nothing in this pull touches crew or capacity code. If it fails again after this push, it is worth a closer look.
commented

Left #13207 open: 1 unticked item remain (The page is under 10 KB, server-rendered, no new script; design-lint passes.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs