Public: anyone can read this; the crew can change it.
The MLS description shows its length against the MLS public remarks limit, and one over it cannot be approved without saying so #109
Merged 25d 6h ago, live in production
The MLS description on /listings/:id now shows N / 1,000 characters beside its box. It counts in code points and updates as the agent types. I ran the listing, post-length, OpenAPI and terminal tests and they pass.
-
Reviews
Changes requested — before the latest pushThe change is sound and reuses the existing tooLong path, but one behaviour has no test. Fix this first: the terminal door for the MLS description is untested.
src/tty.ts now shows
N / 1,000 characters, shows the over-limit note, asks for a seconda, and printsApproved, too long for the MLS.The existing terminal tests (src/tty.test.ts around lines 213-224) only cover X. Add a terminal test: an MLS description over 1,000 shows the count andToo long for the MLS remarks by N, the firstaasks, the secondaapproves, and the audit row readsapproved_too_long_for_mls. Box 4 says the rule holds through the terminal, and that needs a test that fails without the change.Smaller points:
- In src/actions.ts the approveAsset doc comment is now one very long line. Re-wrap it.
- There is no test that the API/MCP path refuses an over-limit MLS approval. They refuse all approvals via person_required, so a one-line assertion would pin it.
- The seller-report requirement in box 3: I found no report code that reads audit outcomes. Say so explicitly in the README or the pull, or point to the code that shows it.
No contract.json cell is loosened. Security and escaping look fine.
ApprovedEarlier asks are met. The terminal test covers the MLS count and the second-a flow. The API/MCP refusal with tooLong is pinned in the person-approves test. The approveAsset doc comment is re-wrapped. The README states that no seller report reads audit outcomes. The shared overNote/countLine helpers keep one rule across the page, API, MCP and terminal, and no contract cell is loosened. I read the diff and did not exercise the preview.
-
Checks
shipped production is serving it deploy d34a526
-
History
- Test the terminal door and the API/MCP refusal for an over-limit MLS description; re-wrap the approveAsset note (#106) a4ec846
- The MLS description shows N / 1,000 characters and needs an acknowledgement to approve over it, like an over-length post (#106) 15d5fc8
- 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
- Launching an address you already launched asks first, and links to the listing you have (#74) 63f9fc2
- Type your details once: a new listing's form starts with the agent's name, brokerage, license, phone, email, colours and headshot from their last listing (#71) 2cfa641
The MLS description on /listings/:id now shows N / 1,000 characters beside its box. It counts in code points and updates as the agent types. I ran the listing, post-length, OpenAPI and terminal tests and they pass. tsc and the gate and design-lint scripts were not run: there is no tsconfig.json, and the repo has no scripts/gate.ts or scripts/design-lint.ts (scripts/lint-design.ts is the lint script and printed no findings). I did not run the whole suite, and I never started the app.
What changed
- Limit and counting:
MLS_LIMIT = 1000sits besideLIMITSinsrc/postlength.ts, with the counting helpers. The page,/fair-housing, the edit response and the terminal all usecountLine(kind, text). - Approving over the limit:
approveAssetinsrc/actions.tsrefuses an MLS description over 1,000 with "Too long for the MLS remarks by N. Approve it knowing so: send tooLong: true." The page's Approve button reads "Approve — too long for the MLS" and sendstoo_long. - Terminal: it shows the count and the note, and asks for a second
a. - Audit: such an approval is recorded as
approved_too_long_for_mls; an over-length post still readsapproved_too_long_for_x. I did not find a seller-report path that reads these outcomes, so I changed nothing there. - API and MCP: both go through the same
approveAsset, so the rule holds there. They refuse approving outright (person_required), so only the page and terminal can use the acknowledgement. The PATCH summary in the OpenAPI description now names both limits, andcontract/openapi.jsonis regenerated. - Live counter:
static/listing.jsrecounts in code points on every keystroke for the MLS box. The 600 ms server check no longer overwrites that count. - No layout shift: the counter has
min-width: 24chinstatic/app.css. - README: the agent section says it in one sentence.
Tests
- A 1,000-character description approves plainly.
- A 1,001-character one is refused without the acknowledgement, refused with a non-
truevalue, and accepted withtooLong: true. - The audit rows read
approvedthenapproved_too_long_for_mls. - The page renders the counter, and
/fair-housinganswers1,001 / 1,000 characters. - The three sample listings' MLS descriptions stay under the limit in every tone.
Changed on purpose: the existing "each social post shows its length" test posted an over-length string as kind: "mls" and expected no length back. The MLS now has a length, so I changed that request to email_update, which still has none. Post-length behaviour is otherwise unchanged.
Not done: the X-style multi-limit line is not used for the MLS, since it has one limit. I did not loosen any contract.json cell.
To try it: open a listing's MLS description, paste more than 1,000 characters, and watch the counter. Save it, then Approve; the button names the overrun.
🤖 Generated with Claude Code
I've addressed all four of Sentinel's points on this branch and pushed. src/tty.test.ts and src/listings.test.ts pass (57 tests); I did not run the full suite.
- Terminal test: I added "the terminal shows the MLS description's count, and one over 1,000 needs a second a" in
src/tty.test.ts.- It uses a 1,003-character MLS description.
- The screen shows
1,003 / 1,000 charactersand! Too long for the MLS remarks by 3. - The first
aasks and leaves "0 of 7 approved". - The second
aprints "Approved, too long for the MLS." and shows "1 of 7 approved". - The audit row reads
approved_too_long_for_mls. - The terminal MLS paths are new in this pull, so the test fails without it.
- API and MCP refusal: the existing "only a person approves" test in
src/listings.test.tsnow also pins that a 1,001-character MLS description withtooLong: trueis refused withperson_requiredon both theapiandmcpdoors, and stays unapproved. - Doc comment: the
approveAssetcomment insrc/actions.tsis re-wrapped. - Seller report: I found no report code that reads audit outcomes, and the README now says so. The audit trail (
approved_too_long_for_mls) is where it's recorded. If a seller report is meant to show it, that is a separate change.
The MLS description on
/listings/:idnow showsN / 1,000 charactersbeside its box. It counts in code points and updates as the agent types. I ran the listing, post-length, OpenAPI and terminal tests and they pass.tscand the gate and design-lint scripts were not run: there is notsconfig.json, and the repo has noscripts/gate.tsorscripts/design-lint.ts(scripts/lint-design.tsis the lint script and printed no findings). I did not run the whole suite, and I never started the app.What changed
MLS_LIMIT = 1000sits besideLIMITSinsrc/postlength.ts, with the counting helpers. The page,/fair-housing, the edit response and the terminal all usecountLine(kind, text).approveAssetinsrc/actions.tsrefuses an MLS description over 1,000 with "Too long for the MLS remarks by N. Approve it knowing so: send tooLong: true." The page's Approve button reads "Approve — too long for the MLS" and sendstoo_long.a.approved_too_long_for_mls; an over-length post still readsapproved_too_long_for_x. I did not find a seller-report path that reads these outcomes, so I changed nothing there.approveAsset, so the rule holds there. They refuse approving outright (person_required), so only the page and terminal can use the acknowledgement. The PATCH summary in the OpenAPI description now names both limits, andcontract/openapi.jsonis regenerated.static/listing.jsrecounts in code points on every keystroke for the MLS box. The 600 ms server check no longer overwrites that count.min-width: 24chinstatic/app.css.Tests
truevalue, and accepted withtooLong: true.approvedthenapproved_too_long_for_mls./fair-housinganswers1,001 / 1,000 characters.Changed on purpose: the existing "each social post shows its length" test posted an over-length string as
kind: "mls"and expected no length back. The MLS now has a length, so I changed that request toemail_update, which still has none. Post-length behaviour is otherwise unchanged.Not done: the X-style multi-limit line is not used for the MLS, since it has one limit. I did not loosen any
contract.jsoncell.To try it: open a listing's MLS description, paste more than 1,000 characters, and watch the counter. Save it, then Approve; the button names the overrun.
🤖 Generated with Claude Code
Closes #106