Public: anyone can read this; the crew can change it.

/next draws a line where this week's budget stops: a promise above it, a wish below #12264

opened this

Closed 18d 16h ago

/next now draws one line across the numbered list at the row where this week's pace stops. The label reads "This week's budget reaches here — by pace: …" and shows the reason beside it. It is server-rendered with no script, and the new tests and tsc pass.

Notes

opened this

/next now draws one line across the numbered list at the row where this week's pace stops. The label reads "This week's budget reaches here — by pace: …" and shows the reason beside it. It is server-rendered with no script, and the new tests and tsc pass. The gate script's output was cut off in my run, and I didn't run the full suite. I didn't take screenshots at 390 px and 1280 px, so that checklist item is still open. bun scripts/design-lint.ts passes.

  • How the line is placed: paceCut (src/flow/week.ts) gives the row count and the reason. The pace is pulls merged in the last 7 days divided by 7, against the days left in the week. The new weekPace in src/web/pages/next.ts does that sum.
  • How it's drawn: it reuses the cut-line row and sits where the existing line would. It shows in either list section, and when a filter is on it keeps the whole list's numbering. With no row below the reach point, or an empty queue, no line is drawn.
  • Tests: test/next-reach-line.test.ts covers four cases.
    • A faster pace moves the line down (checked on a fixed clock).
    • The page shows exactly one line, above the first row, when nothing has landed.
    • A saturated pace draws none.
    • An empty queue draws none.
  • Fixed-clock caveat: the page itself reads the real clock. The page-level cases only check no line or a line at the very top, so they don't depend on the time of week.

Decisions for you:

  • When the line shows: I draw it only when the dollar-capacity cut line has nothing to draw (no capacity or no cost history). When both exist, showing two lines would contradict each other, so the dollar line wins. If you want the pace line to replace the dollar line outright, say so.
  • Dragging: the pace line does not move while a row is dragged, since it isn't tied to row costs.

The pre-push hook required a commit saying how to try the change, so there is an empty "Try:" commit. To try it, open /<owner>/<repo>/next on a repo with open issues and no budget history.

Closes #11758

7 earlier comments
commented

/next now draws one line across the numbered list at the row where this week's pace stops. The label reads "This week's budget reaches here — by pace: …" and shows the reason beside it. It is server-rendered with no script, and the new tests and tsc pass. The gate script's output was cut off in my run, and I didn't run the full suite. I didn't take screenshots at 390 px and 1280 px, so that checklist item is still open. bun scripts/design-lint.ts passes.

  • How the line is placed: paceCut (src/flow/week.ts) gives the row count and the reason. The pace is pulls merged in the last 7 days divided by 7, against the days left in the week. The new weekPace in src/web/pages/next.ts does that sum.
  • How it's drawn: it reuses the cut-line row and sits where the existing line would. It shows in either list section, and when a filter is on it keeps the whole list's numbering. With no row below the reach point, or an empty queue, no line is drawn.
  • Tests: test/next-reach-line.test.ts covers four cases.
    • A faster pace moves the line down (checked on a fixed clock).
    • The page shows exactly one line, above the first row, when nothing has landed.
    • A saturated pace draws none.
    • An empty queue draws none.
  • Fixed-clock caveat: the page itself reads the real clock. The page-level cases only check no line or a line at the very top, so they don't depend on the time of week.

Decisions for you:

  • When the line shows: I draw it only when the dollar-capacity cut line has nothing to draw (no capacity or no cost history). When both exist, showing two lines would contradict each other, so the dollar line wins. If you want the pace line to replace the dollar line outright, say so.
  • Dragging: the pace line does not move while a row is dragged, since it isn't tied to row costs.

The pre-push hook required a commit saying how to try the change, so there is an empty "Try:" commit. To try it, open /<owner>/<repo>/next on a repo with open issues and no budget history.

commented

Pull #12264 had two problems. One was a gate failure that I've fixed and pushed. The other was the deploy message, which I didn't have to fix.

  • Deploy message: "running at … · no tests declared, none run" is the forge's summary for a deploy that succeeded. The preview answered 200 on / and /healthz. The app declares no test command in forge.json, which is why that tail appears. I left forge.json alone.
  • The real failure: bun scripts/gate.ts rejected three comment lines wider than 100 columns. They were in src/web/pages/next.ts (two) and test/next-reach-line.test.ts (one). A fourth line, the paceMark doc comment, turned up once the first three were fixed. I rewrapped all four and changed no behaviour.

The gate is now clean and tsc is clean. The 4 tests in test/next-reach-line.test.ts pass. I did not run the full suite, and I did not take the 390 px and 1280 px screenshots.

/next draws one dashed line across the numbered list where this week's pace stops, with the reason beside it. It appears only when there is no dollar line. To try it, open /alice/reach/next on a repo that has open issues and no budget history.

🤖 Generated with Claude Code

commented

Only one of the two failures counted against this pull was caused by my change. I've fixed that one and pushed, with the gate and tsc both clean.

  • week-sprint ("no capacity read means no line"): it asserted that /next has no role="separator" when no capacity has been read. The pace line this pull adds is exactly such a separator, in exactly that case. I changed the assertion, in test/week-sprint.test.ts, to ignore the data-pace line, so it still fails if a dollar line appears without a capacity read. The old assertion was wrong for the new behaviour. After the change week-sprint and stall-in-flight pass together (26 pass, 0 fail).
  • stall-in-flight: it passes in my sandbox three runs in a row, and my diff only touches /next and its tests. I believe it failed under shard load and is a timing flake, but I couldn't reproduce the failure here. If it fails again on the next check, that points to a real cause.
  • Not caused by this pull: the other 16 failures (mcp-table, first-ask-new-app, retry-after, deadends, first-screen-line, and the vetHost/outboundFetch ones in shard 74) were red on main at 749c831 too. The check log said they aren't counted against this pull. I didn't touch them.

I did not re-run the full suite.

🤖 Generated with Claude Code

commented

Pushed; I addressed every point except the screenshots (item 3), which I couldn't take. I didn't run scripts/fast.ts's suite, because the diff is too broad to name tests from it. I ran the next, week, tui-next, pull-next, sealed and mcp-next test files instead: 217 pass, 1 skipped, 0 fail. tsc, scripts/gate.ts and scripts/design-lint.ts are clean.

What changed

  • 1. Meaning. The line now reads "At this week's pace, work stops being promised here — <reason>." It no longer says "budget".
    • Where it's drawn. I kept it to the case with no dollar line, so it can't contradict the dollar line.
    • Why I didn't use the budget. The budget's own cut line already covers the case where a dollar line exists.
    • Count. The pace line counts merges over the last 7 days against the days left to reset.
    • Position. It sits after that many rows of the whole ranking. When nothing has landed it sits above the first row.
  • 2. Rendered test. test/next-reach-line.test.ts is rewritten and runs the page at a fixed clock. 7 merges put the line after 4 rows, and 3 more put it after 6. It also covers no merges (line at the top), a pace that reaches every row (no line), an empty queue, and a filter that hides the line. The emptyCookie alias and the 7000-row test are gone.
  • 3. Screenshots. I did not take the 390px and 1280px shots. The sandbox has no chromium and can't reach the preview with a browser.
  • 4. Terminal. The Next up screen shows the same sentence as a muted note under the last row the pace reaches. When the pace reaches no rows it gets its own line above the list. docs/features/next-up.md now describes the pace line. The cut-line bullet says "no dollar line" rather than "no line".
  • 5. test/week-sprint.test.ts now asserts exactly one separator and one data-pace, instead of the regex.
  • 6. Clean-up.
    • weekPace and paceWords are in src/flow/week.ts.
    • The new type SealedScope is in src/core/sealed.ts.
    • paceMark takes the plain PaceCut, so the unused rows field is gone.
    • The tangled paced expression is now paceBefore in next_filter.ts, unit-tested for first row, last row and filtered.
    • The page now takes a clock through nextPageAt(ctx, now); nextPage calls it with new Date().
  • 7. Wording. The zero-pace reason is "nothing landed in the last 7 days, so none of this is promised this week". The jargon "by pace:" is gone.

Not done: the pace line is not drawn alongside a dollar line.

To try: open /alice/reach/next on a repo with open issues and no budget history. One dashed line sits where this week's pace stops, with its reason. The same sentence shows on the terminal Next up screen.

commented

/next now draws a single dashed pace line where this week's pace stops promising work, with the reason beside it. It is drawn only where no dollar line is, so the two never disagree. The pace line also shows in the terminal.

The previous push failed the gate because three comment lines ran past 100 columns: src/flow/week.ts:191, src/web/pages/next.ts:195 and test/next-reach-line.test.ts:1. I rewrapped them. The wording is unchanged, so there is no behaviour change in this push.

Before pushing, bun scripts/gate.ts and bun x tsc --noEmit passed. bun test test/next-reach-line.test.ts passed, 7 tests. I did not run the full suite, since the forge runs it on the push.

To try it, open /alice/reach/next on a repo with open issues and no budget history. One dashed line sits where this week's pace stops.

commented

I merged main into the branch and pushed. The branch tree is now identical to main, because main already contains this feature, so the pull no longer adds anything.

While this pull was open, #12257 (18f765b43, building on 2da791da1) put a pace line on Next up in the web page, the terminal and next_up. It uses the same paceCut and paceWords names in src/flow/week.ts as my version, but a different design: a different paceWords, and one lineAfter shared by both surfaces.

I did not try to keep both implementations. Two pace lines would have meant two paceWords and two lines that could disagree, so for every conflicting file I took main's version. I also dropped my other additions: the weekPace function, paceBefore, the SealedScope type, test/next-reach-line.test.ts and the terminal test I had added.

  • Lost from this pull: my reason text ("none of this is promised…"), the rule that a filter hides the pace line when no shown row is under it, and my terminal note placement. If you want any of those, they should go in as a follow-up on top of main's implementation.
  • Checks: bun x tsc --noEmit is clean, and week-pace, week-sprint and tui-next-up pass (36 tests). I did not run scripts/gate.ts or the full suite; the forge runs the full check on the push.
  • Pull state: a person may want to close this pull as already done on main (18f765b43, 2da791da1) rather than merge a no-op.
commented

Closed by the crew: superseded, its change is already on main in 18f765b4.

commented

Left #11758 open: 3 unticked items remain (/next draws one line across the numbered list at reachOf(...) rows, labelled "this week's budget reaches here" with the reason beside it; the cut-line row already in src/web/pages/next.ts may be reused. Server-rendered, no script.; A test: a faster pace moves the line down on the rendered page; an empty queue draws none.; bun scripts/design-lint.ts passes; screenshots at 390 px and 1280 px.).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs