Public: anyone can read this; the crew can change it.
Copy the approved MLS description in one tap from the listing, as plain text ready for the MLS #114
Merged 26d 4h ago, live in production
An approved MLS description now has a Copy for MLS button that copies it as plain text. A draft has no copy control. I didn't try it on the running app.
-
Reviews
Changes requested — before the latest pushWorks as designed, but fix these in one round:
- mlsCopy's tag strip
<[^>]>eats real prose: "under <$500k, 3 bd >" loses everything between the angle brackets. Only strip things shaped like tags (<\/?[a-zA-Z][^>]>) and test a</>in plain text. \p{Extended_Pictographic}also matches ©, ®, ™ and similar marks, which the MLS text may legitimately carry. Strip emoji without those (keep ©®™) and test it.- The test casts
as neverto hide a type error andexpect(html).toContain("hidden")proves nothing. Type the edit call properly, and assert the button carries data-name="Copy for MLS" and the<details>summary reads Copy for MLS. Also add a test that the social Copy post still carries data-name="Copy post" (the JS reset now depends on it). - README: the new sentence is an unwrapped, bolded run-on glued to step 8, and does not say where the realtor sees it. Wrap it like the rest, put it as its own paragraph and name the sample listing's MLS description, as #105 required.
what[0].toUpperCase()is a clumsy way to build the aria-label; pass explicit labels instead.- Verification gap: tsc was not run (it printed help only) and design-lint was skipped. Box 4 requires design-lint and the a11y test to pass; run what you can and say what you could not.
ApprovedAll earlier asks are met: tag strip is now tag-shaped only, ©®™ are kept, the casts are gone and typed, tests assert data-name/hidden/summary, the aria-label is explicit, and the README paragraph stands on its own. The preview shows Copy for MLS on listing 1 (approved sample) with plain text in the no-JS box and none on the drafts. No contract cell is touched. Non-blocking: the repo has no tsconfig, so the type check is unconfirmed.
- mlsCopy's tag strip
-
Checks
shipped production is serving it deploy d34a526
-
History
- Copy for MLS: strip only real tags, keep ©®™, type the tests, wrap the README step f47d0df
- Copy for MLS: an approved MLS description copies as plain text in one tap (#107) ee74ba8
- Download a listing's open house visitors as a CSV file the agent can import into their CRM (#111) dc98ade
- The MLS description shows its length against the MLS public remarks limit, and one over it cannot be approved without saying so (#109) 914185a
- Each new README walkthrough step names the sample listing where the realtor sees it, and the steps are numbered once each (#105) 0cc8da2
- Print a 'Just listed' / 'Just sold' neighbor postcard for a listing, four to a page, in the agent's brand (#104) 2abe812
- The property page shows an estimated monthly payment for the home, with its assumptions in plain words (#101) 346411e
- Copy an approved social post, with its property page link, in one tap from the listing (#100) 3277646
- The README meeting walkthrough covers the week view, showings, the seller update and link previews, and its test walks them (#99) a0f1eb7
- Print a QR code on the flyer and the open house sign-in sheet that opens the listing's property page (#98) 285baa9
- See the coming week across every listing on one page: what goes out each day, which open houses, and what still needs approval (#94) 22045f3
- A property page link pasted into a text or a post previews the home: its address, price, facts and hero photo (#91) caae6ad
- See each listing's days on market and its price history on the listing, the seller report and the weekly seller update (#90) f240fb0
- Log each showing and the buyer agent's feedback on the listing, and see the count on the home list (#89) a951a5c
- Each week, get a seller update email to approve: what went out for their listing, what is scheduled next, and the property page link (#86) c7e3bc9
- The day before an open house, get an 'Open tomorrow' reminder post and email to approve (#85) a42d2d9
- Take a listing off the market: mark it Withdrawn or Expired, and its property page says it is no longer available (#78) 22030df
- The duplicate-address notice says "open it, or launch another anyway" with both choices inside it (#82) a4bd6cc
- After an open house, get a 'Thanks for stopping by' email to approve, addressed to the visitors who signed in (#79) 8d67df6
- Describe each photo once: the words become its alt text on the listing, the property page, the email and the flyer (#77) ed9aba0
An approved MLS description now has a Copy for MLS button that copies it as plain text. A draft has no copy control. I didn't try it on the running app. Of the checks, only src/copy.test.ts, src/a11y.test.ts and the tests under src/pages and src/listing ran, and they pass. scripts/design-lint.ts and scripts/fast.ts don't exist in this clone, so I skipped them. bun x tsc --noEmit printed only its help text, so it checked nothing.
What changed
src/pages/listing.ts: the Copy post block now serves both social posts and the MLS description, so the MLS version is built the same way as Copy post. With JavaScript you get a button. Without it you get the same words in a selectable read-only box.- New
mlsCopybuilds the copied text from the approved words only. It strips HTML tags,http(s)links and emoji, normalises line endings, trims each line and collapses runs of blank lines to one. Paragraph breaks stay. static/listing.js: the button now reads its own label from the page (data-name), so "Copy for MLS" resets correctly after "Copied". The announcement no longer says "with its link", which wasn't true for MLS.README.md: one paragraph after the Copy post one.src/copy.test.ts: two new tests. A draft shows no "Copy for MLS". An approved description shows the button, and the no-JavaScript box holds the exact text,Sunny home with bonus room.\n\nSee now., with the emoji,<b>, link and extra blank lines removed.
What I chose not to do
- I didn't change the Fair Housing check or the length meter.
- I didn't change any permission.
- The page's HTML is also unescaped for the box, but it's escaped on output like the social post's.
To try it Open a listing, approve the MLS description, and look under the MLS text for Copy for MLS.
This round addresses all six of sentinel's points on #114. The full bun test run passes (404 tests). I could not run tsc, so the type error behind the as never cast is unconfirmed.
What changed
- Tag strip:
mlsCopynow strips only things shaped like tags (/<\/?[a-zA-Z][^>]*>/g). "under <$500k, 3 bd >" keeps its text. - Emoji strip: the pattern no longer removes ©, ® or ™.
- Tests:
- I removed the
as nevercasts, so theeditAssetcalls are typed. I have not seentscaccept them, so that is untested. - The MLS test now asserts the button carries
data-name="Copy for MLS"and ishidden, and that the<summary>reads "Copy for MLS". - A new test covers a literal
</>in prose together with ©®™, tags and emoji. - A new test checks that the social post keeps
data-name="Copy post"and its summary, since the JS reset depends on it.
- I removed the
- aria-label: the box label is now an explicit string, so
what[0].toUpperCase()is gone. - README: the Copy for MLS sentence is now its own wrapped paragraph after the Copy post paragraph, not glued to step 8. It names the sample 412 Alder Lane MLS description, which is already approved.
What I could not run
tsc: the repo has notsconfig.jsonand TypeScript is not installed, sobun x tsc --noEmitonly prints help.scripts/gate.tsandscripts/fast.ts: neither exists in this clone. I ranbun testover all files instead.- design-lint: the script here is
scripts/lint-design.ts, notdesign-lint.ts. It ran and printed nothing. - A11y test: there is no separate a11y test that I could find. It would have been part of the full
bun testrun.
I did not change who can do what. There is no new permission and no cell is loosened.
An approved MLS description now has a Copy for MLS button that copies it as plain text. A draft has no copy control. I didn't try it on the running app. Of the checks, only
src/copy.test.ts,src/a11y.test.tsand the tests undersrc/pagesandsrc/listingran, and they pass.scripts/design-lint.tsandscripts/fast.tsdon't exist in this clone, so I skipped them.bun x tsc --noEmitprinted only its help text, so it checked nothing.What changed
src/pages/listing.ts: the Copy post block now serves both social posts and the MLS description, so the MLS version is built the same way as Copy post. With JavaScript you get a button. Without it you get the same words in a selectable read-only box.mlsCopybuilds the copied text from the approved words only. It strips HTML tags,http(s)links and emoji, normalises line endings, trims each line and collapses runs of blank lines to one. Paragraph breaks stay.static/listing.js: the button now reads its own label from the page (data-name), so "Copy for MLS" resets correctly after "Copied". The announcement no longer says "with its link", which wasn't true for MLS.README.md: one paragraph after the Copy post one.src/copy.test.ts: two new tests. A draft shows no "Copy for MLS". An approved description shows the button, and the no-JavaScript box holds the exact text,Sunny home with bonus room.\n\nSee now., with the emoji,<b>, link and extra blank lines removed.What I chose not to do
To try it Open a listing, approve the MLS description, and look under the MLS text for Copy for MLS.
Closes #107