Public: anyone can read this; the crew can change it.
The Next up cut line still falls when the week's dollar capacity is unknown, by the pace the crew is landing issues #12103
Next up now draws a cut line by pace when the cost line can't be drawn. The gate, tsc --noEmit, test/mcp-size.test.ts and 237 tests across the 21 test files that mention Next up pass here. I did not find what turned the earlier checks red.
stopped parked by the crew deploy 6f4fdd7
3 earlier comments
Next up now draws a cut line by pace when the cost line can't be drawn. The gate, tsc --noEmit, test/mcp-size.test.ts and 237 tests across the 21 test files that mention Next up pass here. I did not find what turned the earlier checks red. This branch already held the work from the parked tries, so I re-ran everything, fixed one misindented line in the test and pushed.
What changed
paceCutanddaysLeft:paceCut({landedPerDay, daysLeft, total})insrc/flow/week.tsreturnsfloor(perDay × daysLeft)rows, capped attotal, with a reason in plain words. When the pace is zero it says "none reaches the reset".daysLeftcomes fromcapacity.resetsAtwhen it is known, else from the end of the ISO week (Monday 00:00 UTC). The clock is passed in.- Pace count: the issues landed in the last 7 days come from
windowShippedinsrc/flow/retro.ts, so there is no second count. weekViewfallback: it uses the pace only whencutLineisunsure. The sentence reads "Line by pace: N issues a day, D days left", with "; pace is a guess" added when fewer than 3 issues landed.- Which one drew the line:
Cutgained aby: "cost" | "pace"field. The web page and the terminal screen word the line from it: "by pace (N reach it)" against "(N fit)". The web page also stops attaching its dollar-capacity data to the list when the line is by pace. - MCP: the
next_uptool needed no change. It already readsweekView, so itsthisWeekflags andprojectionfollow the pace line from the same read. - Tests:
test/week.test.tscovers four things.
- Zero pace reaches zero rows and says so, a faster pace moves the line down, and the line never passes the list's length.
- daysLeft from a known reset and from the ISO week.
- weekView choosing the pace when no dollar line exists, and the "pace is a guess" wording.
- The cost line winning whenever it exists.
Left out: the pace is not weighted by issue size, and a plain issue count still ignores cost when the dollar line is missing.
Not clean: bun scripts/design-lint.ts reports one off-scale font size at src/web/studio/cards.ts:1216. I didn't touch that file, and I left it alone.
Try it: open an app's Next up with no weekly capacity read. A "this week ends here by pace" line should appear in the web page and the terminal screen. next_up over MCP should flag thisWeek accordingly, with a projection that starts "Line by pace".
🤖 Generated with Claude Code
The Next up pace line is unchanged, and I found no cause for the red check in this pull. I merged current main into the branch and pushed it, and the failures I re-ran locally are not from this change.
Failures that are not from this change
- A clean checkout of
origin/mainfails five of the checks I re-ran:test/unreached.test.ts,test/header-width.test.tsandtest/cookie-flags.test.ts(two tests), plustest/mcp-table.test.ts. That includes "docs/MCP.md holds the tool table", "every module under src/ is imported by another" (src/crew/week_burn.ts) and the header-width and cookie-flag checks. test/design-lint.test.tsalso fails here, on a font size insrc/web/studio/cards.ts. I didn't run it against a cleanmain, so I can't say whether that one ismain's too.- None of those files are ones this pull touches.
- The first push failed 18 tests across 12 shards. I only re-ran the six test files above, because these checks are failing the same way on
main. I did not reproduce the rest, such as the stall, fingerprint and home-statement ones.
Where this branch stands
- Before the merge, the gate,
tsc --noEmit,test/mcp-size.test.tsand the Next up and week tests all passed. - After the merge, I re-ran the gate,
tsc --noEmitand 10 test files. Besides themain-red files above, that includestest/mcp-size.test.ts,test/mcp-next-up.test.ts,test/tui-next-up.test.tsand the week tests, and those did not fail. - The pull's own change is the same as before:
paceCut,daysLeftand thebyfield insrc/flow/week.ts, the web and terminal wording, and the tests intest/week.test.ts.
A person needs to get main green, or accept it as red, before this pull's check can pass. I didn't patch those unrelated files here. Fixing them in this pull would mix several unrelated changes into it.
Next up now draws its cut line by pace when the week's dollar capacity can't be read. This push fixes the one check failure my change caused.
- What I fixed: the pace fallback adds one read of the week's landed issues on
/:owner/:name/next. That put the page at 65 SQL statements against a budget of 64, which failedtest/pages-budget.test.ts. I raised that page's budget to 65 intest/pages-budget.test.ts, with a "+1" note matching the file's convention for such raises. The test,test/week.test.tsandtest/week-sprint.test.tspass here, andbun x tsc --noEmitandbun scripts/gate.tsprint nothing. - What I did not run:
scripts/fast.tsreported the diff reaches 2001 of 3020 test files, so I ran only the three files above. - Other failures not touched:
test/header-width.test.tsalso fails onorigin/mainitself (src/web/pages/home_flow.ts,src/flow/lanes_read.ts,src/flow/lanes.tsandtest/surfaces-adversarial.test.ts, none in this diff). I assume the rest of the red shards (theflow-cacheout-of-memory, the cookie and MCP docs checks, the home-statement checks and the like) are not caused by this pull, but I did not run them. - Where the change lives: the pace logic is in
src/flow/week.ts. The line reads "This week ends here by pace (N reach it)" on the web page and the terminal. - How to try it: open
/:owner/:name/nexton a repository with no weekly capacity read.
Parked by the crew: the check stayed red through 2 automatic tries
Next up now draws a cut line by pace when the cost line can't be drawn. The gate,
tsc --noEmit,test/mcp-size.test.tsand 237 tests across the 21 test files that mention Next up pass here. I did not find what turned the earlier checks red. This branch already held the work from the parked tries, so I re-ran everything, fixed one misindented line in the test and pushed.What changed
paceCutanddaysLeft:paceCut({landedPerDay, daysLeft, total})insrc/flow/week.tsreturnsfloor(perDay × daysLeft)rows, capped attotal, with a reason in plain words. When the pace is zero it says "none reaches the reset".daysLeftcomes fromcapacity.resetsAtwhen it is known, else from the end of the ISO week (Monday 00:00 UTC). The clock is passed in.windowShippedinsrc/flow/retro.ts, so there is no second count.weekViewfallback: it uses the pace only whencutLineisunsure. The sentence reads "Line by pace: N issues a day, D days left", with "; pace is a guess" added when fewer than 3 issues landed.Cutgained aby: "cost" | "pace"field. The web page and the terminal screen word the line from it: "by pace (N reach it)" against "(N fit)". The web page also stops attaching its dollar-capacity data to the list when the line is by pace.next_uptool needed no change. It already readsweekView, so itsthisWeekflags andprojectionfollow the pace line from the same read.test/week.test.tscovers four things.- Zero pace reaches zero rows and says so, a faster pace moves the line down, and the line never passes the list's length. -
daysLeftfrom a known reset and from the ISO week. -weekViewchoosing the pace when no dollar line exists, and the "pace is a guess" wording. - The cost line winning whenever it exists.Left out: the pace is not weighted by issue size, and a plain issue count still ignores cost when the dollar line is missing.
Not clean:
bun scripts/design-lint.tsreports one off-scale font size atsrc/web/studio/cards.ts:1216. I didn't touch that file, and I left it alone.Try it: open an app's Next up with no weekly capacity read. A "this week ends here by pace" line should appear in the web page and the terminal screen.
next_upover MCP should flagthisWeekaccordingly, with aprojectionthat starts "Line by pace".🤖 Generated with Claude Code
Closes #12080