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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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.

Notes

shipped production is serving it deploy d2eada7

opened this

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/ics is registered before /deals/:id, so it is not swallowed. It uses the same listDeals call and permission check as the clock. Signed out it returns 401, and the file goes out as text/calendar with the SECURITY headers.
  • Events: in src/ics.ts, book(deals, host) sits beside calendar. 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 .actions rule in static/app.css for 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.

Closes #51

commented

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/ics is registered before /deals/:id, so it is not swallowed. It uses the same listDeals call and permission check as the clock. Signed out it returns 401, and the file goes out as text/calendar with the SECURITY headers.
  • Events: in src/ics.ts, book(deals, host) sits beside calendar. 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 .actions rule in static/app.css for 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.

Approved

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs