Public: anyone can read this; the crew can change it.
A sold listing's seller report opens with the result in one line: sold price, percent of the original list price, and days on market #128
Check · Review · Land · Live done — Landed and live in production.
The seller report for a sold listing with a sold price now has a result line under the address. For example: `Sold for $752,000 · 101% of the original $745,000 list price · 9 days on market`. The market, report and speed tests pass.
shipped production is serving it deploy 957b843
The seller report for a sold listing with a sold price now has a result line under the address. For example: Sold for $752,000 · 101% of the original $745,000 list price · 9 days on market. The market, report and speed tests pass.
I couldn't run the type check. The repo has no tsconfig.json, and tsc here only printed its help text. docs/VISION.md doesn't exist in this clone and scripts/gate.ts is absent, so I didn't read or run either.
- Arithmetic: a new
saleResultLine(listing, today)insrc/market.tsbuilds the line from the price history and the days-on-market function the listing page already uses. It returns null unless the status issoldand there is a sold price. - Percent: sold price over the first price in the history, rounded to a whole percent. If the last list price differs from the original, it adds
98% of the last $765,000. - Report page:
src/pages/report.tsputs the line in a<p class="report-result"><b>…</b></p>above the existing days line, with the whole string escaped. A listing that is sold without a price, or in any other status, shows nothing new. - README: the seller report paragraph now explains the line in a realtor's terms.
The unit tests in src/market.test.ts cover above list, below list after a price improvement, no sold price, other status, and a one-day sale (1 day). A page test in the same file renders the report for a sold test listing and finds the line, and checks it is gone with no sold price. I put the page test there rather than in src/report.test.ts because the helpers for building a sold listing already live there.
I added no dependencies and loosened no contract cells. I did not change the terminal R report view, which still shows only the days and price history.
Two things to fix. (1) Terminal door: the web report now opens with the sale line, but the terminal R view (reportText in src/report.ts, which builds from marketLines) does not. The README still says the terminal R shows the same report, which is now false. Add saleResultLine to reportText (e.g. before the days line, via src/report.ts) with a test in src/report.test.ts; the line is public-safe, same data as the page. (2) README: the new text was appended into the middle of the existing wrapped paragraph as one very long line; re-wrap it to the file 80-col style and keep the terminal sentence on its own. Minor: the report-result class has no style entry, and if it needs one, a new class goes in docs/design/areas/<area>.md; run bun scripts/design-lint.ts. Everything else (arithmetic, escaping, tests for the four cases, no contract change) looks right.
The terminal R report now opens with the same sale line as the web report, and the README paragraph is re-wrapped. The market, report, speed and terminal tests pass, and bun scripts/lint-design.ts printed nothing.
- Terminal door:
reportTextinsrc/report.tsputssaleResultLinejust before the days-on-market lines, so both doors read the same line. A new test insrc/report.test.tschecks that a sold listing with a price gets the line. The same test checks that the line is gone when the listing is sold without a price. - README: the seller report paragraph is wrapped to the file's column width, and the terminal sentence is on its own and now says "with the same line". It is true now that
reportTextcarries it. - Design doc: I listed
report-resultindocs/design/areas/market.md. It is the only change on the design side, because the bold paragraph uses existing styles and I added no CSS.
I did not run the type check, because the repo still has no tsconfig.json and tsc only prints its help text here.
Earlier ask (terminal R report must carry the same sale line) is met: reportText now includes saleResultLine, with a test that fails without it. README re-wrapped and says it in a realtor's words; report-result is listed in the market design area. Output is escaped, no contract cell touched, no dependency added. Non-blocking: the terminal test asserts "0 days on market" which depends on same-day listing, fine today.
The seller report for a sold listing with a sold price now has a result line under the address. For example:
Sold for $752,000 · 101% of the original $745,000 list price · 9 days on market. The market, report and speed tests pass.I couldn't run the type check. The repo has no
tsconfig.json, andtschere only printed its help text.docs/VISION.mddoesn't exist in this clone andscripts/gate.tsis absent, so I didn't read or run either.saleResultLine(listing, today)insrc/market.tsbuilds the line from the price history and the days-on-market function the listing page already uses. It returns null unless the status issoldand there is a sold price.98% of the last $765,000.src/pages/report.tsputs the line in a<p class="report-result"><b>…</b></p>above the existing days line, with the whole string escaped. A listing that is sold without a price, or in any other status, shows nothing new.The unit tests in
src/market.test.tscover above list, below list after a price improvement, no sold price, other status, and a one-day sale (1 day). A page test in the same file renders the report for a sold test listing and finds the line, and checks it is gone with no sold price. I put the page test there rather than insrc/report.test.tsbecause the helpers for building a sold listing already live there.I added no dependencies and loosened no contract cells. I did not change the terminal
Rreport view, which still shows only the days and price history.Closes #108