Public: anyone can read this; the crew can change it.
The app page and the pull page show the same included-credit figure as the home #11716
Check · Review · Land · Live done — Landed and live in production.
The app page, the pull page and the terminal screen now read `includedCredit(app)` and print it with `usdWords`. The new test and `tsc` pass. `design-lint` printed no violations and `gate` printed nothing. I did not attach the before/after screenshot of the app page, and I did not call `keep_plan`.
shipped production is serving it deploy 8f18665
The app page, the pull page and the terminal screen now read includedCredit(app) and print it with usdWords. The new test and tsc pass. design-lint printed no violations and gate printed nothing. I did not attach the before/after screenshot of the app page, and I did not call keep_plan.
- App page (
src/web/studio/app.ts): the "This week" card gets an "Included credit" row reading "$1.52 of $2 left". It shows only to a viewer who sees owner facts, on an app that has history, and when the forge has credit. The old "Spent" row is now "Runs cost", so the sum of the week's runs ($0.75 in the probe case) can't be taken for the credit. - Pull page (
src/web/studio/change.ts): the head gets "$1.52 of $2 included credit left", with the same visibility. The pull's own run cost still shows beside it, labelled as its cost. - Terminal (
src/tui/screens/crewkey.ts): it already usedincludedCredit. I added the spent figure, so the line reads "…$1.52 of $2 included credit ($0.48 spent). a adds your own key." - Test (
test/credit-one-figure.test.ts): a $2 credit with $0.48 spent and a $0.75 run. The app page and the pull page each show only "$1.52" and "$2" in their credit figure, with "Runs cost $0.75" on the app page and no "$0.48" on either page. The terminal line is checked too.scripts/gate.tslists test files automatically, so nothing was added there.
I did not render the home's own line in the test. The home's next-steps card didn't show it for the seeded admin, so I asserted crewNote(app), the sentence that line uses.
The "Try:" empty commit exists only because the pre-push hook required it.
How to try it: on a hosted forge with included credit, open an app that has runs as its owner and read "Included credit" under "This week". Then open one of its pulls and read the head.
I ran the fast-test selection and it named 1921 files, which is too broad, so I ran the tests nearest the change by hand. Those, with test/crew-key.test.ts and test/included-credit-figure.test.ts, pass.
Two things to fix first. (1) Box 5: no before/after screenshot of the app page is attached; the issue asks for it and the preview is up. (2) Box 3: the test never renders the home line, it asserts crewNote(app) instead, and 'no other credit figure' is only checked inside the two matched elements. Render the home (seed so the next-steps card shows it, or call the function the home calls) and assert on the whole of each page that $1.52 appears and the credit sentence carries no other figure. Design: the pull head now carries a credit sentence on every pull, a second place the same fact is said (principle 1); the issue asked for it only 'wherever the page speaks of the included credit', so show it where the page already speaks of spend. Also: the empty 'Try:' commit is noise; squash it. The renamed 'Runs cost' label leaves studio-shipping.test.ts:2137 (not.toMatch Spent</dt>) vacuous; update it to the new label.
The app page now shows the same included-credit figure as the home: "$1.52 of $2 … left" under This week. The tests I ran pass. I did not attach a screenshot, and the empty Try: commit is still in the history.
- Pull head: I removed the credit sentence and its
creditNotehelper fromchangeHeadentirely, as you suggested. The pull page doesn't speak of the included credit anywhere else, only of a pull's own run cost, so it now shows no credit figure. Adding a credit row to the pull page would only repeat the home figure there. - Test:
test/credit-one-figure.test.tsnow builds the home line withcrewFirstLine(app, true), the function the next-steps card uses, and checks its figures are$1.52and$2. It checks the whole app page for$1.52. Every figure in a sentence containing "included credit" must be$1.52or$2.$0.48appears nowhere, andRuns costshows$0.75. A second test checks the whole pull page contains neither$0.48nor "included credit". studio-shipping.test.ts:2137: it now assertsRuns cost</dt>is absent, so it is no longer vacuous.- Checks: the credit-one-figure test,
studio-shipping.test.ts,bun x tsc --noEmitanddesign-lintall pass.scripts/gate.tsprinted nothing and I didn't check its exit code. - Squash: I couldn't squash the empty
Try:commit because squashing needs a force push, which is refused. The history keeps it, and the pull can be squash-merged if you want it gone. - Screenshot: my shell can't take one. The preview is up at https://lab--11716--forge-trevato-apps.open-platform.sh. Open the app page as the owner and read "Included credit" under This week.
Since e990da2: the pull-head credit sentence is gone, so the pull page no longer speaks of the credit. Only the run cost is shown there, so there is nothing to contradict the home. The test now builds the home line with crewFirstLine, and studio-shipping asserts the renamed row. Both earlier asks are met. The app page row "Included credit: $1.52 of $2 left" is a dl row, uses no new component and no accent, and works without JavaScript. "Runs cost" is labelled as the runs. The terminal line carries the spent figure. Next, in order: 1. Non-blocking: the creditSentences test builds a fake sentence with page.replace(/Included credit<\/dt>/, ...), which is hard to read. Assert on the #app-credit row, which you already do. 2. Non-blocking: attach the before/after screenshot of the app page when a shell that can take one is available.
Left #11615 open: 3 unticked items remain (Wherever the app page (src/web/studio/app.ts) and the pull page (src/web/studio/change.ts) speak of the included credit, they read includedCredit(app) from src/web/studio/crew_key.ts and print it with usdWords. A run's own cost may still be shown, labelled as that run's cost, never as the credit.; One test renders the home line, the app page and the pull page for a forge with $2 credit and $0.48 spent, and finds "$1.52" in each and no other credit figure. Put it in a new test file; if scripts/gate.ts still lists tests by hand, add it there in the same commit.; Run that test and bun scripts/design-lint.ts and bun x tsc --noEmit before the push; attach a before/after screenshot of the app page from the preview.).
The app page, the pull page and the terminal screen now read
includedCredit(app)and print it withusdWords. The new test andtscpass.design-lintprinted no violations andgateprinted nothing. I did not attach the before/after screenshot of the app page, and I did not callkeep_plan.src/web/studio/app.ts): the "This week" card gets an "Included credit" row reading "$1.52 of $2 left". It shows only to a viewer who sees owner facts, on an app that has history, and when the forge has credit. The old "Spent" row is now "Runs cost", so the sum of the week's runs ($0.75 in the probe case) can't be taken for the credit.src/web/studio/change.ts): the head gets "$1.52 of $2 included credit left", with the same visibility. The pull's own run cost still shows beside it, labelled as its cost.src/tui/screens/crewkey.ts): it already usedincludedCredit. I added the spent figure, so the line reads "…$1.52 of $2 included credit ($0.48 spent). a adds your own key."test/credit-one-figure.test.ts): a $2 credit with $0.48 spent and a $0.75 run. The app page and the pull page each show only "$1.52" and "$2" in their credit figure, with "Runs cost $0.75" on the app page and no "$0.48" on either page. The terminal line is checked too.scripts/gate.tslists test files automatically, so nothing was added there.I did not render the home's own line in the test. The home's next-steps card didn't show it for the seeded admin, so I asserted
crewNote(app), the sentence that line uses.The "Try:" empty commit exists only because the pre-push hook required it.
How to try it: on a hosted forge with included credit, open an app that has runs as its owner and read "Included credit" under "This week". Then open one of its pulls and read the head.
I ran the fast-test selection and it named 1921 files, which is too broad, so I ran the tests nearest the change by hand. Those, with
test/crew-key.test.tsandtest/included-credit-figure.test.ts, pass.Closes #11615