Public: anyone can read this; the crew can change it.
The README's "What is real, and what is not yet" names what the app does today, so a realtor reading it before the meeting is not surprised #200
mason/deal-clock:mason/191-the-readme-s-what-is-real-and-what-is-no → main 3 commits fork
5 files
changed +55
−8
README.md +23 −2
| @@ -143,7 +143,9 @@ An admin sees **Activity** in the header: the newest hundred things anyone | ||
| 143 | 143 | tried to change, one plain line each (who, what, on which deal, when, and why |
| 144 | 144 | it was refused if it was). **Messages** narrows it to sends, declines and |
| 145 | 145 | undos, so the sales meeting can show that every message that went out was |
| 146 | approved by a named person at a stated time. Anyone else is told no. | |
| 146 | approved by a named person at a stated time. **Download spreadsheet** on that | |
| 147 | page saves the same lines (or just the messages) as a file that opens in Excel | |
| 148 | or Numbers. Anyone else is told no. | |
| 147 | 149 | |
| 148 | 150 | ## Spreadsheets and calendar |
| 149 | 151 | |
| @@ -187,7 +189,26 @@ return as they were, dated from today, and the deals you opened are left alone. | ||
| 187 | 189 | - **Real:** the dates and their math, mark done, moves with their reasons, |
| 188 | 190 | who owes what, the reminder drafts and editing them, the record of what was |
| 189 | 191 | sent, the reasons for messages you chose not to send, the calendar file, and |
| 190 | adding parties, dates and deals. | |
| 192 | adding parties, dates and deals (see [opening and shaping a | |
| 193 | deal](#opening-and-shaping-a-deal)). | |
| 194 | - **Real:** you can download all your deals as one file and bring them back | |
| 195 | later, on this app or another account; the record of messages is saved but not | |
| 196 | brought back ([](#make-it-yours)). | |
| 197 | - **Real:** an inspection, final walkthrough or closing can carry a time and a | |
| 198 | place, which show on the client timeline, in your calendar file and in the | |
| 199 | reminder ([](#opening-and-shaping-a-deal)). | |
| 200 | - **Real:** two of your closings on the same day less than two hours apart are | |
| 201 | flagged on This week and on both deals' pages ([opening and shaping a | |
| 202 | deal](#opening-and-shaping-a-deal)). | |
| 203 | - **Real:** a month after closing a "How is the new home?" note, and a year | |
| 204 | after a "Happy home anniversary" note, are drafted and wait for your approval | |
| 205 | ([](#opening-and-shaping-a-deal)). | |
| 206 | - **Real:** an admin can read the Activity record of who tried to change what, | |
| 207 | and download it as a spreadsheet ([](#activity)). | |
| 208 | - **Real:** price, earnest money and commission rate on a deal, the commission | |
| 209 | pending and earned this year under the clock, and a broker file to print | |
| 210 | ([](#commission-and-your-year)); spreadsheets of your | |
| 211 | deals ([](#spreadsheets-and-calendar)). | |
| 191 | 212 | - **Real:** the clock, a deal page and the client timeline answer in under 50 |
| 192 | 213 | ms with 200 deals. |
| 193 | 214 | - **Real:** every page is checked for keyboard and screen-reader use. |
src/pages/clock.ts +2 −2
| @@ -13,7 +13,7 @@ import { agent as defaults } from "../env.ts"; | ||
| 13 | 13 | import { todaysDrafts, unsent, type Agent } from "../reminders.ts"; |
| 14 | 14 | import type { Who } from "../who.ts"; |
| 15 | 15 | import { clashLine } from "../overlap.ts"; |
| 16 | import { byDay, closingNote, thisWeek } from "../week.ts"; | |
| 16 | import { byDay, rowNote, thisWeek } from "../week.ts"; | |
| 17 | 17 | import { layout } from "./layout.ts"; |
| 18 | 18 | import { mayRestore } from "../actions.ts"; |
| 19 | 19 | import { badge, draftLink, opens, owedBy, URGENCY_LABEL } from "./sheet.ts"; |
| @@ -111,7 +111,7 @@ export function weekCard(deals: readonly DealView[], on: string, q = "", side: S | ||
| 111 | 111 | (g) => `<h3 class="week-day">${escape(g.heading)}</h3> |
| 112 | 112 | <ul class="week-list">${g.items |
| 113 | 113 | .map(({ deal, deadline: d }) => |
| 114 | weekRows(`${on}|${print(deal)}|${d.id}`, () => `<li><a class="week-row" ${opens(deal, d)}><span class="week-what"><b>${escape(d.label)}${closingNote(deal, d) === "" ? "" : ` · ${escape(closingNote(deal, d))}`}</b><small class="muted">${escape(deal.address)} · ${sideLabel(deal.side)} · ${owedBy(deal, d)}</small>${d.kind === "closing" ? clashLine(deal.closingConflicts, "small", false) : ""}${d.nonBusinessDay === null ? "" : `<small class="muted">Not a business day · next is ${escape(spoken(d.nonBusinessDay.next))}</small>`}${d.note === "" ? "" : `<small class="muted">${escape(d.note)}</small>`}</span>${badge(d, on)}</a></li>`), | |
| 114 | weekRows(`${on}|${print(deal)}|${d.id}`, () => `<li><a class="week-row" ${opens(deal, d)}><span class="week-what"><b>${escape(d.label)}${rowNote(deal, d) === "" ? "" : ` · ${escape(rowNote(deal, d))}`}</b><small class="muted">${escape(deal.address)} · ${sideLabel(deal.side)} · ${owedBy(deal, d)}</small>${d.kind === "closing" ? clashLine(deal.closingConflicts, "small", false) : ""}${d.nonBusinessDay === null ? "" : `<small class="muted">Not a business day · next is ${escape(spoken(d.nonBusinessDay.next))}</small>`}${d.note === "" ? "" : `<small class="muted">${escape(d.note)}</small>`}</span>${badge(d, on)}</a></li>`), | |
| 115 | 115 | ) |
| 116 | 116 | .join("")}</ul>`, |
| 117 | 117 | ) |
src/pages/week.ts +2 −4
| @@ -12,16 +12,14 @@ import { agent as defaults } from "../env.ts"; | ||
| 12 | 12 | import { asset, escape } from "../http.ts"; |
| 13 | 13 | import { STATUS } from "../timeline.ts"; |
| 14 | 14 | import type { Who } from "../who.ts"; |
| 15 | import { appointmentNote, byDay, closingNote, owner, thisWeek } from "../week.ts"; | |
| 15 | import { byDay, owner, rowNote, thisWeek } from "../week.ts"; | |
| 16 | 16 | import { clashLine } from "../overlap.ts"; |
| 17 | 17 | import { layout } from "./layout.ts"; |
| 18 | 18 | import { sideLabel } from "./side.ts"; |
| 19 | 19 | import type { SideFilter } from "../side.ts"; |
| 20 | 20 | |
| 21 | 21 | const closingAt = (deal: DealView, d: DealView["deadlines"][number]): string => { |
| 22 | const where = closingNote(deal, d); | |
| 23 | const appt = appointmentNote(d); | |
| 24 | const text = where === "" ? appt : where; | |
| 22 | const text = rowNote(deal, d); | |
| 25 | 23 | return text === "" ? "" : ` · ${escape(text)}`; |
| 26 | 24 | }; |
| 27 | 25 |
src/readme.test.ts added +22
| @@ -0,0 +1,22 @@ | ||
| 1 | import { expect, test } from "bun:test"; | |
| 2 | import { readFileSync } from "node:fs"; | |
| 3 | ||
| 4 | const readme = readFileSync(new URL("../README.md", import.meta.url), "utf8"); | |
| 5 | ||
| 6 | /** The anchor GitHub gives a heading: lower case, punctuation dropped, spaces to hyphens. */ | |
| 7 | const slug = (h: string) => h.toLowerCase().replace(/[^\w\s-]/g, "").trim().replace(/\s/g, "-"); | |
| 8 | ||
| 9 | test("every in-page link in the README lands on a heading in it", () => { | |
| 10 | const anchors = new Set([...readme.matchAll(/^#{1,6}\s+(.+)$/gm)].map((m) => slug(m[1]!))); | |
| 11 | const links = [...readme.replace(/\s+/g, " ").matchAll(/\]\(#([^)\s]*)\)/g)].map((m) => m[1]!); | |
| 12 | expect(links.length).toBeGreaterThan(0); | |
| 13 | for (const l of links) expect(anchors.has(l), `#${l}`).toBe(true); | |
| 14 | }); | |
| 15 | ||
| 16 | test("the honest-limits section still says nothing is sent and links each feature", () => { | |
| 17 | const section = readme.slice(readme.indexOf("## What is real"), readme.indexOf("## Signing in")).replace(/\s+/g, " "); | |
| 18 | expect(section).toContain("no email or text message leaves the app"); | |
| 19 | for (const word of ["bring them back", "time and a place", "two hours apart", "anniversary", "Activity", "commission"]) { | |
| 20 | expect(section).toContain(word); | |
| 21 | } | |
| 22 | }); |
src/week.ts +6
| @@ -63,6 +63,12 @@ export function appointmentNote(d: { kind: string; time?: string | null; place?: | ||
| 63 | 63 | return appointmentLine({ kind: d.kind, time: d.time ?? null, place: d.place ?? null }); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | /** What follows a row's label on This week: a closing's time and place, or an appointment's; "" for any other row. */ | |
| 67 | export function rowNote(deal: WeekDeal<unknown>, d: { kind: string; time?: string | null; place?: string | null }): string { | |
| 68 | const where = closingNote(deal, d); | |
| 69 | return where === "" ? appointmentNote(d) : where; | |
| 70 | } | |
| 71 | ||
| 66 | 72 | /** Who owes a date: the deal's party in that role by name, if it has one, and the role either way. */ |
| 67 | 73 | export function owner( |
| 68 | 74 | deal: { readonly parties: readonly { role: PartyRole; name: string }[] }, |
new above
offline