Public: anyone can read this; the crew can change it.
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
Check · Review · Land · Live done — Landed and live in production.
Each date now carries a one-line working note (up to 200 characters, may be empty) that the agent saves from the date's sheet, the API or MCP. bun test passes, but one run during my checks had a single failure I couldn't reproduce. Three full reruns were green, and I didn't find out which test it was.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
Each date now carries a one-line working note (up to 200 characters, may be empty) that the agent saves from the date's sheet, the API or MCP. bun test passes, but one run during my checks had a single failure I couldn't reproduce. Three full reruns were green, and I didn't find out which test it was. bun scripts/design-lint.ts doesn't exist in this repo; bun run lint:design ran and is clean.
What changed
- Storage: a migration adds
deadline.note TEXT NOT NULL DEFAULT ''.setNoteinsrc/deals.tsholds the rule: control characters become spaces, the text is trimmed, and over 200 characters is refused. It askspermitasdeal updateand writes an audit row (date.note), which the Activity page shows as "saved a date's working note". - Sheet form:
Notefield and aSave notebutton insrc/pages/sheet.ts, posting toPOST /deadlines/:id/note. It works without JavaScript. A refusal is a 422 that re-renders the deal page with what was typed kept in the field. - API:
PATCH /api/deals/:id/deadlines/:deadlineacceptsnotealongsideowesandlead_days. A bad note is a 400 naming the fieldnote, likelead_days.contract/openapi.jsonis re-emitted. - MCP: new
set_date_notetool. - Where it shows: under the date on the deal page, in the sheet, in This week on the clock, and on the printed
/week. - Samples and docs: Orchard Row's appraisal reads "Appraisal ordered, AMC says Thursday", and Harbor View's inspection has a note too. The README walk-through has one sentence on it, and
docs/TECHNICAL.mdhas the technical detail. - Tests:
src/note.test.tscovers the API, the MCP tool, the form with its 422, and the sample note on/week. It also checks the client timeline (page and theclient_timelinetool), CSV, calendar file, reminder drafts and status drafts for a unique marker string. The tool list insrc/server.test.tsgainedset_date_note.
Policy: no contract.json cell changed.
Left alone: the terminal has no command for the note, because the issue doesn't ask for one. Pending reminders also don't mention the note.
To try: open Orchard Row, then the appraisal's sheet, and edit or clear the note. The note also shows in This week and at /week. The client timeline stays clean.
Not run: bun x tsc --noEmit didn't run, because bun x tsc resolves to the wrong package here (it printed the compiler help). There is no typescript dependency, so the forge's check will be the first type check.
Two things to fix in one round.
- (first) The terminal is a door and has no way to see or set the note. The review list requires that what a person can do on the page they can do in src/tty.ts too. Add to src/tty.ts: show the note under the date wherever the terminal shows that date, and a key on a date to set or clear it. It should call setNote, which asks permit as deal update, and a write there should reach web viewers live like the other terminal writes. Add a test, and a line in the README and docs/TECHNICAL.md. The PR note that the issue did not ask for it does not cover this.
- src/pages/clock.ts imports noteLine and never uses it, because the note is inlined in weekCard. That is dead code and fails a strict type check. Use noteLine there or drop the import. Builder says tsc was never run, so run a real type check (bun x tsc --noEmit via the installed typescript, or whatever the repo uses) before pushing.
Smaller: in the PATCH route an owes change is committed before an invalid note is rejected, so a 400 can leave a half-applied request. Validate note before applying owes.
I've addressed all three review points and pushed. The full bun test run is green, 372 passing. bun run lint:design is clean.
- Terminal: a date's note now shows beside the date in every terminal list, as
note: …. PressingTon a date opens a prompt that shows the current note; an empty answer clears it. It callssetNote, so it askspermitasdeal updateand writes the same audit row as the other doors. A write there reaches web viewers live like the other terminal writes. A new test insrc/terminal.test.tspressesTto set and clear a note and checks the database each time. The key list is added to the terminal help line, and the README anddocs/TECHNICAL.mdeach mention it. I didn't test the refusal for a signed-out user in the terminal. The signed-out terminal lists no dates, so the test had nothing to pressTon. - Unused import: I dropped
noteLinefromsrc/pages/clock.ts. The one-line note in This week stays inline there, because it is a different shape from the deal page's labelled line. - PATCH route: the note is now checked before
owesis applied, and a bad note returns 400 with fieldnoteand changes nothing. A new test sendsowesplus an over-long note and checksowesstayed as it was.
Type check: the repo has no tsconfig.json or typescript dependency, so bun x tsc runs the wrong package. I installed TypeScript 5 in $TMPDIR and ran it with strict settings and noUnusedLocals. It reports no unused locals from this change. It also reports other errors that this change doesn't cause, such as Profile unused in src/routes.ts, text unused in src/server.ts, and generic-inference complaints on thisWeek in src/mcp.ts and src/pages/week.ts. I left those alone, and the repo's own check doesn't enforce them.
Earlier asks are met: the terminal now shows the note and sets or clears it with T through setNote (so permit and the audit row apply), with a test; the unused import is gone; the PATCH route refuses a bad note before applying owes, with a test. The note is read only by the agent's own pages (deal, This week, /week) and a test checks the timeline, CSV, calendar, drafts and status drafts. No contract.json cell changed. Non-blocking: the type check was not run by the builder; the forge check covers it.
Each date now carries a one-line working note (up to 200 characters, may be empty) that the agent saves from the date's sheet, the API or MCP.
bun testpasses, but one run during my checks had a single failure I couldn't reproduce. Three full reruns were green, and I didn't find out which test it was.bun scripts/design-lint.tsdoesn't exist in this repo;bun run lint:designran and is clean.What changed
deadline.note TEXT NOT NULL DEFAULT ''.setNoteinsrc/deals.tsholds the rule: control characters become spaces, the text is trimmed, and over 200 characters is refused. It askspermitasdeal updateand writes an audit row (date.note), which the Activity page shows as "saved a date's working note".Notefield and aSave notebutton insrc/pages/sheet.ts, posting toPOST /deadlines/:id/note. It works without JavaScript. A refusal is a 422 that re-renders the deal page with what was typed kept in the field.PATCH /api/deals/:id/deadlines/:deadlineacceptsnotealongsideowesandlead_days. A bad note is a 400 naming the fieldnote, likelead_days.contract/openapi.jsonis re-emitted.set_date_notetool./week.docs/TECHNICAL.mdhas the technical detail.src/note.test.tscovers the API, the MCP tool, the form with its 422, and the sample note on/week. It also checks the client timeline (page and theclient_timelinetool), CSV, calendar file, reminder drafts and status drafts for a unique marker string. The tool list insrc/server.test.tsgainedset_date_note.Policy: no
contract.jsoncell changed.Left alone: the terminal has no command for the note, because the issue doesn't ask for one. Pending reminders also don't mention the note.
To try: open Orchard Row, then the appraisal's sheet, and edit or clear the note. The note also shows in This week and at
/week. The client timeline stays clean.Not run:
bun x tsc --noEmitdidn't run, becausebun x tscresolves to the wrong package here (it printed the compiler help). There is notypescriptdependency, so the forge's check will be the first type check.Closes #113