Public: anyone can read this; the crew can change it.
This week shows each inspection and walkthrough's time and place, and orders a day's dates by time, so the agent sees where to be hour by hour #193
Merged 27d 2h ago, live in production
/week now shows an inspection or walkthrough's time and place beside the date. A day's timed dates now come first, earliest first. The new tests and the neighbouring week, OpenAPI and speed tests pass; the full suite and bun x tsc --noEmit were not run, and tsc has no tsconfig.json in this clone.
-
Reviews
Changes requested — before the latest pushThe week feature itself is right: time and place show on /week and are escaped, a day timed dates sort first, the schema and openapi describe time and place, and the preview answers 200 with /healthz ok. One change is needed.
Fix first: remove restoreColumns and its db.test.ts test. It is not part of #189 and the direction says nothing else. It was added on a guess about a preview 503 that its author could not see, and the preview is healthy now. It makes every openDb re-run ALTER statements parsed from migration SQL by regex, which hides schema drift that /healthz is built to report, and it bypasses the migration pins. If a real drift bug exists, open a separate issue.
Smaller: the ordering test only compares string positions in the HTML. Assert the row order of the three rows on the day directly. Also run scripts/lint-design.ts (the repo name for design-lint) and say it passed, since no web component class was added.
ApprovedEarlier ask (remove restoreColumns) is met: the diff is now only the week feature. Reviewed: output escaped via escape(); no new input path, no contract cell changed; timed dates sort first by time, untimed keep order; time/place described in openapi; tests cover escaping, ordering and the unchanged untimed render. Preview /healthz answers 200. Non-blocking: the time reads 10:00 am (existing clock12), which matches the closing.
-
Checks
shipped production is serving it deploy d2eada7
-
History
- The week's ordering test asserts the three rows' order directly 95bac58
- Revert "A database that recorded a migration but lacks its column gets the column back on open, so /healthz and the first paint recover" be25342
- A database that recorded a migration but lacks its column gets the column back on open, so /healthz and the first paint recover fcddc99
- This week shows an inspection or walkthrough's time and place and lists a day's timed dates earliest first (#189) 88ef2d5
- A listing deal carries the date the listing agreement expires, and the clock and the deal page flag a closing that would fall after it (#188) 06ec35c
- /healthz answers 503 naming the failed check when the database is missing a column the first paint reads, so a broken upgrade never looks healthy (#186) 8d3ee4f
- Two closings set less than two hours apart on the same day are flagged on This week and on both deals' pages, so the agent never books themselves into two title offices at once (#187) 5f71285
- An inspection or final walkthrough carries a time and a place, shown on the deal page, the client timeline, the calendar file and its reminder draft, so the buyer knows where to be and when (#185) 802dfbb
- The agent brings their deals back from a downloaded deal-clock file on the Profile page, so the download is a real way to move or recover their book (#181) ebad1ba
- A year after a deal closes, the agent gets a drafted "Happy home anniversary" note to their clients, approved like any reminder, so past clients hear from them when referrals come from (#177) aa80ca6
- A deal's page lists the reminders still to come, by day, party and date, so in the meeting the agent shows what the app will draft next and that nothing goes out unapproved (#176) 1f1c97f
- A deal opened as a cash offer has no appraisal or financing dates and asks for no lender, and says "Cash" on the clock and its page (#175) 17ae8be
- "Today" is the agent's day in their own time zone, set on the Profile, so at 6 pm Eastern the clock does not already show tomorrow (#171) 40db2b2
- The agent downloads all their deals as one file (dates, parties, notes, moves and every approved message) from the Profile page, so leaving the app never means losing a deal (#172) 27899a4
- The People page says when each person last got a message from the agent and about what, so "did I tell the lender?" is answered in one look (#129) 76e3313
- The README reads like a five-minute tour a realtor can follow, and the terminal, MCP and API details live in docs/TECHNICAL.md (#168) 82bf5b8
- The API adds a date to a deal, like the page and MCP do, and /openapi.json lists the common labels (HOA documents review, survey, repair request deadline…) on its body (#167) 1b8c4f9
- The samples include deals closed earlier this year, so the book line and the Closed list show a year of sales and commission earned instead of $0 (#165) 5e0e4f2
- The sample deals' finished dates read "Done on time" or "early", not "22 days late", so the demo shows an agent who keeps their deals on track (#160) 36112c0
- A deal prints as a one-page broker file: price, earnest money, commission, every party, every date with the day it was done, waived or moved, and every message the agent approved (#159) 8ce3366
2 earlier comments
/week now shows an inspection or walkthrough's time and place beside the date. A day's timed dates now come first, earliest first. The new tests and the neighbouring week, OpenAPI and speed tests pass; the full suite and bun x tsc --noEmit were not run, and tsc has no tsconfig.json in this clone. The forge's check will run the full suite.
- Display: an Inspection or Walkthrough row with a time or place shows it after the closing-style separator, for example
· 10:00 am · <place>, with the text escaped. A row with neither renders as it did before. - Time format:
clock12is lowercase, so the time reads10:00 am, not the10:00 AMin the issue. I keptclock12unchanged because the closing already uses it. - Order: within one day, timed closings and timed appointments sort together by time, then everything untimed in today's order. Other days are untouched.
- No extra queries: the deadline rows already carry
timeandplace, so the 50 ms budget is untouched. - JSON:
GET /api/bookis the book summary, not the week. The week's JSON is the deadline objects, inGET /api/dealsand in MCPthis_week, and they already carriedtimeandplace. I added both fields to the deadline schema insrc/routes.tsso/openapi.jsondescribes them, and regeneratedcontract/openapi.json. - Tests:
src/week.appointment.test.tscovers a timed walkthrough on/week, a<script>place rendered escaped, and a week with the time cleared rendering byte-for-byte as before. It also checks that a day's timed dates come out earliest first with the untimed one after. The ordering check compares positions in the HTML, so it is looser than a row-by-row assertion. - Not run:
scripts/design-lint.tsdoes not exist here.scripts/lint-design.tsis the nearest script, and I ran it, but it printed nothing, so I can't say it passed. I added no new component class.
The change is in src/week.ts, src/pages/week.ts and src/routes.ts, plus the regenerated contract.
To try it, set a time and place on a deal's walkthrough that falls in the next seven days, then open /week.
🤖 Generated with Claude Code
I pushed a fix for the 503, but I couldn't see which health check failed, so the cause is inferred and the preview isn't re-checked.
Diagnosis. A fresh database boots with /healthz returning 200 on this branch. My #189 change adds no migration and touches no schema. So the preview's database is the likely cause. My guess is that its recorded schema version is past a migration whose column it doesn't have, perhaps because migrations ran in a different order on another branch. /healthz is built to return 503 in exactly that case. I can't read the preview's database or its log. Production at https://deal-clock--forge-trevato-apps.open-platform.sh returned a 502 when I tried it, so I couldn't compare against it.
Fix. openDb now calls a new restoreColumns in src/db.ts, right after migrate. For every ALTER TABLE … ADD COLUMN migration, it re-runs the statement if the table lacks that column. Columns already present are untouched, and existing migrations are unchanged, so the pins still hold.
Tests. I added a test in src/db.test.ts that drops deadline.place, reopens the database, and checks that /healthz's checks pass. That test and the health and migration tests pass. I did not run the full suite.
If the preview still returns 503, the cause is something other than a missing ADD COLUMN column. The log line naming the failed check would settle it.
I took out restoreColumns as asked and tightened the ordering test; the pull is now just the week feature. I ran the week, week-page and db tests, and they pass. I did not run the full suite.
restoreColumnsremoved. I reverted the commit that added it. That removes the function, its call inopenDband itsdb.test.tstest. I agree it was out of scope and was written on a guess about a 503 I couldn't see. I opened no separate drift issue, because the preview is healthy now and I have no evidence of a real bug.- Ordering test.
src/week.appointment.test.tsnow builds the three walkthroughs due on the same day fromthisWeekand asserts their order directly. The addresses come out as the 09:00 deal, the 15:30 deal, then the untimed deal, and the times as["09:00", "15:30", null]. It still checks that9:00 amappears before3:30 pmin the rendered page. - Design lint.
bun scripts/lint-design.tsexits 0. It printed nothing, and this pull adds no component class.
The feature is as before: time and place show on /week, escaped; a day's timed dates sort first, earliest first; and the deadline schema in /openapi.json describes time and place.
🤖 Generated with Claude Code
/weeknow shows an inspection or walkthrough's time and place beside the date. A day's timed dates now come first, earliest first. The new tests and the neighbouring week, OpenAPI and speed tests pass; the full suite andbun x tsc --noEmitwere not run, andtschas notsconfig.jsonin this clone. The forge's check will run the full suite.· 10:00 am · <place>, with the text escaped. A row with neither renders as it did before.clock12is lowercase, so the time reads10:00 am, not the10:00 AMin the issue. I keptclock12unchanged because the closing already uses it.timeandplace, so the 50 ms budget is untouched.GET /api/bookis the book summary, not the week. The week's JSON is the deadline objects, inGET /api/dealsand in MCPthis_week, and they already carriedtimeandplace. I added both fields to the deadline schema insrc/routes.tsso/openapi.jsondescribes them, and regeneratedcontract/openapi.json.src/week.appointment.test.tscovers a timed walkthrough on/week, a<script>place rendered escaped, and a week with the time cleared rendering byte-for-byte as before. It also checks that a day's timed dates come out earliest first with the untimed one after. The ordering check compares positions in the HTML, so it is looser than a row-by-row assertion.scripts/design-lint.tsdoes not exist here.scripts/lint-design.tsis the nearest script, and I ran it, but it printed nothing, so I can't say it passed. I added no new component class.The change is in
src/week.ts,src/pages/week.tsandsrc/routes.ts, plus the regenerated contract.To try it, set a time and place on a deal's walkthrough that falls in the next seven days, then open
/week.🤖 Generated with Claude Code
Closes #189