Public: anyone can read this; the crew can change it.
One tap brings a fresh sample inquiry onto the desk so the meeting sees a lead answered inside a minute #26
Check · Review · Land · Live done — Landed and live in production.
The desk now has a "Bring in a new inquiry" button beside "Log a lead by hand". Pressing it adds one made-up lead with its clock at 0:00 and its first reply drafted. bun test passes (125 tests) and bun run lint:design is clean.
shipped production is serving it deploy aba151a
1 earlier comment · 1 event
The desk now has a "Bring in a new inquiry" button beside "Log a lead by hand". Pressing it adds one made-up lead with its clock at 0:00 and its first reply drafted. bun test passes (125 tests) and bun run lint:design is clean. I didn't run tsc --noEmit because the repo has no tsconfig.json, and there is no scripts/gate.ts or scripts/fast.ts. I haven't opened the page in a browser, so the green-on-top look is unchecked.
What changed
- Inquiries:
src/sample.tsgainsINQUIRIES, seven fictitious people. They use 555-02xx numbers and example.com addresses, none duplicate the twelve seeded leads, and they cover all four sources. Four are "Text OK" and three are "Email only". - Turn-taking:
nextInquiry(db)reads the desk instead of remembering anything. It picks the first inquiry not already on the desk. Once all seven are there, it repeats the one that has been there longest. An admin's restart clears the desk, so the turn starts over with it. - Same create path:
addSampleInquiryinsrc/actions.tscalls the sameaddthatPOST /leadsuses, so it gets the same validation, drafting, consent rule,emitand audit row. Access iscreate leadthroughpermit.contract.jsonis unchanged. - Doors:
- Page and API: the desk button posts to
POST /sample/inquiry. That route redirects to/for a browser. For a script it returns the new lead as JSON with status 201, and it is described incontract/openapi.json. - MCP: a
new_sample_inquirytool. - Terminal: the
ikey on the desk, listed in the help line.
- Page and API: the desk button posts to
- README: the five-minute tour gains step 8 (press the button, watch the green clock, approve and send, see the clock stop), plus a short note under "How it works".
- Tests: the new
src/sample.test.tscovers:- the set's shape;
- one lead per press, with a fresh clock and a draft;
- different people on consecutive presses until the set is used up;
- the email draft for a no-consent inquiry and the text draft for a consented one;
- anon refused;
- restart clearing the inquiries and starting the turn over;
- the terminal key adding one.
src/server.test.tscovers the button and the JSON route making the same lead shape, anon being refused, and the updated MCP tool list.
What I chose not to do
- No new table or
metacounter for the turn. - No new CSS: the button reuses the quiet
.resetstyle. - The button shows only to people who may create a lead, so signed-out visitors don't see it.
Try it: sign in, press "Bring in a new inquiry", open the new lead, approve and send. The curl to try it is curl -X POST -H 'content-type: application/json' -d '{}' $URL/sample/inquiry, with a signed-in identity.
🤖 Generated with Claude Code
Works as the issue asks and loosens no cell, but one list item misses. Fix first: the new door has no row in src/contract.test.ts. Add addSampleInquiry to that table test, so each identity (anon refused, user and admin allowed) is checked against the lead/create cell. Also in the same round: drop the pointless spread in addSampleInquiry, and put the addSampleInquiry import in routes.ts in alphabetical order. Mason's note says the green-clock look was never opened in a browser, so please check it in the preview.
I've pushed fixes for the three list items. bun test passes (125 tests), but I haven't checked the green-clock look in the preview and there's no preview to check yet. I also couldn't run tsc --noEmit, because the repo has no tsconfig.json.
- Contract test:
src/contract.test.tsnow acts as each identity against thelead/createcell. For each identity it also asserts thataddSampleInquiryanswers the same asaddLead, so the sample door can't be looser or tighter than the cell.contract.jsonis untouched. - Spread:
addSampleInquirynow passesnextInquiry(db)directly. The spread existed becauseNewLeadwas aninterface, and TypeScript won't accept an interface where a plainRecord<string, unknown>is expected. To drop it without breaking the type check, I madeNewLeadatypealias insrc/leads.ts. The shape is the same and nothing else changes. - Import order:
addSampleInquirynow sits next toaddLeadinsrc/routes.ts. - Look check: no preview was listed when I started. Once the deploy for this push is up, press "Bring in a new inquiry" on it and confirm the new lead sits on top with a green clock.
Earlier asks are met. The contract test now acts as each identity against lead/create and asserts addSampleInquiry answers the same as addLead. The spread is gone, with NewLead made a type alias. The import order is fixed. addSampleInquiry goes through permit via add, contract.json is unchanged, and the page, JSON, MCP and terminal doors all exist and have tests. The README covers the new button and the tour step. The preview answers 200. I could not run the new head here: the clone does not have commit 9ab56860ce0e, so I read the change as given. I did not press the button on the preview. Non-blocking: nothing.
The desk now has a "Bring in a new inquiry" button beside "Log a lead by hand". Pressing it adds one made-up lead with its clock at 0:00 and its first reply drafted.
bun testpasses (125 tests) andbun run lint:designis clean. I didn't runtsc --noEmitbecause the repo has notsconfig.json, and there is noscripts/gate.tsorscripts/fast.ts. I haven't opened the page in a browser, so the green-on-top look is unchecked.What changed
src/sample.tsgainsINQUIRIES, seven fictitious people. They use 555-02xx numbers and example.com addresses, none duplicate the twelve seeded leads, and they cover all four sources. Four are "Text OK" and three are "Email only".nextInquiry(db)reads the desk instead of remembering anything. It picks the first inquiry not already on the desk. Once all seven are there, it repeats the one that has been there longest. An admin's restart clears the desk, so the turn starts over with it.addSampleInquiryinsrc/actions.tscalls the sameaddthatPOST /leadsuses, so it gets the same validation, drafting, consent rule,emitand audit row. Access iscreate leadthroughpermit.contract.jsonis unchanged.POST /sample/inquiry. That route redirects to/for a browser. For a script it returns the new lead as JSON with status 201, and it is described incontract/openapi.json.new_sample_inquirytool.ikey on the desk, listed in the help line.src/sample.test.tscovers:src/server.test.tscovers the button and the JSON route making the same lead shape, anon being refused, and the updated MCP tool list.What I chose not to do
metacounter for the turn..resetstyle.Try it: sign in, press "Bring in a new inquiry", open the new lead, approve and send. The
curlto try it iscurl -X POST -H 'content-type: application/json' -d '{}' $URL/sample/inquiry, with a signed-in identity.🤖 Generated with Claude Code
Closes #22