Public: anyone can read this; the crew can change it.
A subscriber gives a friend a forge in one tap, and sees who came #11860
Parked 21d 3h ago
A subscriber can now give a friend a forge from a one-use link, and the giver sees who took it. The thank-you credit and "Send this app" are left out. The new test file passes and tsc, bun scripts/gate.ts and bun scripts/design-lint.ts are clean.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy 9905ca5
-
History
- Register /gifts where the forge lists its pages: reserved name, audit entry, render timing, no look; wrap a comment; home's bound is 47 9905ca5
- Gift links go ahead of the pipeline items ae3db53
- Pin the migration this pull adds f2a86d9
- A subscriber gives a friend a forge: a one-use gift link, who it is from, the app to start with, who took it, and the funnel counts it (#11655) 6247feb
- A crew run on a from-app issue in a private app gets a read-only grant to that one app for the run, and the brief says the app is private (#11821) fa7587e
- No check or build cell starts while the forge's disk is 80% full (#11808) 087b6c6
- Find and fix the root cause of the Ready pipeline bottleneck. (#11836) b23d947
- Each release tick leaves a heartbeat row: the keeper writes one per tick with the sentence it already returns (#11822) bb6145c
- The MCP answers whether the work is growing: open count, net per day, days queued and the pause suggestion (#11760) 872a068
- Decide and write how the vxrail runs the forge with no control plane on another machine (#11828) b261997
- On a 1-CPU forge checks and snapshots start only between crew runs; two or more CPUs start them at once (#11723) 2b9f819
- A closed command palette is not drawn: on a phone it covered every page (display on the bare selector, from the palette's phone layout). Steward, straight to main: the forge was unusable on phones 0556849
- A test per way a reader's text enters a crew brief proves it lands inside its fence and is labelled untrusted (#11810) 19132f9
- The terminal shows a forge's claim link as a QR beside the link, so a phone takes it from the screen (#11759) 259e16c
- A host-interrupted crew run is queued again up to five times with backoff, the count kept as data (#11732) a280065
- From a person's profile an admin opens their account: reset a password, see sign-ins, verify, suspend, and what they own (#11696) d78ace5
- Settings says what a sized forge's cores mean for builds (Compute, both doors) (#11733) eebb066
- A due snapshot waits while a crew run holds the only core, and is taken on the next tick after (#11792) 86e4867
- A queued pull check waits while a crew run holds the only core, and starts when it ends (#11793) 297012b
- Every outside and from-app report reaches a crew brief inside the fence, whoever wrote it (#11797) 05b9118
3 earlier comments
A subscriber can now give a friend a forge from a one-use link, and the giver sees who took it. The thank-you credit and "Send this app" are left out. The new test file passes and tsc, bun scripts/gate.ts and bun scripts/design-lint.ts are clean. 16 related test files also passed. The full suite and the forge's own check have not run here.
What changed
- Who may give: a signed-in person whose email is the payer of an active paid entitlement. Anyone else gets a 404 from
/giftsand no line on home. - Giving: home gets one quiet line, "Give a friend a forge", which links to
/gifts. The giver can pick one of their own public apps to start the friend with, and tick "Let me see what they build". - The link: it is shown once with a message in the giver's voice, and only a hash is kept. The forge never posts it anywhere.
- The friend: the link opens
/forges/newwith "A forge from <giver>" and a ticked "Start with <app>". Their forge is created with a copy of the shared app and an entitlement for the gift's days. - Second use and the giver's view: a second use is refused with "That code has been used as many times as it allows". The giver's
/giftsshows each gift as waiting or taken (which forge, when, "now subscribed", and what was built if allowed). Home says how many friends took one. - Settings: Settings → Billing has a "Gifts from subscribers" form for gifts held per plan (default 3), the plan a gift gives (default small) and its days (default 30).
- Funnel: the Billing funnel shows gifts given, gifts taken and friends now subscribed.
- Code: a migration adds columns to
gift_code; the rest issrc/settings/gifts.ts,src/billing/gifts.ts,src/actions/gifts.tsandsrc/web/pages/gifts.ts. - Docs:
docs/features/gifts.md. - Test:
test/friend-gifts.test.tscovers the whole path: no gifts without a paid forge, copying a link, the stranger seeing the giver and the shared app, the giver seeing it taken, the second use refused, the funnel counts, and the allowance and app validation.
What I left out
- Thank-you credit: the giver gets no month of credit when a friend subscribes, and the amount setting does not exist yet.
- "Send this app": there is no button on app pages.
- Gift end date: the gift sets the entitlement's end date, but no lapse logic reads it for a code's forge, so a gift forge does not yet end on its own.
- Browser tests: the acceptance flow is tested over HTTP, not in a real browser.
- Terminal screen: there is none, so the commit carries
No door:with a reason. - Ownership: the forge does not record who owns a forge, so "subscriber" means the entitlement's payer email matches the person's account email.
Try it: /gifts appears only for a signed-in person whose email is the payer on an active paid entitlement. Make a link there, open it signed out, and start the forge. Then read /gifts as the giver and Settings → Billing as an admin.
The gate's "pipeline first" rule failed because this pull adds a feature (the gift links) and changes nothing in the pipeline. I added an empty commit with a Direction: line saying the gift funnel is the product feature the issue asks for, and that no pipeline item waits on code it touches. bun scripts/gate.ts now exits 0 locally, and the commit is pushed. I did not rerun tsc or the tests, since only a commit message changed. The forge's check on the new push hasn't reported yet.
I did not change the pipeline, so the feature still goes ahead of the pipeline items. Whether it should is for a person to decide; the Direction: line is the stated reason.
A subscriber can now give a friend a forge: /gifts makes a one-use gift link, shows who has taken each one, and the funnel counts them. This push fixes the six failures from the check. I ran the failing test files and the gift test locally, plus tsc, the gate and the design lint, and they all pass. I did not run the full suite; the forge's check does that on this push.
The failures all came from /gifts being new and not yet registered in the places that list the forge's pages:
- Reserved name:
giftsis added to the reserved names, so no one can take it as a username. - Design audit:
/giftshas an entry indocs/design/audit.md. - Server-Timing: the whole
/giftspage now runs inside arenderphase, including the sign-in redirect, so it namessessionandrenderlike every other page. - Looks:
/giftsis in the not-a-page list intest/forge-looks.test.ts. The cap of 24 looks is spent, andtest/friend-gifts.test.tscovers the page. - Header width: two comments over 160 columns are wrapped, one in
src/actions/codes.tsand one intest/home-living.test.ts. - Home statement bound: raised from 46 to 47 in
test/home-living.test.ts. The "Give a friend a forge" line on home reads once to see whether the person may give. I raised the bound rather than cache that read, so home does one more statement per request.
What I left out: the terminal has no gift screen yet, since the link is made to be handed to a friend in a browser. To try it, sign in as someone who pays for a forge, open /gifts from the "Give a friend a forge" line on home, make a link, and open it signed out.
A subscriber can now give a friend a forge from a one-use link, and the giver sees who took it. The thank-you credit and "Send this app" are left out. The new test file passes and
tsc,bun scripts/gate.tsandbun scripts/design-lint.tsare clean. 16 related test files also passed. The full suite and the forge's own check have not run here.What changed
/giftsand no line on home./gifts. The giver can pick one of their own public apps to start the friend with, and tick "Let me see what they build"./forges/newwith "A forge from <giver>" and a ticked "Start with <app>". Their forge is created with a copy of the shared app and an entitlement for the gift's days./giftsshows each gift as waiting or taken (which forge, when, "now subscribed", and what was built if allowed). Home says how many friends took one.gift_code; the rest issrc/settings/gifts.ts,src/billing/gifts.ts,src/actions/gifts.tsandsrc/web/pages/gifts.ts.docs/features/gifts.md.test/friend-gifts.test.tscovers the whole path: no gifts without a paid forge, copying a link, the stranger seeing the giver and the shared app, the giver seeing it taken, the second use refused, the funnel counts, and the allowance and app validation.What I left out
No door:with a reason.Try it:
/giftsappears only for a signed-in person whose email is the payer on an active paid entitlement. Make a link there, open it signed out, and start the forge. Then read/giftsas the giver and Settings → Billing as an admin.Closes #11655