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

Get a 30-second video tour script for a Reel or TikTok to approve, shot by shot from the listing's photos and features #118

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Every listing now gets a `video_script` asset ("Video tour script"), written from its facts, features, tone, open house and photos. The full `bun test` run passes (417 tests); the sandbox has no `tsconfig.json`, `scripts/gate.ts`, `scripts/fast.ts` or `scripts/design-lint.ts`, so the gate, type check and design lint were not run.

shipped production is serving it deploy 957b843

opened this

Every listing now gets a video_script asset ("Video tour script"), written from its facts, features, tone, open house and photos. The full bun test run passes (417 tests); the sandbox has no tsconfig.json, scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts, so the gate, type check and design lint were not run.

What it is

  • Script shape: 7 numbered shots in the normal case, 6 to 8 at most. Each has a photo line, Say: "…" and Caption: …. The first shot is the hook, then the facts, four features, and a closing call to act.
  • Call to act: the last shot carries the open house line when there is one, and the property page link in its caption.
  • Photos: a shot reads "Show photo 2 (Kitchen island)" using the agent's description where there is one, and just the number where there isn't. A listing with no photos gets "Film on location", so it never names a photo the listing doesn't have.
  • Word limit: spoken words are capped at 80. Long features are cut to their first clause, and shots are dropped, never below 6, until the script fits.
  • Meter: the asset shows "N / 80 spoken words" the way the MLS shows its length. Unlike the MLS limit, going over does not block approval, because the issue only asked for the meter.
  • Everything else comes for free: the Fair Housing check, edit, approve, versions and restore all work as for any asset. Editing the facts rewrites it and clears its approval. It appears in kit.txt, the report and the terminal.
  • Listing page: a new "Video" tab holds it.

Existing listings

  • On boot, any listing without the asset gets a draft.
  • The 412 Alder Lane sample is signed by its sample agent; the other samples and all other listings stay unapproved.
  • No other approval changes.

Tests

  • New tests cover each tone, the 80-word cap with very long features, photos named only if the listing has them, a flagged phrase being caught, the meter, and the boot migration keeping existing approvals.
  • About 25 existing tests counted assets, so their counts moved by one together.
  • In tty.test.ts the approve-all loop went from 7 to 8 presses, and the seller-update cursor test now moves one more row.
  • contract/openapi.json was regenerated. The README's walkthrough counts moved too, because a test checks the README against the app.

README: step 3 of "For the agent" now names the script in one line, and the file table says seven assets.

Not done: no new dependency, no change to who can do what (contract.json is untouched), and the script is not added to the launch-week schedule.

Closes #116

commented

Every listing now gets a video_script asset ("Video tour script"), written from its facts, features, tone, open house and photos. The full bun test run passes (417 tests); the sandbox has no tsconfig.json, scripts/gate.ts, scripts/fast.ts or scripts/design-lint.ts, so the gate, type check and design lint were not run.

What it is

  • Script shape: 7 numbered shots in the normal case, 6 to 8 at most. Each has a photo line, Say: "…" and Caption: …. The first shot is the hook, then the facts, four features, and a closing call to act.
  • Call to act: the last shot carries the open house line when there is one, and the property page link in its caption.
  • Photos: a shot reads "Show photo 2 (Kitchen island)" using the agent's description where there is one, and just the number where there isn't. A listing with no photos gets "Film on location", so it never names a photo the listing doesn't have.
  • Word limit: spoken words are capped at 80. Long features are cut to their first clause, and shots are dropped, never below 6, until the script fits.
  • Meter: the asset shows "N / 80 spoken words" the way the MLS shows its length. Unlike the MLS limit, going over does not block approval, because the issue only asked for the meter.
  • Everything else comes for free: the Fair Housing check, edit, approve, versions and restore all work as for any asset. Editing the facts rewrites it and clears its approval. It appears in kit.txt, the report and the terminal.
  • Listing page: a new "Video" tab holds it.

Existing listings

  • On boot, any listing without the asset gets a draft.
  • The 412 Alder Lane sample is signed by its sample agent; the other samples and all other listings stay unapproved.
  • No other approval changes.

Tests

  • New tests cover each tone, the 80-word cap with very long features, photos named only if the listing has them, a flagged phrase being caught, the meter, and the boot migration keeping existing approvals.
  • About 25 existing tests counted assets, so their counts moved by one together.
  • In tty.test.ts the approve-all loop went from 7 to 8 presses, and the seller-update cursor test now moves one more row.
  • contract/openapi.json was regenerated. The README's walkthrough counts moved too, because a test checks the README against the app.

README: step 3 of "For the agent" now names the script in one line, and the file table says seven assets.

Not done: no new dependency, no change to who can do what (contract.json is untouched), and the script is not added to the launch-week schedule.

Changes requested — before the latest push

One change needed, otherwise this is solid.

  1. The script goes stale when photos change. src/actions.ts PHOTO_ASSETS (line ~1207) lists only flyer and email, so removing, adding or reordering photos leaves video_script unchanged and still approved. After removing photo 3 an approved script can still say 'Show photo 3' (a photo the listing no longer has) or point at the wrong picture after a reorder. That breaks box 1 and box 5's 'names only photos the listing has'. Fix: when reshown is true, write the video script again from the new photos (or at least include 'video_script' in PHOTO_ASSETS to clear its approval and redraft it). A description-only change should also refresh the '(alt)' text, and clear approval if the words change. Add a test: launch with 3 photos, approve the script, remove a photo, and assert the script names only existing photo numbers and is no longer approved.

Everything else checks out: contract.json untouched, the script runs through the Fair Housing check, the meter works on page and in the terminal, migration and sample sign-off are tested, and the README names it.

commented

The video script now follows the photos it names. Removing, adding, reordering or describing a photo writes it again from the new photos. The full bun test run passes (420 tests).

  • Script nobody edited: it is written again from the current photos, with the new numbers and "(description)" text. It loses its approval if its words changed or the photos were reordered or removed.
  • Script the agent edited: their words stay, since I can't rewrite them. It loses its approval when photos are reordered or removed, so a stale "Show photo 3" cannot stay approved.
  • Where: a new redraftVideoScript in src/actions.ts, called from the photo-edit path.
  • New tests: src/videophotos.test.ts launches with 3 photos, approves the script, removes one, and checks the script names only photos 1 and 2 and is no longer approved. It also covers reorder, describing a photo, and an edited script.
  • Existing test changed: in src/photoalt.test.ts, the test titled "a description clears no approval" now says a description clears only the video script's approval. That is the behaviour you asked for, since the script quotes the description; the flyer and email approvals still stay. The reorder count in that test moved from all - 2 to all - 3 for the same reason.
  • Process miss: I pushed once with that photoalt test still failing, then fixed it in the next push. The branch is green now.
Approved

The video script now follows the photos it names (redraftVideoScript, covered by videophotos.test.ts). That was the earlier ask, and it is met. contract.json is untouched, so no cell is loosened. The terminal and kit show the asset through the generic asset path. No new dependency. Non-blocking: the README could say that the script is rewritten when photos change. I could not run git diff against e4867ce652ad because the commit is not in the clone, so I judged the change as shown.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs