Public: anyone can read this; the crew can change it.
One Add all to calendar file on the clock carries every open date of every open deal, so the agent's own calendar holds the whole book #56
Check · Review · Land · Live done — Landed and live in production.
The clock now has an "Add all to calendar" button that downloads one .ics file with every open date of every open deal. It is a plain link, so it works without JavaScript. The tests I ran pass: src/deals.test.ts, src/server.test.ts and src/design.test.ts, 71 in all.
shipped production is serving it deploy d2eada7
The clock now has an "Add all to calendar" button that downloads one .ics file with every open date of every open deal. It is a plain link, so it works without JavaScript. The tests I ran pass: src/deals.test.ts, src/server.test.ts and src/design.test.ts, 71 in all. I did not run bun x tsc --noEmit: it printed tsc's help text instead of checking, and I did not try another way to run it. bun scripts/design-lint.ts doesn't exist in this repo (the script is scripts/lint-design.ts), and bun scripts/lint-design.ts printed nothing.
- Route:
GET /deals/icsis registered before/deals/:id, so it is not swallowed. It uses the samelistDealscall and permission check as the clock. Signed out it returns 401, and the file goes out astext/calendarwith theSECURITYheaders. - Events: in
src/ics.ts,book(deals, host)sits besidecalendar. I moved the event-building and file-wrapping code into shared helpers, so the per-deal file is built the same way as before. Each event uses the same UID (deadline-<id>@host) and the same two alarms (three days before, 9 a.m. the day of) as the per-deal file, so importing both doesn't duplicate. The summary is "Label — address". Done dates and closed deals are left out. A removed date is already gone from the deal data, so there is nothing to skip. - Button: it sits next to "New deal", and there is a small
.actionsrule instatic/app.cssfor the spacing. The README walk-through step 12 has one added sentence. - Tests:
- src/deals.test.ts: the file for the four sample deals has the right event count and two alarms per event. The UIDs match the per-deal file. A done date and a closed deal drop out, and lines are folded to 75 octets.
- src/server.test.ts: 401 signed out, the 200 response headers, and the link on the clock.
I did not add the route to src/openapi.ts: it only lists /api routes, and the per-deal .ics isn't there either. No contract.json cell changed.
Clean. GET /deals/ics goes through listDeals (permit), so a guest gets 401 and a user sees only their own deals. The file uses the same UIDs and alarms as the per-deal file, leaves out done dates and closed deals, and is folded. The output is escaped through icsText and the SECURITY headers are set. Tests cover the 401, the headers, the link on the clock, and the book content. No contract cell changed, no new dependency, and the README is updated. I did not check the new route in the preview as a signed-in user, only that it answers 401 to my token. The terminal has no calendar-file door, same as the per-deal file today.
The clock now has an "Add all to calendar" button that downloads one
.icsfile with every open date of every open deal. It is a plain link, so it works without JavaScript. The tests I ran pass:src/deals.test.ts,src/server.test.tsandsrc/design.test.ts, 71 in all. I did not runbun x tsc --noEmit: it printed tsc's help text instead of checking, and I did not try another way to run it.bun scripts/design-lint.tsdoesn't exist in this repo (the script isscripts/lint-design.ts), andbun scripts/lint-design.tsprinted nothing.GET /deals/icsis registered before/deals/:id, so it is not swallowed. It uses the samelistDealscall and permission check as the clock. Signed out it returns 401, and the file goes out astext/calendarwith theSECURITYheaders.src/ics.ts,book(deals, host)sits besidecalendar. I moved the event-building and file-wrapping code into shared helpers, so the per-deal file is built the same way as before. Each event uses the same UID (deadline-<id>@host) and the same two alarms (three days before, 9 a.m. the day of) as the per-deal file, so importing both doesn't duplicate. The summary is "Label — address". Done dates and closed deals are left out. A removed date is already gone from the deal data, so there is nothing to skip..actionsrule instatic/app.cssfor the spacing. The README walk-through step 12 has one added sentence.-
src/deals.test.ts: the file for the four sample deals has the right event count and two alarms per event. The UIDs match the per-deal file. A done date and a closed deal drop out, and lines are folded to 75 octets. -src/server.test.ts: 401 signed out, the 200 response headers, and the link on the clock.I did not add the route to
src/openapi.ts: it only lists/apiroutes, and the per-deal.icsisn't there either. Nocontract.jsoncell changed.Closes #51