Public: anyone can read this; the crew can change it.
This week prints as a one-page sheet of every overdue and coming date across all deals, for the agent's Monday office meeting #105
Check · Review · Land · Live done — Landed and live in production.
Print this week now sits beside the This week heading on the clock and opens /week, a printable sheet of the same rows. I did not run a full bun test or tsc. bun x tsc --noEmit is unavailable here because there is no TypeScript in nodemodules or package.json.
shipped production is serving it deploy d2eada7
1 earlier comment · 1 event
Print this week now sits beside the This week heading on the clock and opens /week, a printable sheet of the same rows. I did not run a full bun test or tsc. bun x tsc --noEmit is unavailable here because there is no TypeScript in node_modules or package.json. scripts/gate.ts and scripts/fast.ts do not exist in this clone. I ran bun scripts/lint-design.ts, which is the repo's name for design-lint, and it passes, plus the suites below, all green.
What changed
- New page:
src/pages/week.tsfollows the pattern ofsrc/pages/timeline.ts.
- Layout: it lists Overdue, Today, then each day. Each row has the deal's address, the date's label, who owes it and its state. The agent's name and brokerage and the print date sit at the top.
- Controls: there are no forms or buttons in the printed output. The Print button shows on screen only, through the existing static/print.js.
- Route:
GET /weekinsrc/routes.tsreads throughlistDeals, so it goes throughpermitlike the clock.
- A stranger gets the sign-in answer.
- The Find query (?q=) carries through, and the link on the clock keeps the current q. A bad q returns 400 with the same refusal text as the clock.
- Shared week code: the day grouping moved out of
clock.tsintobyDayinsrc/week.ts. The clock's card and the sheet both use it, so the grouping is not duplicated.timeline.tsnow exports its status words (STATUS) so the sheet shows the same ones. - Print: the page reuses the
timeline-pagebody class, so the existing print rules apply. I added two rules instatic/app.css: tighter row padding, and no page break right after a day heading. - Tests:
- A new src/week.page.test.ts checks that the page lists overdue and coming dates, and that it omits done dates and closed deals.
- It also checks the sign-in answer for a stranger and that Find narrows the sheet and a bad q is refused.
- /week is added to a11y.test.ts and to speed.test.ts, where the existing 200-deal budget test covers it.
- Docs: a README step under This week and a note in
docs/TECHNICAL.md.
What I chose not to do
- The one-page fit is by compact CSS, not checked in a real print preview. The four sample deals are about a dozen rows. A very large week will run to a second page, and rows will not split across pages.
- No new permissions: the page reads through the existing
deallist cell.
To try it
Sign in, press Print this week under the clock, then Print. Try /week?q=harbor for the narrowed sheet.
Clean. /week reads through listDeals (permit), refuses a bad q with 400, escapes all output, has no forms, and shares byDay with the clock card. No contract cell is loosened. Tests cover each stated behaviour; a11y and speed lists include the page. The preview serves /week.
Left #93 open: 1 unticked item remain (The page lists the same rows This week shows (Overdue, Today, then each day), each with the deal's address, the date's label, who owes it and its state, plus the agent's name and brokerage from the profile at the top and the day it was printed; no buttons or forms in the printed output, and a Print button on screen only.).
Print this week now sits beside the This week heading on the clock and opens
/week, a printable sheet of the same rows. I did not run a fullbun testortsc.bun x tsc --noEmitis unavailable here because there is no TypeScript innode_modulesorpackage.json.scripts/gate.tsandscripts/fast.tsdo not exist in this clone. I ranbun scripts/lint-design.ts, which is the repo's name for design-lint, and it passes, plus the suites below, all green.What changed
src/pages/week.tsfollows the pattern ofsrc/pages/timeline.ts.- Layout: it lists Overdue, Today, then each day. Each row has the deal's address, the date's label, who owes it and its state. The agent's name and brokerage and the print date sit at the top. - Controls: there are no forms or buttons in the printed output. The Print button shows on screen only, through the existing
static/print.js.GET /weekinsrc/routes.tsreads throughlistDeals, so it goes throughpermitlike the clock.- A stranger gets the sign-in answer. - The Find query (
?q=) carries through, and the link on the clock keeps the currentq. A badqreturns 400 with the same refusal text as the clock.clock.tsintobyDayinsrc/week.ts. The clock's card and the sheet both use it, so the grouping is not duplicated.timeline.tsnow exports its status words (STATUS) so the sheet shows the same ones.timeline-pagebody class, so the existing print rules apply. I added two rules instatic/app.css: tighter row padding, and no page break right after a day heading.- A new
src/week.page.test.tschecks that the page lists overdue and coming dates, and that it omits done dates and closed deals. - It also checks the sign-in answer for a stranger and that Find narrows the sheet and a badqis refused. -/weekis added toa11y.test.tsand tospeed.test.ts, where the existing 200-deal budget test covers it.docs/TECHNICAL.md.What I chose not to do
deallist cell.To try it Sign in, press Print this week under the clock, then Print. Try
/week?q=harborfor the narrowed sheet.Closes #93