Public: anyone can read this; the crew can change it.
The agent adds one line of their own on the Profile page, like "Text me anytime, I answer within the hour", and every new reminder draft carries it above the sign-off #138
Merged 28d 2h ago, live in production
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass.
-
Reviews
Changes requested — before the latest pushThe core works (validation, migration, signOff, permit unchanged, contract.json untouched, OpenAPI), but four things must change in one round:
- Both doors: the terminal cannot set the line. src/terminal.ts only carries the saved line through an edit; a person at the terminal cannot type or change it, though the page can. Add a prompt for it in the I > e edit flow (enter keeps it, same as the other fields, with a way to clear it), validated by checkProfile, and show it in the terminal profile view. Add a terminal test, and say in the README sentence that the terminal edit asks for it too.
- Tests the issue lists are missing: HTML in the line escaped on the review page (box 6 names that page, not only /profile); a saved line appears in the other draft kinds the issue names (late follow-up and date-changed notice, not only the first reminder and status); a draft already sent or edited-and-held keeps its words after the line changes (box 3 has no test that fails without it).
- Validation: only CR/LF/U+2028/2029 are refused. Other control characters (\v, \f, \u0085, NUL, tabs) pass through into SMS/email drafts. Refuse all control characters (e.g. /[\p{Cc}\u2028\u2029]/u) and test one.
- A PUT/MCP set_profile that omits
linesilently erases it, so existing API/MCP clients that predate the field wipe the agent's line. Keep the saved line when the key is absent (clear only on an explicit empty string), and test it; document in openapi description.
Also: split the very long README sentence into two; tsc/gate could not run per the builder, so those are unverified by me.
ApprovedAll four earlier asks are met on this head. (1) The terminal edit asks for the line (enter keeps it, - clears it), shows an Own line row, and has a test. (2) The new tests cover every draft kind, sent and held drafts keeping their words, and escaping on /reminders/today. (3) Validation now refuses every control character and U+2028/2029, with a test for each. (4) A save that leaves line out keeps the saved line, and only an empty string clears it; this is tested and described in OpenAPI and MCP. I read the diff since 565d09bb3177 and found nothing new. contract.json is unchanged and saving still goes through permit. I did not exercise the preview.
-
Checks
shipped production is serving it deploy d2eada7
-
History
- The terminal edits the own line; control characters are refused; a save without the line keeps it (#135) 335a6b6
- The agent's own line on the Profile page sits above the sign-off of every new draft (#135) 565d09b
- The Activity page downloads as a spreadsheet of who approved, declined or changed what, so a broker can file the record that a person approved every message (#137) 7cf6df7
- The clock opens with the agent's book in one line: open deals, dollars under contract, closing this month, and closed this year with its sales volume (#134) 7234c8c
- A deal's closing carries a time and a place, like "2:00 pm at Lakeside Title, 400 Main St", on its page, the client timeline, the closing reminders and the calendar file (#126) 6825d28
- A date marked done says the day it was done and whether that was early, on time or late (#132) 0bb7700
- Each deal says which side the agent represents (buyer, seller or both), set when it is opened, shown on the clock, and the clock can be narrowed to one side (#127) 4edae99
- Adding a party to a deal offers the people already on the agent's other deals, so a lender or title officer used before is picked, not retyped (#128) 91e82f9
- A party keeps both a phone and an email, and Send on a reminder offers Open in Mail and Open in Messages so the agent picks how it reaches them (#123) f920885
- Each deal carries its sale price and earnest money amount, shown on its page and the client timeline, and the earnest money reminder says how much is due (#121) b035e47
- Each date carries a short working note the agent keeps current, like "Appraisal ordered, AMC says Thursday", seen wherever the agent looks at that date (#119) c5b5b9f
- A reminder to a party with no email or phone on file lets the agent add one right on the review page, so Send reaches them (#116) 8ffcd95
- The deal's page shows when Owed by was changed on a date: from whom, to whom, by whom and on what day (#112) 49144bd
- A reminder held until tomorrow can be brought back to today with one tap, from the deal's page or the review page (#111) 03d78a2
- A reminder held until tomorrow comes back with the words the agent edited, not the default draft (#110) 33187a6
- A deal that falls through is marked Fell through with a reason, leaves the clock for the Closed list labelled so, and can be reopened (#106) d1c375c
- This week prints as a one-page sheet of every overdue and coming date across all deals, for the agent's Monday office meeting (#105) 43452f2
- The agent changes who owes a date after it is added, and its reminders from then on go to the new party (#104) 539cfeb
- The agent holds a reminder until tomorrow with one tap, so a message they are not ready to approve waits instead of being declined or lost (#103) c2378cc
- The agent downloads every open deal's dates as one spreadsheet file, for the brokerage's compliance sheet or their own records (#101) f80f96c
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass. I did not run the full suite or bun scripts/gate.ts, and bun x tsc --noEmit could not run (details at the end).
What changed
- Validation (
src/profile.ts): the line is plain text, trimmed, at most 200 characters and one line. Any line break is refused (CR, LF, U+2028/2029). A refused form keeps what was typed and names the field. - Drafts (
src/reminders.ts):Agentgains an optionalline, andsignOffputs it on its own line directly above the name and brokerage. Date reminders, late follow-ups, "date changed" notices and status updates all usesignOff, so all four carry it. With no line,signOffreturns exactly what it did before. - Memo and sent drafts: the draft memo keys on
JSON.stringify(agent), so changing the line resets it. Sent and held drafts keep their stored words, and nothing rewrites them. - Storage (
src/db.ts): a migration addsprofile.linewith a default of''and a 200-character check. Existing rows and the environment defaults keep working. - Permissions: saving goes through the existing
permit(profile, update)check.contract.jsonis unchanged. - API and MCP: the profile read and update include
line, described in the OpenAPI schema (contract/openapi.jsonregenerated). MCPset_profiletakes it too. - Terminal: the terminal's profile edit keeps the saved line instead of wiping it.
- README: the "Make it yours" section says where to set it, in one sentence.
Tests are in src/line.test.ts:
- A saved line appears in a reminder draft and a status update.
- An empty line leaves the body identical to before.
- 201 characters and a line break are refused, over the API and the form, and the form keeps the typed text.
- HTML in the line is escaped on the Profile page and returned verbatim by the API.
Choices and gaps
- A PUT or MCP save that omits
lineclears it, as it does for the other fields. I did not add a keep-if-absent rule. - I did not add a separate test of the draft review page's escaping of the line. That page already escapes draft bodies, and the Profile page escaping is tested.
bun x tsc --noEmitcould not run: there is notsconfig.jsonin the repo, sotsconly prints help.scripts/gate.tsandscripts/fast.tsdo not exist here either, anddocs/VISION.mdwas not found.bun run lint:designprinted no findings (I read the empty output as clean).
Try it: open Profile as an admin, type a line, save, and open the review page for a deal (or GET /api/profile). The line sits above the sign-off of every unsent draft.
🤖 Generated with Claude Code
All four points are addressed and pushed. The line, profile, terminal, sign-off, OpenAPI and hold tests pass, and the design lint prints no findings. I did not run the full suite. bun x tsc --noEmit still can't run because the repo has no tsconfig.json, and there is no scripts/gate.ts here, so those stay unverified.
1. Terminal
I, thene, now asks a fifth question: "A line of your own above the sign-off".- Enter keeps the saved line and
-clears it. Anything else goes throughcheckProfilelike the other fields. - The profile view shows an "Own line" row, with "none" when it is empty.
- A terminal test covers setting, keeping and clearing it.
- The README sentence says the terminal edit asks for the line too, and
-clears it. - I split the long README sentence into several shorter ones.
2. Tests added (src/line.test.ts)
- The line appears in the before, day-of, late and date-changed drafts.
- A sent draft and an edited-and-held draft keep their words after the line changes. The fresh drafts alongside them take the new line.
- HTML in the line is escaped on
/reminders/today.
3. Validation
- The check is now
/[\p{Cc}\u2028\u2029]/u, so tab,\v,\f, NUL, U+0085 and the line breaks are all refused. - The tests cover each of those characters.
4. Omitted line
- A save through PUT or MCP that leaves
lineout keeps the saved line. Only an explicit empty string clears it. - This is tested.
- The OpenAPI and MCP descriptions say so, and
contract/openapi.jsonis regenerated.
🤖 Generated with Claude Code
The Profile page now has an optional "A line of your own at the end of every message" field, and every new draft carries it just above the sign-off. The new tests and the profile, sign-off, OpenAPI, terminal, db, status, review and security tests pass. I did not run the full suite or
bun scripts/gate.ts, andbun x tsc --noEmitcould not run (details at the end).What changed
src/profile.ts): the line is plain text, trimmed, at most 200 characters and one line. Any line break is refused (CR, LF, U+2028/2029). A refused form keeps what was typed and names the field.src/reminders.ts):Agentgains an optionalline, andsignOffputs it on its own line directly above the name and brokerage. Date reminders, late follow-ups, "date changed" notices and status updates all usesignOff, so all four carry it. With no line,signOffreturns exactly what it did before.JSON.stringify(agent), so changing the line resets it. Sent and held drafts keep their stored words, and nothing rewrites them.src/db.ts): a migration addsprofile.linewith a default of''and a 200-character check. Existing rows and the environment defaults keep working.permit(profile, update)check.contract.jsonis unchanged.line, described in the OpenAPI schema (contract/openapi.jsonregenerated). MCPset_profiletakes it too.Tests are in
src/line.test.ts:Choices and gaps
lineclears it, as it does for the other fields. I did not add a keep-if-absent rule.bun x tsc --noEmitcould not run: there is notsconfig.jsonin the repo, sotsconly prints help.scripts/gate.tsandscripts/fast.tsdo not exist here either, anddocs/VISION.mdwas not found.bun run lint:designprinted no findings (I read the empty output as clean).Try it: open Profile as an admin, type a line, save, and open the review page for a deal (or
GET /api/profile). The line sits above the sign-off of every unsent draft.🤖 Generated with Claude Code
Closes #135