Public: anyone can read this; the crew can change it.

Mark a listing Coming soon and get a teaser post and email to approve before it goes live #57

opened this

Merged 34d 16h ago, live in production

Coming soon is now a fourth status. A listing marked that way gets its own teaser post and email, each needing its own approval. I checked it with src/comingsoon.test.ts, status, find, sample, hostile and speed, which all pass (41 tests).

Notes

opened this

Coming soon is now a fourth status. A listing marked that way gets its own teaser post and email, each needing its own approval.

I checked it with src/comingsoon.test.ts, status, find, sample, hostile and speed, which all pass (41 tests). scripts/lint-design.ts printed nothing. I ran no other test files, so the forge's full check on the push is the first run of the rest.

Two checks were not run:

  • Type check: bun x tsc --noEmit only printed its help text, because the repo seems to have no tsconfig. So types are unchecked.
  • Design lint: the file is scripts/lint-design.ts, not design-lint.ts as the instructions say. It reported nothing.

What changed

  • Status and doors: coming_soon is offered first, at the web form, PATCH /api/listings/:id, the MCP listing tools and the terminal's status key. Unknown statuses still get a 422. The OpenAPI contract is updated to match.
  • Migration: a new migration in src/db.ts rebuilds the listing.status CHECK without losing a listing, a photo path or an approval. The test builds a database from the previous migration list, migrates it, and finds everything intact.
  • Assets: a coming-soon listing gets a status post (Social) and a status email (Email) in each of the three tones, written from the facts only. They show as "0 of 8 approved", and the six core assets and their approvals stay. Setting Active removes them; Under contract or Sold replaces them with their own words.
  • Where it shows: the flyer wears a "Coming soon" band, the home list shows the status and has a Coming soon filter with its count, and the property page and launch kit name it.
  • README: step 8 gains the sentence for Coming soon.
  • Contract: no cell in contract.json changed. Setting status is still the existing listing update, asked through permit.

What I did not do

  • Issue #53 (square picture): its headline precedence is not in this branch. Whichever of #53 and this pull lands second needs to put "Coming soon" first, above Just listed.

To try it

  • Open a listing, pick Coming soon in the status box, and approve the two new assets.
  • Then use the Coming soon filter on the home list.

Closes #55

commented

All three review points are fixed and pushed as c7cd0b0. The tty, coming-soon, kit, hostile and speed tests pass (48 tests) and the type check is clean; I didn't run the rest of the suite here.

  1. Terminal test: src/tty.test.ts now drives a session that opens a listing, presses s, clears the prefilled active and types coming soon. It checks that the status is coming_soon, that both teaser assets exist, and that the screen reads "Status saved: coming soon". The test checks the saved-status message on screen, not the page's status pill.
  2. Layering: statusLine now lives in src/generate.ts beside STATUS_LABELS and money. src/kit.ts, src/pages/listing.ts and src/pages/property.ts import it from there, so kit.ts no longer imports a page renderer.
  3. Tidy: I rewrapped the setStatus doc comment in src/actions.ts, the README Find line and the README terminal line.

No behaviour changed, and no cell in contract.json changed.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs