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

Every reminder signs off with the agent's name, brokerage, phone and email, and the README says how to make the app carry your own #41

Merged opened this

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

Merged

Every new reminder draft now ends with a two-line sign-off, Name, Brokerage then phone · email. The agent's phone and email also show in the header, the client timeline and the terminal. What changed Settings: src/env.ts reads DEALCLOCKPHONE and DEALCLOCKEMAIL, defaulting to (555) 010-0142 and [email protected].

Notes

shipped production is serving it deploy d2eada7

opened this

Every new reminder draft now ends with a two-line sign-off, Name, Brokerage then phone · email. The agent's phone and email also show in the header, the client timeline and the terminal.

What changed

  • Settings: src/env.ts reads DEAL_CLOCK_PHONE and DEAL_CLOCK_EMAIL, defaulting to (555) 010-0142 and [email protected].
  • Validation: a phone must be digits, spaces and + ( ) - ., at most 30 characters. An email must have one @ and at most 254 characters. A bad value falls back to the sample and logs one DEAL_CLOCK_… line, with no crash.
  • Drafts: Agent in src/reminders.ts carries phone and email. A new signOff() writes the sign-off. The page, MCP and /tick all use the same drafts/draftsFor path, so their draft words are identical. A sent reminder still reads back the words that were approved.
  • Pages: the header and client timeline show the phone as a tel: link and the email as a mailto: link, both escaped. The terminal header and its client timeline print them as plain text. A small .agent-contact rule in static/app.css styles the line.
  • Docs: README has a Make it yours section, and docs/TECHNICAL.md lists the four variables.
  • Tests: the new src/signoff.test.ts covers the sign-off format, sent words surviving an agent change, validation, the boot fallback with its log line, and the timeline links. Existing tests only gained phone and email on their test agents; no expected draft text changed.

Checks

  • The full bun test passes (135 tests).
  • bun scripts/lint-design.ts printed nothing. This repo has no scripts/design-lint.ts, so I ran its lint-design.ts instead.
  • I could not run bun x tsc --noEmit. bun x pulled in a TypeScript 7 compiler that only prints its help text in this sandbox, so the type check has not run. The forge's check will cover it.

No contract cell changed. I did not add a mailto/tel control to the terminal beyond plain text.

To try it: set DEAL_CLOCK_PHONE and DEAL_CLOCK_EMAIL, open any deal's reminder draft, and look at the header and /deals/:id/timeline.

🤖 Generated with Claude Code

Closes #36

1 earlier comment · 1 event
commented

Every new reminder draft now ends with a two-line sign-off, Name, Brokerage then phone · email. The agent's phone and email also show in the header, the client timeline and the terminal.

What changed

  • Settings: src/env.ts reads DEAL_CLOCK_PHONE and DEAL_CLOCK_EMAIL, defaulting to (555) 010-0142 and [email protected].
  • Validation: a phone must be digits, spaces and + ( ) - ., at most 30 characters. An email must have one @ and at most 254 characters. A bad value falls back to the sample and logs one DEAL_CLOCK_… line, with no crash.
  • Drafts: Agent in src/reminders.ts carries phone and email. A new signOff() writes the sign-off. The page, MCP and /tick all use the same drafts/draftsFor path, so their draft words are identical. A sent reminder still reads back the words that were approved.
  • Pages: the header and client timeline show the phone as a tel: link and the email as a mailto: link, both escaped. The terminal header and its client timeline print them as plain text. A small .agent-contact rule in static/app.css styles the line.
  • Docs: README has a Make it yours section, and docs/TECHNICAL.md lists the four variables.
  • Tests: the new src/signoff.test.ts covers the sign-off format, sent words surviving an agent change, validation, the boot fallback with its log line, and the timeline links. Existing tests only gained phone and email on their test agents; no expected draft text changed.

Checks

  • The full bun test passes (135 tests).
  • bun scripts/lint-design.ts printed nothing. This repo has no scripts/design-lint.ts, so I ran its lint-design.ts instead.
  • I could not run bun x tsc --noEmit. bun x pulled in a TypeScript 7 compiler that only prints its help text in this sandbox, so the type check has not run. The forge's check will cover it.

No contract cell changed. I did not add a mailto/tel control to the terminal beyond plain text.

To try it: set DEAL_CLOCK_PHONE and DEAL_CLOCK_EMAIL, open any deal's reminder draft, and look at the header and /deals/:id/timeline.

🤖 Generated with Claude Code

Changes requested — before the latest push

The sign-off and settings work and the contract is untouched, but two shipped behaviours have no test and there are a few cleanups. Fix these in one round:

  1. FIRST: add tests for the header contact line (layout) and the terminal header and client timeline. Both are new behaviour, and signoff.test.ts only covers the timeline page. Each test must fail if the line is removed.
  2. Move the /** Whose deals these are ... */ comment in src/env.ts back onto agent. It now sits over PHONE_PATTERN.
  3. The tel/mailto markup is copied into layout.ts and timeline.ts. Extract one helper, for example contactLinks(agent) in a small module, and use it in both.
  4. Email validation accepts ?, & and #, so [email protected]?bcc=x would pass and become a mailto query. Reject those characters, or encode the address in the href, and test it.
  5. bun x tsc --noEmit was not run. Run it, or state in the pull that the forge check will cover it.

No contract cell was loosened, and the draft path is shared by the page, MCP and /tick.

commented

All five review points are addressed and pushed in 2a23e47. The full bun test passes (138 tests) and scripts/lint-design.ts printed nothing.

  1. Tests for the new lines (src/signoff.test.ts):

- One test checks that the header from layout() has the agent-contact line with the tel: and mailto: links. - One test checks that the terminal header and its client timeline both print (555) 010-0142 · [email protected]. - Each fails if its line is removed.

  1. Comment moved: the Whose deals these are comment is back on agent in src/env.ts. The two validators now sit under their own comment.
  2. One helper: contactLinks(agent) lives in the new src/pages/contact.ts. layout.ts and timeline.ts both use it, and a test checks that it escapes what it is given.
  3. Email validation: the address is now an allowlist, [A-Za-z0-9._+-] before the @ and [A-Za-z0-9.-] after it. That rejects ?, & and #, so [email protected]?bcc=x falls back to the sample. A test covers four injecting forms.
  4. tsc: I could not run it. The repo has no tsconfig.json, and bun x tsc fetches a TypeScript 7 compiler that only prints its help text in this sandbox. The forge's check will cover the type check.

No contract cell changed.

🤖 Generated with Claude Code

Approved

All five earlier asks are met: tests for the header and terminal lines, the env comment restored, one contactLinks helper, an allowlist email check that rejects ?, & and #, and the tsc note. Settings are validated at boot with a logged fallback, output is escaped, tel: gets digits only, and no contract cell changed. The terminal prints the same contact line as the page. Non-blocking: the last sentence in docs/TECHNICAL.md Settings is now one long line and could be rewrapped.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs