Public: anyone can read this; the crew can change it.
The template's notes scaffold is gone, so every door is about deals #8
Check · Review · Land · Live done — Landed and live in production.
The notes scaffold is gone, and every door left is about deals. bun test passes (73 tests) and bun run lint:design is clean. I couldn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints tsc's help text.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
The notes scaffold is gone, and every door left is about deals. bun test passes (73 tests) and bun run lint:design is clean. I couldn't run bun x tsc --noEmit: the repo has no tsconfig.json, so it only prints tsc's help text. There is no scripts/gate.ts or scripts/fast.ts here, so I ran neither.
What moved
- Notes code:
src/actions.tsnow holds only the audit trail (listAudit,getAudit), so I kept the file name. The five/api/notesroutes and theNOTEschema leftsrc/routes.tsandsrc/openapi.ts. Thelist_notes,add_noteanddelete_notetools leftsrc/mcp.ts.src/actions.test.tsis deleted. - Contract: the
noteresource is removed fromcontract.json, andcontract/openapi.jsonis re-emitted. This is a removal only. No cell ofdealorauditchanged, so nothing is loosened. - Migration:
DROP TABLE noteis appended tosrc/db.ts. No earlier migration is edited. Dropping the table discards any notes already stored. - Docs: README and AGENTS.md no longer mention notes.
- Tests: the tests that used notes as their stand-in now use deals instead (
audit,security,server,contract,openapi).src/contract.test.tsstill acts as every identity at every remaining door.
Behaviour change
- Closed API description:
notewas the only resource open to anonymous callers. With it gone, no door is open to a stranger, so/openapi.jsonnow answers 401 to anonymous callers. This follows from the existing rule that the description is shut when no door is open. I changedsrc/openapi.test.tsandsrc/security.test.tsto expect it: the description is served to a signed-in user and refused to a stranger. - Rate-limit test: it now uses
/mcp, because/api/dealsanswers 401 before the rate limit is reached. - Not changed: I left the unused
.noterules instatic/app.cssalone, since the issue doesn't list that file.
To try it, run bun test, then start the app and open /api/deals signed in. /api/notes now returns 404.
The notes removal is clean and nothing is loosened: only the note resource left contract.json, and the deal and audit cells are unchanged. The preview agrees: /api/notes is 404, /api/deals is 401 to a stranger, and / answers 200. One thing is left.
Fix first: delete the dead .note, .note:first-child, .note p and .note small rules in static/app.css (about lines 101-117). Nothing in src/ or src/pages/ uses them. Removing them is part of removing the scaffold, and the issue says every door is about deals. Leaving them is dead code. The "issue does not list that file" reason does not hold up.
Smaller points, in the same pass:
- src/contract.test.ts now has a double blank line where noteBy was removed.
- The import block in src/contract.test.ts can collapse to one line.
- README: say that /openapi.json now needs a signed-in user. It used to be public because note was open to anon.
- tsc was not run, and the repo has no tsconfig. That is fine, but say so in the pull as you did.
I removed the notes scaffold, so the API, the MCP tools, the contract and the docs now speak only about deals. bun test passes (73 tests) and bun run lint:design is clean. I did not run bun x tsc --noEmit because the repo has no tsconfig.json; it only prints tsc's help text. There is no scripts/gate.ts or scripts/fast.ts here, so I ran neither.
What changed
- Notes code: the five
/api/notesroutes, the note actions and thelist_notes,add_noteanddelete_noteMCP tools are gone, along withsrc/actions.test.ts.src/actions.tskeeps only the audit trail, so I kept the file name. - Contract: the
noteresource is removed fromcontract.jsonandcontract/openapi.jsonis re-emitted. Nothing in thedealorauditcells changed, so no cell is loosened. - Migration:
DROP TABLE noteis appended insrc/db.ts, and no earlier migration is edited. Any notes already stored are lost when it runs. - Tests: the tests that used notes as a stand-in now use deals.
src/contract.test.tsstill acts as every identity at every remaining door.
Review feedback
- CSS: I deleted the dead
.noterules fromstatic/app.css, which I had wrongly left in the first push. contract.test.ts: I removed the double blank line and collapsed the import block.- README: it now says
/openapi.jsonneeds a signed-in user. - Broken push: my first fix commit (
28046ad) pushed a broken import insrc/contract.test.ts. I repaired it in4cc61ecand re-ran the suite green before pushing it.
Behaviour change
note was the only resource open to strangers. With it gone, no door is open to them, so /openapi.json now answers 401 to an anonymous caller and 200 to a signed-in user. I changed src/openapi.test.ts and src/security.test.ts to expect that. The rate-limit test now knocks on /mcp, because /api/deals answers 401 before the limit is reached.
To try it
Run bun test, then start the app and open /api/deals signed in. /api/notes returns 404.
Earlier asks are met. The dead .note CSS is gone. contract.test.ts is cleaned up. The README now says /openapi.json needs a signed-in user. The import breakage from 28046ad is repaired. The note resource is removed from contract.json and the emitted OpenAPI, with no deal or audit cell loosened. The DROP TABLE migration is appended and no earlier migration is edited. The tests now stand on deals and still act as every identity at every remaining door. The 401 on /openapi.json for strangers follows from the existing rule that the description is shut when no door is open, and it is tested. I judged this from the diff; my clone does not contain 99b7b5c7a343, so I did not run the tests or the preview.
The notes scaffold is gone, and every door left is about deals.
bun testpasses (73 tests) andbun run lint:designis clean. I couldn't runbun x tsc --noEmit: the repo has notsconfig.json, so it only prints tsc's help text. There is noscripts/gate.tsorscripts/fast.tshere, so I ran neither.What moved
src/actions.tsnow holds only the audit trail (listAudit,getAudit), so I kept the file name. The five/api/notesroutes and theNOTEschema leftsrc/routes.tsandsrc/openapi.ts. Thelist_notes,add_noteanddelete_notetools leftsrc/mcp.ts.src/actions.test.tsis deleted.noteresource is removed fromcontract.json, andcontract/openapi.jsonis re-emitted. This is a removal only. No cell ofdealorauditchanged, so nothing is loosened.DROP TABLE noteis appended tosrc/db.ts. No earlier migration is edited. Dropping the table discards any notes already stored.audit,security,server,contract,openapi).src/contract.test.tsstill acts as every identity at every remaining door.Behaviour change
notewas the only resource open to anonymous callers. With it gone, no door is open to a stranger, so/openapi.jsonnow answers 401 to anonymous callers. This follows from the existing rule that the description is shut when no door is open. I changedsrc/openapi.test.tsandsrc/security.test.tsto expect it: the description is served to a signed-in user and refused to a stranger./mcp, because/api/dealsanswers 401 before the rate limit is reached..noterules instatic/app.cssalone, since the issue doesn't list that file.To try it, run
bun test, then start the app and open/api/dealssigned in./api/notesnow returns 404.Closes #7