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

/pricing signed out is under 10 KB and its plan rows are rows, not cards #13039

Merged opened this

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

Merged

/pricing signed out is now 13.1 KB, down from 16.7 KB, so it misses the issue's under-10 KB target. The plans are dl rows and checkout still starts from a row. What changed Plan rows (src/web/pages/pricing.ts): each plan is now a status-row inside (DESIGN §7).

Notes

shipped production is serving it deploy 59903fa

opened this

/pricing signed out is now 13.1 KB, down from 16.7 KB, so it misses the issue's under-10 KB target. The plans are dl rows and checkout still starts from a row.

What changed

  • Plan rows (src/web/pages/pricing.ts): each plan is now a status-row inside <dl class="status-rows"> (DESIGN §7). It holds the name, one sentence, and the price with its button. The button is Get <plan> on a paid plan and Start my forge on the free one. data-plan stays on the row, so the funnel's click tracking and the order form's plan value are unchanged.
  • Size (src/web/layout.ts): page() has an opt-in tight option that drops source indentation and blank lines. Only /pricing uses it.
  • Structured data (src/web/offer.ts): the lapse rule (days of grace, the forge sleeps and keeps its data) is now stated once on the product instead of in every offer. Offers no longer repeat url, and the CPU-ceiling sentence in src/spawn/cores.ts is shorter. offerData still works as before when called with just a lapse rule, so test/offer-lapse.test.ts passes untouched.
  • Production probe (src/core/v1_proof.ts): the #11141 check now reads the lapse rule from an offer or from the product. The #11138 checkout probe (the order form) is untouched and still holds.
  • Test (test/pricing-size.test.ts, new): asserts the page is under 13.5 KB, the plans are status-row rows with no list cards, and each paid row carries its price and its name="plan" button when a provider is connected.

Not done

  • Under 10 KB is not reached. What remains is the shared topbar, palette and help dialogs, head metadata and the structured data the share-path test and the production probes require; none of that is in pricing.ts. Trimming it would change every page, so I left it for its own issue.
  • Pictures: the before/after pictures at 390 and 1280 px, light and dark, are not on the pull; this sandbox cannot take screenshots.
  • attention-budget.json: /pricing has no entry in it, so I left it alone.

Checks run

  • scripts/gate.ts, tsc --noEmit and design-lint are green.
  • Eight test files pass: the pricing, offer, share-path, v1-proven, mcp-size, attention and crew-machines ones, plus the new one. I did not run the full suite; the forge's check runs it on the push.

To try it: open /pricing signed out, and view source to see the dl rows and the size.

Closes #12998

4 earlier comments · 2 events
commented

/pricing signed out is now 13.1 KB, down from 16.7 KB, so it misses the issue's under-10 KB target. The plans are dl rows and checkout still starts from a row.

What changed

  • Plan rows (src/web/pages/pricing.ts): each plan is now a status-row inside <dl class="status-rows"> (DESIGN §7). It holds the name, one sentence, and the price with its button. The button is Get <plan> on a paid plan and Start my forge on the free one. data-plan stays on the row, so the funnel's click tracking and the order form's plan value are unchanged.
  • Size (src/web/layout.ts): page() has an opt-in tight option that drops source indentation and blank lines. Only /pricing uses it.
  • Structured data (src/web/offer.ts): the lapse rule (days of grace, the forge sleeps and keeps its data) is now stated once on the product instead of in every offer. Offers no longer repeat url, and the CPU-ceiling sentence in src/spawn/cores.ts is shorter. offerData still works as before when called with just a lapse rule, so test/offer-lapse.test.ts passes untouched.
  • Production probe (src/core/v1_proof.ts): the #11141 check now reads the lapse rule from an offer or from the product. The #11138 checkout probe (the order form) is untouched and still holds.
  • Test (test/pricing-size.test.ts, new): asserts the page is under 13.5 KB, the plans are status-row rows with no list cards, and each paid row carries its price and its name="plan" button when a provider is connected.

Not done

  • Under 10 KB is not reached. What remains is the shared topbar, palette and help dialogs, head metadata and the structured data the share-path test and the production probes require; none of that is in pricing.ts. Trimming it would change every page, so I left it for its own issue.
  • Pictures: the before/after pictures at 390 and 1280 px, light and dark, are not on the pull; this sandbox cannot take screenshots.
  • attention-budget.json: /pricing has no entry in it, so I left it alone.

Checks run

  • scripts/gate.ts, tsc --noEmit and design-lint are green.
  • Eight test files pass: the pricing, offer, share-path, v1-proven, mcp-size, attention and crew-machines ones, plus the new one. I did not run the full suite; the forge's check runs it on the push.

To try it: open /pricing signed out, and view source to see the dl rows and the size.

commented

I pushed a fix for both gate failures. The change is comments and a commit message only, so /pricing renders exactly as before.

  • Long comments: I rewrapped the three comment lines flagged at over 100 columns, in src/web/layout.ts, src/web/offer.ts and test/pricing-size.test.ts.
  • Looks rule: The new commit carries a No look: line, because /pricing isn't in app.looks and only comments change in it.

bun scripts/gate.ts and bun x tsc --noEmit now print nothing here. test/pricing-size.test.ts passes.

I did not run the fast tier. scripts/fast.ts said the diff was too broad to name (2146 test files), so I pushed without it. The forge runs the full check on this push.

Changes requested — before the latest push

Plan rows are now dl rows (DESIGN 7) and checkout still starts from a row, but the issue's headline is missed: the preview serves /pricing at 13.4 KB, not under 10 KB. Fix first: reach under 10 KB (or have the issue re-scoped by a person) instead of landing a 13.5 KB test ceiling that encodes the miss. Also: no before/after pictures at 390/1280 light and dark on the pull. Smaller notes: the tight regex strips indentation globally and relies on /pricing having no pre/textarea, so it is a trap for the next user; the data-lapse paragraph plus the free row's Free label and Start button repeat themselves (principle 1).

commented

/pricing signed out is now about 12.3 KB, down from 16.7 KB, so the issue's under-10-KB goal is still missed by roughly 2.3 KB. I think a person should re-scope the issue rather than have me cut further. On the checks I ran: bun scripts/gate.ts, bun x tsc --noEmit, scripts/design-lint.ts and the 178 tests touching pricing, offers and the CPU ceiling pass. The forge runs the full check on this push.

What changed in this round

  • Size: The CPU-ceiling rule is the same for every plan, so the JSON-LD now says it once on the product instead of four times (sharedProperties in src/web/offer.ts, and ceilingRuleWords in src/spawn/cores.ts). src/core/v1_proof.ts already accepts it there. That took the page from 13.1 KB to 12.3 KB here.
  • Rows: The plan row is now one named helper, planOfferRow in src/web/plan_offer_row.ts. The free row no longer shows a muted "Free" beside the "Free" name; it shows only its Start button.
  • tight option: It now leaves any document containing <pre> or <textarea> untouched, so it cannot corrupt a later page.
  • Test: The ceiling in test/pricing-size.test.ts is now 12.5 KB, and the test also asserts the ceiling is stated once. I disagree with encoding a ceiling above the issue's 10 KB, but a guard at the current size stops it growing back. I'll tighten it to 10 KB if the page gets there.

Why I stopped short of 10 KB Measured on the page, the shared shell takes most of the budget:

Part of the pageSize
Topbar3.1 KB
Head metas1.7 KB
Footer, palette and help dialogs2.0 KB
JSON-LD (now)about 1.9 KB
Page body1.9 KB

Getting under 10 KB means a lean shell for signed-out pages. That would drop the palette and help dialogs, which makes Jump-to-anywhere and the shortcut help stop working on this page. I did not make that change without a decision.

Not done

  • Before/after pictures: /pricing is not in app.looks, so the forge cannot take them. I used a No look: line in the commits. If you want pictures, add /pricing to app.looks or tell me which page to name.
commented

Pushed a fix for the gate failures on #13039. The gate (bun scripts/gate.ts) and tsc --noEmit now run clean here, and the four pricing and offer test files I ran pass (35 tests). I have not run the full suite.

  • Comment lines: I rewrapped the two lines over 100 columns, src/web/plan_offer_row.ts:1 and src/web/offer.ts:24, without changing their meaning.
  • "both doors" rule: the commit message now carries a No door: line. plan_offer_row.ts is only a helper for the existing /pricing page, which already has its terminal screen and how-to, so I added neither.
  • Tests: scripts/fast.ts found the diff too broad to name tests (2,146 of 3,309 files), so I picked the pricing and offer tests myself: pricing-order, pricing-size, offer-listed and tui-pricing.

The forge's own check will run the full suite on this push.

Approved

Rows are now dl status-rows (DESIGN 7), checkout still starts from a row in a post form, and it works with JS off. The preview /pricing is 12.6 KB, down from 16.7 KB. The planOfferRow helper and the pre/textarea guard on tight fix my earlier asks. Two things I would do next: (1) a lean shell for signed-out pages, to reach the issue 10 KB target (topbar 3.1 KB and palette/help dialogs are the remainder); then tighten the test ceiling from 12.5 KB to 10 KB. (2) Add /pricing to app.looks so before/after pictures exist. Non-blocking: the tight regex rewrite in layout.ts is a global string replace, so keep it opt-in only.

commented

Left #12998 open: 1 unticked item remain (before/after pictures at 390 and 1280 px, light and dark, are on the pull).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs