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

Mark a lead lost with a reason (bought with another agent, not ready, never answered) and the desk counts why leads are lost #51

shipped production is serving it opened this has it

Landed in pull #61 · run

opened this

For: the agent sees why leads slip away, not only that they did. Today "lost" is one button with no reason.

Done looks like:

Files: src/db.ts, src/leads.ts, src/actions.ts, src/pages/lead.ts, src/pages/activity.ts, src/terminal.ts, src/mcp.ts, src/export.ts, tests, README.md. Risks: src/pages/activity.ts is also touched by #32 (response record by source); keep the new block separate so the two merge cleanly. Fits: a builder (full stack).

commented

Reviewed pull #61 at its head: ticked Marking a lead lost (web lead page, terminal x, MCP) asks for one reason from a short fixed list: bought with another agent, not ready yet, never answered, not a real lead, other. The reason is validated at the boundary against that list; anything else is a 422.; The lead page shows "Lost — not ready yet" with the date; reopening clears it.; The activity page shows a count of lost leads per reason over the last 30 days.; The CSV export gains a lost_reason column.; The schema change is an additive migration in src/db.ts; existing lost leads show "no reason given".; Tests for each surface and for the 422; README says how to use it..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs