Public: anyone can read this; the crew can change it.
The People page says when each person last got a message from the agent and about what, so "did I tell the lender?" is answered in one look #129
Check · Review · Land · Live done — Landed and live in production.
Each person on the People page now shows their most recent sent reminder or notice, for example "Last heard Nov 6 · Financing, 12 Oak Lane". The label links to that deal. A person with nothing sent shows "Nothing sent yet".
shipped production is serving it deploy d2eada7
2 earlier comments · 1 event
Each person on the People page now shows their most recent sent reminder or notice, for example "Last heard Nov 6 · Financing, 12 Oak Lane". The label links to that deal. A person with nothing sent shows "Nothing sent yet".
What changed
src/people.ts:Persongainslast_sent({ sent_on, deal_id, address, label }ornull).
- It is read from the sent messages already loaded with each deal, so there is no extra query and nothing per person.
- A message belongs to the party it was sent to. Parties merge by personKeys as before, and the newest message across the merged parties wins.
- A sent message whose party was later removed has no person to show under, so it is not counted. Matching by name would risk showing one person's history under another with the same name.
- Only sent messages count. Declined and held drafts are stored separately and are never read.
src/pages/people.ts: renders the "Last heard …" line or "Nothing sent yet".src/routes.tsdocumentslast_sentin the shared person schema, andcontract/openapi.jsonis regenerated.GET /api/peopleandlist_peopleuse the same data, so they carry the field without further change.- README: one sentence in the People section.
Tests
src/lastsent.test.tsruns against a real database. A person starts with no message, a declined draft changes nothing, and after a send the message shows on the page.src/people.test.tscovers a person on two deals showing the newer message, and a same-name person with a different contact not inheriting it.- The people, openapi, contract, a11y, speed, owes, fell and terminal tests pass.
Not run
bun x tsc --noEmithas notsconfig.jsonin the repo and only prints its help, so I could not type-check.scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist here, so I picked the tests above by hand.
I did not loosen any contract cell, and I added no dependencies.
🤖 Generated with Claude Code
I merged main into this branch and pushed it. The only conflict was in README.md, and bun test passes (562 tests, 0 failures).
- Conflict:
mainhad turned the README's People section into a numbered walkthrough, and my branch had edited the old paragraph. I keptmain's walkthrough and moved my text into its item 9. It now says each person shows when they last got a sent reminder or notice and about what, or "Nothing sent yet". Declined and held drafts don't count. It also names thePkey in the terminal andlist_peopleover MCP. - Other files:
contract/openapi.json,src/people.tsandsrc/routes.tsmerged automatically, and the tests cover them. - Not run:
bun x tsc --noEmitprinted only the compiler's help text, because the repo has notsconfig.json, so no type check ran. The repo also has noscripts/gate.ts, so I did not run the gate.scripts/lint-design.tswas also not run, since the merge changed nosrc/web/files on my side.
Page, API, MCP and openapi are right, and the security surface is clean (output escaped, no new write, no contract cell touched). One miss: the terminal door does not show last_sent. Fix first: in src/terminal.ts, the people view (around line 743-753) should print, under each person, Last heard <spoken date> · <label>, <address> or Nothing sent yet, from p.last_sent, and add a terminal test for it (the terminal test suite already drives the P view). The README now tells people to press P for this, so it must be true. The preview /people answered 401 to my token, so I could not view the page there; I judged the page from the code and tests.
The terminal People view (P) now shows the last-sent line, so it matches the README and the page.
- Terminal:
src/terminal.tsprints a dimmed line under each person's name. It readsLast heard <spoken date> · <label>, <address>orNothing sent yet, taken fromp.last_sent. - Tests: the existing
Ptest insrc/terminal.test.tsnow also expects "Nothing sent yet". A new test sends a reminder to a buyer and checks that thePscreen showsLast heard <today> · <label>, 9 Heard Way, while the seller still shows "Nothing sent yet". The two test files I ran,src/terminal.test.tsandsrc/lastsent.test.ts, pass (43 tests). I did not re-run the full suite, and I did not runbun x tsc --noEmitthis time either, because the repo has notsconfig.json. - Preview 401: I didn't look into the 401 on
/peopleyou saw with your token.
The terminal P view now prints the same last_sent line from the same people() data as the page, so it is gated the same way, and it has a test. That meets my earlier ask for a terminal door. No contract cell is loosened, there is no new query, and output is escaped on the page. I could not diff against cc244e71cbe2 because that commit is not in the clone, so I read the terminal change in the diff above. On the preview, /people and /api/people return 401 signin_required to my token. That is the sign-in gate, not a defect in this change, so I could not see the page rendered there. Non-blocking: tsc was not run because the repo has no tsconfig.
Each person on the People page now shows their most recent sent reminder or notice, for example "Last heard Nov 6 · Financing, 12 Oak Lane". The label links to that deal. A person with nothing sent shows "Nothing sent yet".
What changed
src/people.ts:Persongainslast_sent({ sent_on, deal_id, address, label }ornull).- It is read from the sent messages already loaded with each deal, so there is no extra query and nothing per person. - A message belongs to the party it was sent to. Parties merge by
personKeysas before, and the newest message across the merged parties wins. - A sent message whose party was later removed has no person to show under, so it is not counted. Matching by name would risk showing one person's history under another with the same name. - Only sent messages count. Declined and held drafts are stored separately and are never read.src/pages/people.ts: renders the "Last heard …" line or "Nothing sent yet".src/routes.tsdocumentslast_sentin the shared person schema, andcontract/openapi.jsonis regenerated.GET /api/peopleandlist_peopleuse the same data, so they carry the field without further change.Tests
src/lastsent.test.tsruns against a real database. A person starts with no message, a declined draft changes nothing, and after a send the message shows on the page.src/people.test.tscovers a person on two deals showing the newer message, and a same-name person with a different contact not inheriting it.Not run
bun x tsc --noEmithas notsconfig.jsonin the repo and only prints its help, so I could not type-check.scripts/gate.ts,scripts/fast.tsandscripts/design-lint.tsdon't exist here, so I picked the tests above by hand.I did not loosen any contract cell, and I added no dependencies.
🤖 Generated with Claude Code
Closes #125