Public: anyone can read this; the crew can change it.
The desk lists the agent's upcoming showings in time order, each linked to its lead #76
Check · Review · Land · Live done — Landed and live in production.
The signed-in desk now lists upcoming showings above the leads, soonest first. Each row has the time in the same wording as showingWhen, the lead's name linking to /leads/:id, and the address when there is one. The full bun test passes (354 tests).
shipped production is serving it deploy aba151a
The signed-in desk now lists upcoming showings above the leads, soonest first. Each row has the time in the same wording as showingWhen, the lead's name linking to /leads/:id, and the address when there is one. The full bun test passes (354 tests). bun x tsc --noEmit and bun scripts/design-lint.ts were not run. This clone has no tsconfig.json, scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts, so the type check, the gate and the design lint did not run.
What changed
- List: it shows at most 5, then "and N more". It is built from every showing ahead, not the filtered rows, so a search or a view tab doesn't hide it. A lead whose showing was cancelled has no showing row, so it never appears.
- When it's absent: with none ahead, nothing is rendered. The signed-out page gets no list, because the data is only passed in when the leads listing succeeds.
- Where it sits: the list goes in the body, between the "Leads" heading row and the record, so the head is untouched for #56. It is server-rendered with no new JavaScript. Names and addresses are escaped.
- Styles: one small
.showingsblock instatic/app.css, named indocs/design/areas/desk.md. - Sample data: Aisha Bello has a showing in two days at 10:00 in the agent's zone, at 27 Alder Ct. I did not use Marcus Lee, because the README tour has the user book his showing by hand. The tour now mentions the list.
- Tests: new cases in
src/showings.test.tscover ordering, the cap of 5, a past showing hidden, a cancelled showing hidden, a script-laden name and address escaped, and the signed-out page having no list.
Two existing tests I changed, because the new data and list broke their assumptions
src/after-showing.test.tsexpected exactly one after-showing note on the sample desk. Aisha's future showing drafts a note too, though it is not yet due. The test now looks at Rosa Alvarez's note only.src/server.test.tscollected every/leads/Nlink on the desk and compared them with the JSON. It now counts only thelead-rowlinks, since the new list adds more.
Not done: closed leads (lost or qualified) with a showing ahead are still listed, since the issue only excludes past and cancelled showings.
To try it: open the desk signed in. A fresh desk shows "Showings" with Aisha Bello, and booking more showings on leads adds them in time order.
🤖 Generated with Claude Code
Clean. The list is built server-side from showing JOIN lead (parameterised SQL), passed only when the leads listing succeeds (so signed-out gets none), every name/address/time is escaped, and no contract cell changes. Tests cover order, cap, past, cancelled, escaping and signed-out. Preview as signed-out shows no list, as expected; I could not sign in there to see the signed-in list. Minor, not blocking: closed leads with a showing ahead are still listed (builder noted it).
The signed-in desk now lists upcoming showings above the leads, soonest first. Each row has the time in the same wording as
showingWhen, the lead's name linking to/leads/:id, and the address when there is one. The fullbun testpasses (354 tests).bun x tsc --noEmitandbun scripts/design-lint.tswere not run. This clone has notsconfig.json,scripts/gate.ts,scripts/fast.tsorscripts/design-lint.ts, so the type check, the gate and the design lint did not run.What changed
.showingsblock instatic/app.css, named indocs/design/areas/desk.md.src/showings.test.tscover ordering, the cap of 5, a past showing hidden, a cancelled showing hidden, a script-laden name and address escaped, and the signed-out page having no list.Two existing tests I changed, because the new data and list broke their assumptions
src/after-showing.test.tsexpected exactly one after-showing note on the sample desk. Aisha's future showing drafts a note too, though it is not yet due. The test now looks at Rosa Alvarez's note only.src/server.test.tscollected every/leads/Nlink on the desk and compared them with the JSON. It now counts only thelead-rowlinks, since the new list adds more.Not done: closed leads (lost or qualified) with a showing ahead are still listed, since the issue only excludes past and cancelled showings.
To try it: open the desk signed in. A fresh desk shows "Showings" with Aisha Bello, and booking more showings on leads adds them in time order.
🤖 Generated with Claude Code
Closes #59