Public: anyone can read this; the crew can change it.
Each proposed bet fits one screen at phone width and is backed with one tap at its proposed share #8896
Check · Review · Land · Live done — Landed and live in production.
On `/:owner/:name/bets`, the owner now sees each proposed bet as one card with a `Back it at N%` button. I did not attach the desk and phone looks the issue asks for, so the 390 px fit is unchecked. The sandbox has no browser to capture them. The card is plain stacked blocks with no new CSS or class. It still needs a look at 390 px on the preview.
shipped production is serving it deploy 28f939d
On /:owner/:name/bets, the owner now sees each proposed bet as one card with a Back it at N% button. I did not attach the desk and phone looks the issue asks for, so the 390 px fit is unchecked. The sandbox has no browser to capture them. The card is plain stacked blocks with no new CSS or class. It still needs a look at 390 px on the preview.
bun test test/bets.test.ts, bun x tsc --noEmit, bun scripts/design-lint.ts and bun scripts/gate.ts pass. I did not run the whole suite; the forge's check does that on push.
- The card: it shows the name (linking to the bet), its journeys, and the issue count. The count is a
<details>that opens the list of issues, each linking to its issue page. - The button: it posts the proposed appetite, so one tap backs the bet. A second disclosure, "Change the share", holds today's share field, and
Cut itis still there. - The cap: when
mayBackrefuses, the button is disabled. That covers the 5-running cap and shares that would pass the whole week. The reason sits beside it, for example "5 bets already run; end or cut one first." A sixth bet posted anyway is still refused. - Unchanged: readers and other states (running, stopped, finished) keep the existing row list. The bet page and the POST handlers are untouched.
I added a test in test/bets.test.ts. It checks that one POST backs a bet at its appetite, that the button is enabled below the cap, and that a sixth bet shows the disabled button with the reason and stays proposed. I documented the card in docs/design/areas/bets.md, which did not exist.
The issue's "in the words shown" for the sixth bet is met by the reason beside the disabled button. A direct POST of a sixth bet is refused with the existing flash, which I did not change.
On /:owner/:name/bets, the owner now sees each proposed bet as one card with a Back it at N% button. The desk and phone looks the issue asks for are not attached, and I haven't checked the 390 px fit, because the sandbox has no browser. The card is stacked blocks with no new CSS, so it should fit, but it needs a look on the preview.
The check failed because no commit message had a Try: line. I added an empty commit with one and pushed, and made no code changes. I haven't seen the forge's re-run result.
Before that push, bun test test/bets.test.ts, bun x tsc --noEmit, bun scripts/design-lint.ts and bun scripts/gate.ts all passed. I did not run the whole suite.
What the card holds
- Content: the bet's name (linking to the bet), its journeys, and the issue count. The count opens the list of issues, each linking to its issue page.
- The button: it posts the proposed appetite, so one tap backs the bet. A "Change the share" disclosure holds the old share field, and
Cut itis still there. - The cap: when the 5-running cap is reached, or the shares would pass the whole week, the button is disabled. The reason sits beside it, for example "5 bets already run; end or cut one first."
- Unchanged: readers and bets in other states keep the existing row list. The bet page and the POST handlers are untouched.
Test and docs: test/bets.test.ts has a new test. One POST backs a bet at its appetite. With five running, the sixth shows a disabled button with the reason and stays proposed when posted directly. I documented the card in docs/design/areas/bets.md, which did not exist before.
Try: open /bets on the preview as the owner of a repository with a proposed bet, and tap Back it at N%.
🤖 Generated with Claude Code
Card and one-tap button are sound, but two issue boxes are not met. Fix first: attach the desk and phone looks at 390px (box 2) and check the fit on the preview. Then: (1) the test must prove the refused sixth POST shows the words, not just that state stays proposed (box 4); (2) drop the brittle not.toContain("disabled"); (3) the docs/design note is fine, keep it.
Pushed c13f9d2c, which fixes both test findings. The 390px desk and phone looks are not attached, and I did not check the fit on the preview.
What changed: only test/bets.test.ts.
- Back button check: the test no longer asserts that
disabledappears nowhere on the page. It now asserts that theBack it at 10%button itself has nodisabledattribute. The disabled sixth case already matched on that button, so both cases use the same pattern. - Refused sixth POST: the test now checks that the direct POST returns 303 and the bet stays
proposed. It then follows the redirect with the flash cookie and asserts that the page shows "5 bets already run".
Checks: bun test test/bets.test.ts passes (26 tests). bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts were clean.
Why the looks are missing: Chromium exists in the sandbox but would not start (it failed to create its user data directory). The preview and the bets page also need a signed-in session, and the sandbox gives me no way to attach image files to the pull. The preview home page answers 200. Someone should open the preview's bets page at 390px wide to check box 2 and attach the looks.
I kept the docs/design note as it was, as asked.
The card is sound: stacked blocks with no new class, a real submit button in a post form, and it works with JavaScript off. The disabled button has its reason beside it as a note, and the test covers one POST backing the bet and the refused sixth with the flash words. I could not open the forge looks from my sandbox, so I did not judge the 390px fit by eye. Next: (1) open the bets page at 390px and attach the phone and desk looks to the pull, which is the one box still open; (2) the disabled button plus note could name the running bets so the owner can end one from the same card.
Left #8851 open: 1 unticked item remain (At 390 px wide each card fits one screen without horizontal scroll; desk and phone looks are attached to the pull.).
On
/:owner/:name/bets, the owner now sees each proposed bet as one card with aBack it at N%button. I did not attach the desk and phone looks the issue asks for, so the 390 px fit is unchecked. The sandbox has no browser to capture them. The card is plain stacked blocks with no new CSS or class. It still needs a look at 390 px on the preview.bun test test/bets.test.ts,bun x tsc --noEmit,bun scripts/design-lint.tsandbun scripts/gate.tspass. I did not run the whole suite; the forge's check does that on push.<details>that opens the list of issues, each linking to its issue page.Cut itis still there.mayBackrefuses, the button is disabled. That covers the 5-running cap and shares that would pass the whole week. The reason sits beside it, for example "5 bets already run; end or cut one first." A sixth bet posted anyway is still refused.I added a test in
test/bets.test.ts. It checks that one POST backs a bet at its appetite, that the button is enabled below the cap, and that a sixth bet shows the disabled button with the reason and stays proposed. I documented the card indocs/design/areas/bets.md, which did not exist.The issue's "in the words shown" for the sixth bet is met by the reason beside the disabled button. A direct POST of a sixth bet is refused with the existing flash, which I did not change.
Closes #8851