250bf0ea7f13f57a7fd2cf84ae028c9c95a82c96
Rendering the report against a restored production database turned up three things the tests could not have told me, and one they should have. **Payroll posts on a pay run, not on a week.** A journal entry carries the date it was posted, so a client paying every fortnight puts a fortnight of labour on a single day. Against weekly columns the trend read `—, 56.7%, —, 52.5%, -19.5%`, which is noise. Against fortnightly columns the same client reads 18% to 27%. Hence the period control: weekly, bi-weekly or four weeks, set to whatever the client's pay cycle actually is. **Zero is a claim, and it was the wrong one.** A period with no payroll posted used to print 0.0% labour. No restaurant runs a week on no labour; the pay run simply has not landed yet. That now reads as an em dash, the trend line joins across the gap rather than diving to the floor, and the footnote says what to do about it. **A detail line printed larger than its own subtotal.** Averages dropped empty periods from the denominator, so a band posting every second period averaged over four periods while the total it rolled into averaged over eight — $23,923 of "Payroll - General" inside $12,035 of "Payroll". Money now averages across every period and ratios still average only the periods they are known for, which is the distinction that was missing. The one the tests should have caught: the shared cell renderer calls `dollars-0?` on a value before nil-punning it, so any nil cell was an NPE at render time rather than a blank. Guarded, along with its `:percent` branch, which also printed `%27.2` — sign on the wrong side. Nothing else in the codebase reaches that branch. Also here, in service of it being read rather than merely correct: a summary strip with the latest labour percentage, what it usually runs at, the change between them and a trend sparkline; a % of sales column beside the average, as the workbook has; detail lines indented under their subtotals; and an opt-in `height` on the shared table so a short report stops reserving 70vh it does not use. 11 tests, 41 assertions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
No description provided
Languages
Clojure
91%
CSS
4.2%
Sass
2.3%
HTML
1.2%
HCL
0.4%
Other
0.7%