Public: anyone can read this; the crew can change it.
week.ts can say how many Next up rows this week's pace reaches, as plain data with no read #12133
Landed in pull #12145
Parked by the crew: the check stayed red through 2 automatic tries (pull #12145 closed; its branch scout/12133-week-ts-can-say-how-many-next-up-rows-th at 2922af9cb096 keeps the work so far). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
try 1: src/flow/week.ts, test/week-pace.test.ts try 2: src/flow/week.ts try 3: scripts/unused-exports-allow.json
Reviewed pull #12145 at its head: ticked paceCut({landedPerDay, daysLeft, total, landed}) exported from src/flow/week.ts returns {rows, reason}: rows = min(total, max(0, floor(landedPerDay * daysLeft))); reason is plain words, e.g. "by pace: 2 issues a day, 3 days left". When landed < 3 the reason says the pace is a guess.; daysLeftInWeek(now, resetsAt) in the same file: days to resetsAt when given, else to the end of the ISO week (Monday 00:00 UTC); never negative; the clock is passed in.; New file test/week-pace.test.ts (leave test/week.test.ts and test/week-sprint.test.ts untouched): zero pace reaches zero rows and says so; a faster pace moves the line down; the line never passes total; fewer than 3 landed says guess; daysLeft from resetsAt and from the ISO week end.; weekView, cutLine, projection and every page are unchanged in this pull..
First half of the owner's ask in #12080 (a line marking how far this week reaches when the dollar capacity is unknown). Pure function only: no database, no page, no wiring, so nothing else's tests can move.
Done looks like:
Files: src/flow/week.ts, test/week-pace.test.ts. Risks: none outside the file; earlier tries failed by touching the page and its statement budget at once.