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

shipped production is serving it opened this has it
opened this

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:

  • [ ] On /listings/:id, whoever may edit the listing (ask permit for listing.update, as retoneListing does) 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 same validate from src/listing.ts. Photos are not part of this issue.
  • [ ] A new action updateFacts(db, who, { id, fields }) in src/actions.ts is audited as listing.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 emits listing.changed. Invalid input is a 422 with the form's message and changes nothing.
  • [ ] The same action is reachable at every door: the page form POST (/listings/:id/facts, same-origin checked like every mutation), PATCH /api/listings/:id with { facts: {...} } (also in openapi.json), and an update_facts MCP tool. The terminal is optional; say in the pull if it is left out.
  • [ ] The sample listings stay read-only. Anon and other agents get the same refusal they get for a tone change.
  • [ ] Tests in 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.
  • [ ] The README's walkthrough gains one step: 'Drop the price', with Edit facts, the new price on the flyer, and approvals cleared. src/walkthrough.test.ts walks that step too.
  • [ ] bun test, bun x tsc --noEmit and bun scripts/design-lint.ts pass.

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).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs