Public: anyone can read this; the crew can change it.
small: Print a deal page on one sheet of paper for the client meeting #279
The deal page now prints on one sheet: address, summary, parties and the dated list in black on white, with no header, buttons or forms. The new tests and the a11y and file-page tests pass. I haven't printed a page or checked it against a letter sheet, so the one-page fit for a sample deal is untested.
stopped closed without shipping deploy 0c6c893
3 earlier comments · 1 event
The deal page now prints on one sheet: address, summary, parties and the dated list in black on white, with no header, buttons or forms. The new tests and the a11y and file-page tests pass. I haven't printed a page or checked it against a letter sheet, so the one-page fit for a sample deal is untested.
Not done:
- The clock page has no print rules. The issue names it, but the clock is a different layout and I limited this change to the deal page.
- There is no Print button on the deal page. The deal page already links to the client timeline and the broker file, and both have a Print button. Plain browser print (Ctrl/Cmd+P) works on the deal page itself. I added no script, so the CSP is untouched.
bun scripts/design-lint.tsdoesn't exist in this repo, so I ranscripts/lint-design.tsinstead. It printed nothing.bun x tsc --noEmitonly printed its help text, and it did the same without my change. I never got a type check, andscripts/gate.tsdoesn't exist either, so I ran neither.
What changed:
src/pages/deal.ts: the page body gets classdeal-page, and the Dates and Parties cards getprint-keep.static/app.css: a new@media printblock, every selector scoped under.deal-page. It hides everything on the page except those two cards and the address and summary. The hidden parts are the header, footer, the "Back to the clock" link, the progress line, edit and remove controls, all forms and buttons, the date sheets, and the message cards. Card borders and muted grey text are removed.src/dealprint.test.ts(new): the page carries the body class and the twoprint-keepcards, and has no inline script. The print block hides the nav, buttons and forms, and every selector in it is scoped to.deal-page.
I put the new CSS before the broker-file block, because the existing file-page test checks that everything after its marker is scoped to .file-page.
To try it, open any /deals/:id page and use the browser's print preview.
🤖 Generated with Claude Code
The deploy failed on the print rules are scoped to the timeline page. That test (src/timeline.test.ts) reads the CSS from the first @media print up to the broker-file block and requires every selector in that range to start with .timeline-page. My earlier print block sat in that range.
I moved the deal-page print block to the end of static/app.css, after the broker-file block. That restores the range the timeline test reads. The broker-file test in src/file.test.ts reads from its marker to the end of the file. I changed it to stop at the deal-page marker, so it no longer sees the new block. That edit was needed because of where I placed the block, not because the test was wrong.
I ran src/dealprint.test.ts, src/file.test.ts and src/timeline.test.ts locally and all 19 tests pass. I did not run the full suite; the forge runs it on this push. I pushed the fix, and the rules themselves are unchanged.
The deal-page print block is sound: every selector is scoped under .deal-page, there is no inline script, no contract cell changes, and the tests cover the block. One miss against the issue.
Fix first: box 1 names the clock as well as the deal page, and the clock page (/) still has no print rules. Add a body class to the clock page and a scoped @media print block that hides the header, buttons and forms and leaves the dated list in black on white. Put it so the existing scope tests (timeline, file, dealprint) still pass, and add a test for it like dealprint.test.ts. If the clock is meant to stay out of scope, say so on the issue rather than leaving the box open.
Also: the one-page fit for a sample deal is untested. Check it in a print preview of the preview deploy and say in the pull that you did.
The deal page and the clock now both print as a plain sheet, but I have not looked at either in a print preview. This shell has no browser, so I couldn't check the one-page fit for a sample deal, and I won't claim it. Someone needs to open Ctrl/Cmd+P on the deal page and on the clock page of the #279 preview before this lands.
What changed
- Deal page (
/deals/:id): body classdeal-page, and the Dates and Parties cards carryprint-keep. In print it shows the address, summary, parties and dated list in black on white. The header, footer, crumb, progress line, buttons, forms, edit controls, date sheets and message cards are hidden. - Clock (
/): newclock-pagebody class insrc/pages/clock.ts. In print it shows the title, the timeline and the This week card. The header, footer, the Add-to-calendar and Download actions, the Find form, the legend, the Reminders-for-today card, the closed and sample-deal cards, and all buttons, forms and details are hidden. - CSS: both print blocks sit at the end of
static/app.css(deal-pagefirst, thenclock-page), and every selector in them is scoped to its own body class. - Tests: the new
src/clockprint.test.tsmirrorssrc/dealprint.test.ts. The deal-page test now reads only up to the clock marker, and the broker-file test only up to the deal-page marker. I ran those two, the timeline test and the a11y test, and all 24 pass. I did not run the full suite, so the forge's check on this push is the first full run. scripts/lint-design.tsprinted nothing. There is noscripts/design-lint.tsorscripts/gate.tsin the repo, andbun x tsc --noEmitprinted only its help text in this sandbox, so no type check ran.
Left out
- There is no Print button on the deal page or the clock, because the CSP forbids an inline script. The browser's print command works on both.
- No contract cell changed.
🤖 Generated with Claude Code
Declined: I can't fix this from the pull, and I pushed nothing new. The three failing tests fail the same way on an unmodified main. Run log: https://forge.open-platform.sh/trevato/deal-clock/runs/01m71xafxm74ac75n7f3qr3fpt
The deal page now prints on one sheet: address, summary, parties and the dated list in black on white, with no header, buttons or forms. The new tests and the a11y and file-page tests pass. I haven't printed a page or checked it against a letter sheet, so the one-page fit for a sample deal is untested.
Not done:
bun scripts/design-lint.tsdoesn't exist in this repo, so I ranscripts/lint-design.tsinstead. It printed nothing.bun x tsc --noEmitonly printed its help text, and it did the same without my change. I never got a type check, andscripts/gate.tsdoesn't exist either, so I ran neither.What changed:
src/pages/deal.ts: the page body gets classdeal-page, and the Dates and Parties cards getprint-keep.static/app.css: a new@media printblock, every selector scoped under.deal-page. It hides everything on the page except those two cards and the address and summary. The hidden parts are the header, footer, the "Back to the clock" link, the progress line, edit and remove controls, all forms and buttons, the date sheets, and the message cards. Card borders and muted grey text are removed.src/dealprint.test.ts(new): the page carries the body class and the twoprint-keepcards, and has no inline script. The print block hides the nav, buttons and forms, and every selector in it is scoped to.deal-page.I put the new CSS before the broker-file block, because the existing file-page test checks that everything after its marker is scoped to
.file-page.To try it, open any
/deals/:idpage and use the browser's print preview.🤖 Generated with Claude Code
Closes #278