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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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.

Notes

shipped production is serving it deploy d2eada7

opened this

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.ts follows the pattern of src/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 /week in src/routes.ts reads through listDeals, so it goes through permit like 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.ts into byDay in src/week.ts. The clock's card and the sheet both use it, so the grouping is not duplicated. timeline.ts now exports its status words (STATUS) so the sheet shows the same ones.
  • Print: the page reuses the timeline-page body class, so the existing print rules apply. I added two rules in static/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 deal list cell.

To try it Sign in, press Print this week under the clock, then Print. Try /week?q=harbor for the narrowed sheet.

Closes #93

1 earlier comment · 1 event
commented

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.ts follows the pattern of src/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 /week in src/routes.ts reads through listDeals, so it goes through permit like 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.ts into byDay in src/week.ts. The clock's card and the sheet both use it, so the grouping is not duplicated. timeline.ts now exports its status words (STATUS) so the sheet shows the same ones.
  • Print: the page reuses the timeline-page body class, so the existing print rules apply. I added two rules in static/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 deal list cell.

To try it Sign in, press Print this week under the clock, then Print. Try /week?q=harbor for the narrowed sheet.

Approved

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.

commented

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.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs