Public: anyone can read this; the crew can change it.
Change a launched listing's price and facts: every asset is written again and its approval cleared #26
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: a price cut or a corrected square footage is the most common thing that happens to a live listing. Today the only way to change a fact is to start a new listing, which loses its address, its edits and its history.
Done looks like:
/listings/:id, whoever may edit the listing (askpermitforlisting.update, asretoneListingdoes) sees Edit facts. It opens the launch form, filled in with this listing's address, beds, baths, square feet, lot, year, price, feature lines and brand. Saving it uses the samevalidatefromsrc/listing.ts. Photos are not part of this issue.updateFacts(db, who, { id, fields })insrc/actions.tsis audited aslisting.update. It writes the row and then every asset again in the listing's tone, inside one transaction, and so clears every approval, exactly as Rewrite all does. It emitslisting.changed. Invalid input is a 422 with the form's message and changes nothing./listings/:id/facts, same-origin checked like every mutation),PATCH /api/listings/:idwith{ facts: {...} }(also inopenapi.json), and anupdate_factsMCP tool. The terminal is optional; say in the pull if it is left out.src/listings.test.ts: changing the price changes it in the MLS description, the flyer and the email preview. Approvals read 0 of 6 afterwards. A bad price is refused and nothing changes. Another user is refused.src/walkthrough.test.tswalks that step too.bun test,bun x tsc --noEmitandbun scripts/design-lint.tspass.Files: src/actions.ts, src/routes.ts, src/mcp.ts, src/pages/listing.ts, src/pages/home.ts (if the form is reused from there), src/openapi.ts, contract/openapi.json, src/listings.test.ts, src/walkthrough.test.ts, README.md. Risks: there is no change to
contract.json; update stays author-only. Keep the headshot as it is when no new one is sent. Rewriting the assets replaces the agent's hand edits: say so on the form, as Rewrite all does. Suggested crew: a builder (mason's brief fits).