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

A milestone page leads with its open work, and done issues fold behind a count #14817

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

A milestone page now opens with only its open work: limbs, building, blocked and open issues. Done issues are no longer rendered on the first view; they become one link, "N done", and load 50 at a time on request. The count line ("1,548 of 1,554 done") and the progress bar are unchanged.

Notes

shipped production is serving it deploy 4b0992f

opened this

A milestone page now opens with only its open work: limbs, building, blocked and open issues. Done issues are no longer rendered on the first view; they become one link, "N done", and load 50 at a time on request. The count line ("1,548 of 1,554 done") and the progress bar are unchanged.

Tests:

  • New: test/milestone-done-fold.test.ts. It seeds a milestone with 1,500 done and 6 open issues. The first view is under 100 KB, lists all six open issues and no done ones, and keeps the count line. ?done=1 and ?done=2 each hold 50 rows and don't overlap. A page number past the end gives the last page. Bad values for done give the plain first view.
  • First-view budget: test/attention.test.ts. It now covers a milestone page, with a budget of 85 words, 20 blocks and 2 colours at both widths in docs/design/attention-budget.json. The milestone is made after the other pages are fetched, so their budgets don't move.
  • Changed: test/milestones.test.ts. It used to expect closed titles and a "done" badge in the first view. Under the new behaviour those only appear on ?done=1, so those checks moved there.
  • What ran: type check, gate and design lint are clean, and 110 of 111 tests in the milestone, limb and budget files pass. scripts/fast.ts named 2,236 files, too broad to run, so I picked those files myself.
  • One failure, also on main: test/page-budget.test.ts fails because /maintenance runs 86 SQL statements against a budget of 83. It fails the same way without this change.

How it works:

  • The change is in src/web/pages/milestones.ts. doneFold draws the link or the page of done rows. donePageOf reads ?done=, accepting only a whole number from 1 to 999,999; anything else gives the first view.
  • Paging uses the shared pager with Previous and Next. The links carry #ms-done so the browser lands on the list.
  • DONE_PAGE sets 50 rows per page.

Not done: the server still reads the whole plan and slices it, so the HTML shrinks but the database work does not. Done limbs (sub-milestones) are not folded; on P0 Trust the bulk of the 1,554 rows were issues. I couldn't measure P0 Trust on production from the sandbox: the page came back as 1.4 KB, probably a redirect. So the under-100 KB check rests on the 1,500-issue test, not the live page.

I skipped the keep_plan and estimate steps: neither tool was available in this run.

[
  {"go": "/trevato/forge/milestones/586", "look": "the Issues section", "expect": "only open issues, then a link reading \"N done\"; no done rows; the count line above unchanged"},
  {"go": "/trevato/forge/milestones/586?done=1", "look": "the done list", "expect": "50 done issues, \"page 1 of N\", Hide done, and a Next button"},
  {"go": "/trevato/forge/milestones/586?done=2", "look": "the pager", "expect": "the next 50, with Previous and Next", "ask": "Is 50 a page the right size?"}
]

🤖 Generated with Claude Code

Closes #14795

5 earlier comments · 1 event
commented

A milestone page now opens with only its open work: limbs, building, blocked and open issues. Done issues are no longer rendered on the first view; they become one link, "N done", and load 50 at a time on request. The count line ("1,548 of 1,554 done") and the progress bar are unchanged.

Tests:

  • New: test/milestone-done-fold.test.ts. It seeds a milestone with 1,500 done and 6 open issues. The first view is under 100 KB, lists all six open issues and no done ones, and keeps the count line. ?done=1 and ?done=2 each hold 50 rows and don't overlap. A page number past the end gives the last page. Bad values for done give the plain first view.
  • First-view budget: test/attention.test.ts. It now covers a milestone page, with a budget of 85 words, 20 blocks and 2 colours at both widths in docs/design/attention-budget.json. The milestone is made after the other pages are fetched, so their budgets don't move.
  • Changed: test/milestones.test.ts. It used to expect closed titles and a "done" badge in the first view. Under the new behaviour those only appear on ?done=1, so those checks moved there.
  • What ran: type check, gate and design lint are clean, and 110 of 111 tests in the milestone, limb and budget files pass. scripts/fast.ts named 2,236 files, too broad to run, so I picked those files myself.
  • One failure, also on main: test/page-budget.test.ts fails because /maintenance runs 86 SQL statements against a budget of 83. It fails the same way without this change.

How it works:

  • The change is in src/web/pages/milestones.ts. doneFold draws the link or the page of done rows. donePageOf reads ?done=, accepting only a whole number from 1 to 999,999; anything else gives the first view.
  • Paging uses the shared pager with Previous and Next. The links carry #ms-done so the browser lands on the list.
  • DONE_PAGE sets 50 rows per page.

Not done: the server still reads the whole plan and slices it, so the HTML shrinks but the database work does not. Done limbs (sub-milestones) are not folded; on P0 Trust the bulk of the 1,554 rows were issues. I couldn't measure P0 Trust on production from the sandbox: the page came back as 1.4 KB, probably a redirect. So the under-100 KB check rests on the 1,500-issue test, not the live page.

I skipped the keep_plan and estimate steps: neither tool was available in this run.

[
  {"go": "/trevato/forge/milestones/586", "look": "the Issues section", "expect": "only open issues, then a link reading \"N done\"; no done rows; the count line above unchanged"},
  {"go": "/trevato/forge/milestones/586?done=1", "look": "the done list", "expect": "50 done issues, \"page 1 of N\", Hide done, and a Next button"},
  {"go": "/trevato/forge/milestones/586?done=2", "look": "the pager", "expect": "the next 50, with Previous and Next", "ask": "Is 50 a page the right size?"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages d2f460ff5fb6 --> Look pages for d2f460f, from the gate:

  • look pages (inferred): this pull changes src/web/pages/milestones.ts; the forge pictures / (src/web/pages/milestones.ts), /docs (src/web/pages/milestones.ts), /explore (src/web/pages/milestones.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

A milestone page now shows its open work first. On a milestone page, the first view lists limbs and building, blocked and open issues. Closed issues fold behind a "N done" link to ?done=1. Each done page holds 50 rows (DONE_PAGE) with Previous and Next links. A page number past the end shows the last page instead of an empty one, and anything else in ?done= (empty, 0, 01, 1.5, <script> and so on) shows the first view. The "X of Y done" count line stays as it was.

What to look at:

  • src/web/pages/milestones.ts holds the fold, the paging and donePageOf, which checks the ?done= value.
  • docs/design/attention-budget.json now covers a milestone page's first view.
  • test/milestone-done-fold.test.ts builds a milestone with 1,500 done issues. It checks that the first view has no done rows and stays under 100 KB, that done pages don't overlap, that the links go both ways, and how a page past the end and bad ?done= values are handled. test/milestones.test.ts and test/attention.test.ts are updated to match.

Left out:

  • Terminal: it gets no change. Its milestone screen doesn't list done issues, so the fold has nothing to show there; a "No door" line in the commit says so.
  • Gate notes (none block): one comment line in milestones.ts is over 100 columns and the nightly rewrap fixes it on main. The gate also notes that the test's get helper looks like one in test/asks-counts.test.ts; I left both as they are. The Looks: line in the last commit isn't one of the pages listed in forge.json, so the gate ignores it and picks the pages to picture itself.

The gate, bun x tsc --noEmit and the three test files above pass locally (14 tests). An earlier check failed because the new test faked the user with as never when creating the repo; it now passes the real user from createUser.

How to try it: open /trevato/forge/milestones/586. Only open, building and blocked issues show. Follow "N done" and page through with Next.

[{"go":"/trevato/forge/milestones/586","look":"the issue list under the count line","expect":"only open, building and blocked issues, then a link reading \"N done\""},{"go":"/trevato/forge/milestones/586?done=1","look":"the done section","expect":"at most 50 closed issues, \"page 1 of N\", a Next link and no Previous link"},{"go":"/trevato/forge/milestones/586?done=abc","look":"the issue list","expect":"the first view: no closed issues listed"}]

🤖 Generated with Claude Code

commented

<!-- look-pages 896c70f1b63f --> Look pages for 896c70f, from the gate:

  • look pages (inferred): "Looks: /trevato/forge/milestones/586" is not a page of app.looks in forge.json; this pull changes src/web/pages/milestones.ts; the forge pictures / (src/web/pages/milestones.ts), /docs (src/web/pages/milestones.ts), /explore (src/web/pages/milestones.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

A milestone page now shows its open work first. On a milestone page, the first view lists limbs and building, blocked and open issues. Closed issues fold behind a "N done" link to ?done=1. Each done page holds 50 rows (DONE_PAGE) with Previous and Next links. A page number past the end shows the last page instead of an empty one, and anything else in ?done= (empty, 0, 01, 1.5, <script> and so on) shows the first view. The "X of Y done" count line stays as it was.

What to look at:

  • src/web/pages/milestones.ts holds the fold, the paging and donePageOf, which checks the ?done= value.
  • docs/design/attention-budget.json now covers a milestone page's first view.
  • test/milestone-done-fold.test.ts builds a milestone with 1,500 done issues. It checks that the first view has no done rows and stays under 100 KB, that done pages don't overlap, that the links go both ways, and how a page past the end and bad ?done= values are handled. It passes the real user from createUser to createRepo instead of an as never cast. test/milestones.test.ts and test/attention.test.ts are updated to match.

Left out:

  • Screenshots: the pull pictures no page, and a No look: line in a commit says why. Only milestone pages change, and app.looks in forge.json lists none; the preview sample has no milestones either. The 28 pages the gate inferred only reach milestones.ts through the route table and look the same. The earlier Looks: /trevato/forge/milestones/586 line didn't work because the gate only accepts pages listed in app.looks.
  • Terminal: it gets no change. Its milestone screen doesn't list done issues, so the fold has nothing to show there; a "No door" line in a commit says so.

The gate passes locally with no look note. The type check and the three test files above (14 tests) also pass; the last commit is empty, so they were not re-run after it.

How to try it: open /trevato/forge/milestones/586. Only open, building and blocked issues show. Follow "N done" and page through with Next.

[{"go":"/trevato/forge/milestones/586","look":"the issue list under the count line","expect":"only open, building and blocked issues, then a link reading \"N done\""},{"go":"/trevato/forge/milestones/586?done=1","look":"the done section","expect":"at most 50 closed issues, \"page 1 of N\", a Next link and no Previous link"},{"go":"/trevato/forge/milestones/586?done=abc","look":"the issue list","expect":"the first view: no closed issues listed"}]

🤖 Generated with Claude Code

Changes requested — before the latest push

Changes needed in one round:

  1. Both doors / docs: the feature changed but docs/features/front-milestones.md (the milestone how-to) is not updated. Say there that done issues fold behind "N done" and page by ?done=N. The terminal note ("its milestone screen lists no done issues") should be verified against src/tui/ and stated in that doc.
  2. Principle 1 (nothing explains itself twice) in doneFold (src/web/pages/milestones.ts): the page already says "X of Y done" in the count line; the fold link repeats "N done", and the open state repeats it again plus "page a of b · Hide done" on one muted line. Keep one phrase: make the link "Show done issues (N)" and, when open, only "page a of b" with the Hide link, so the count line owns the number.
  3. Principle 6 (few borders): the pager draws two outlined buttons for a list of plain rows. Use plain Previous/Next links beside the page note, not boxed buttons.
  4. Performance: the server still loads and renders the whole plan (every done leafRow is built before slicing in milestoneBody: closed.map(leafRow) is evaluated for all rows). Build rows only for the requested slice, otherwise the 1,500-row case costs the same as before for the common request.
  5. Preview: I could not see it work. /trevato/forge/milestones/586 answers 404 on this preview, so the review block steps point at nothing. Give review steps that exist on the preview (or seed one), and the first-view budget was not checked live.
  6. Clean: the gate notes a comment line over 100 columns and a duplicated get helper in the new test; fix both rather than leaving them. Direction: this is feature work while PIPELINE FIRST items (#6534, #6611, #5276, …) are open; fine for a scoped issue, but a 1,500-row seed in a test should stay fast, so confirm test time stays well under the per-file budget (#1242).
commented

A milestone page now shows its open work first, and its done issues fold behind one link. The first view lists limbs and building, blocked and open issues, and the "X of Y done" count line keeps the number. Done issues sit behind Show done issues (N). Opening it goes to ?done=1, 50 rows a page. Above the rows, one muted line has "page a of b" with Hide done, Previous and Next as plain links, not boxed buttons. Only the rows of the page asked for are built (doneFold gets the done issues and a row builder), so a milestone with 1,500 done issues costs about as much as its open work.

This round, following review:

  • Wording and pager: the link and the open fold now use one phrase, and the boxed pager is replaced by plain links.
  • Rendering cost: rows are built only for the requested page. A new test counts the row-builder calls: none for the first view, 50 for a done page.
  • Docs: docs/features/front-milestones.md now has a section on the fold and on ?done=N. It also states what the terminal shows, which I checked: the Milestones screen (src/tui/screens/limbs.ts) lists each limb with its done/total done count and no per-issue rows, so there is no done list to fold.
  • Test helper: the test signs in through the shared signInCookie and reads the page through its own milestone(query) helper, so the gate's duplicate-helper note is gone.
  • Word budget: the longer link text adds two words, so the milestone word budget in docs/design/attention-budget.json goes from 85 to 87.
  • Preview: the review steps now use /preview-admin/sample/milestones/1, which exists on the preview. Checked live, it is 18 KB and still showed the old "2 done" link text, because the preview ran the commit before this push.

Where I disagree: the two comment lines over 100 columns stay as they are. I didn't write them, and the gate rejects a pull that rewraps someone else's comments ("the diff is the change"); the nightly rewrap on main fixes them.

Not done: paging can't be seen on the preview, because its sample milestone has only 2 done issues, one page. The 1,500-row test covers paging and takes about 2 s on its own.

The gate, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. test/milestone-done-fold.test.ts, test/milestones.test.ts and test/attention.test.ts pass: 15 tests.

[{"go":"/preview-admin/sample/milestones/1","look":"the Issues list under the count line \"2 of 3 done\"","expect":"the one open issue, then a single link \"Show done issues (2)\"; no done rows"},{"go":"/preview-admin/sample/milestones/1?done=1","look":"the done section","expect":"the 2 closed issues under a muted line holding only a plain \"Hide done\" link; no page note and no boxed buttons"},{"go":"/preview-admin/sample/milestones/1?done=abc","look":"the Issues list","expect":"the first view again: no done rows, the \"Show done issues (2)\" link"}]

🤖 Generated with Claude Code

Approved

Reviewed for security and design. The fold is server-rendered, ?done= is validated by a strict regex and clamped, output goes through html, links are plain <a> and the page works without JavaScript. Rows are built only for the requested page, and the tests cover that. The how-to is in docs/features/front-milestones.md, not the README. The preview shows the first view with "Show done issues (2)" and the ?done=1 view with "Hide done". Not blocking: the server still reads the whole plan and slices it, so the database work is unchanged; and the terminal has no done list to fold, which the doc states.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs