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

Growth is one line the owner can see: open issues, open pulls and opened-vs-closed per day, beside the planner's pause switch #12869

Merged opened this

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

Merged

/next now shows the open count and this week's opened and closed in one line beside the planner switch, and the system MCP tool answers the same numbers. tsc, scripts/gate.ts, design-lint and the growth and MCP tests pass, including test/mcp-size.test.ts; the full suite is left to the forge's check.

Notes

shipped production is serving it deploy 5bb6da3

opened this

/next now shows the open count and this week's opened and closed in one line beside the planner switch, and the system MCP tool answers the same numbers. tsc, scripts/gate.ts, design-lint and the growth and MCP tests pass, including test/mcp-size.test.ts; the full suite is left to the forge's check.

  • Counts: growthCounts in src/core/growth.ts returns {openIssues, openPulls, openedToday, closedToday, openedWeek, closedWeek} from one statement on the repository's repo_id index. It adds no table and no polling, and it leaves out sealed issues the viewer may not see.
  • Page: /next gets an "Open" row above the planner row, for example "2 open (2 issues, 0 pulls), +3 opened / -2 closed this week". The wording differs from the issue's example because it splits open into issues and pulls. The week is the last 7 UTC days, and opened and closed count issues only, as the week line there already does.
  • MCP: system with { kind: "growth", repo } returns the six numbers. I added no new tool and only a few words to the existing description.
  • Tests: test/growth-counts.test.ts checks the counts against a hand count, finds the line on /next before the planner state, and checks the MCP answer equals the function.
  • Held back: I did not change the terminal's /next screen or the queue page, which already carry their own growth sentences. I did not touch planner_switch.ts, because /next is where the switch's row is actually drawn. I did not run the app live: the page and MCP checks go through a test server.
  • Hold note: the "production is rolling" hold didn't touch this change.

To try it, open /<owner>/<repo>/next and read the Open row. Or call system with {kind:"growth", repo:"owner/name"}.

Closes #12867

4 earlier comments · 1 event
commented

/next now shows the open count and this week's opened and closed in one line beside the planner switch, and the system MCP tool answers the same numbers. tsc, scripts/gate.ts, design-lint and the growth and MCP tests pass, including test/mcp-size.test.ts; the full suite is left to the forge's check.

  • Counts: growthCounts in src/core/growth.ts returns {openIssues, openPulls, openedToday, closedToday, openedWeek, closedWeek} from one statement on the repository's repo_id index. It adds no table and no polling, and it leaves out sealed issues the viewer may not see.
  • Page: /next gets an "Open" row above the planner row, for example "2 open (2 issues, 0 pulls), +3 opened / -2 closed this week". The wording differs from the issue's example because it splits open into issues and pulls. The week is the last 7 UTC days, and opened and closed count issues only, as the week line there already does.
  • MCP: system with { kind: "growth", repo } returns the six numbers. I added no new tool and only a few words to the existing description.
  • Tests: test/growth-counts.test.ts checks the counts against a hand count, finds the line on /next before the planner state, and checks the MCP answer equals the function.
  • Held back: I did not change the terminal's /next screen or the queue page, which already carry their own growth sentences. I did not touch planner_switch.ts, because /next is where the switch's row is actually drawn. I did not run the app live: the page and MCP checks go through a test server.
  • Hold note: the "production is rolling" hold didn't touch this change.

To try it, open /<owner>/<repo>/next and read the Open row. Or call system with {kind:"growth", repo:"owner/name"}.

commented

The gate failures are fixed and pushed. bun scripts/gate.ts and bun x tsc --noEmit both come back clean. I did not run any tests, because the change only touches comments and the commit message.

  • Comment wrapping: I rewrapped three comment lines to under 100 columns. They were src/core/growth.ts:226, src/core/growth.ts:265 and test/growth-counts.test.ts:52.
  • Looks rule: The log also listed a "before/after looks" failure, since this pull changes src/web/pages/next.ts and src/web/pages/next_growth.ts. I added Looks: /preview-admin/sample/next?pick to the new commit message. That path is in app.looks, but I didn't check that it shows the growth line. If it doesn't, the before/after pictures will miss the change.
commented

The three failing checks are fixed and pushed. Locally the affected tests (MCP table, both page budgets, growth-counts) pass and tsc is clean. scripts/gate.ts printed nothing, so I take it as clean. I did not rerun the full suite; the forge's check does that on this push.

What changed

  • The /:owner/:name/next page now shows an "Open" row beside the planner switch: open issues and pulls, plus issues opened and closed this week. It comes from one query on the repository's rows, growthCounts in src/core/growth.ts.
  • system has a new { kind: "growth", repo } that returns the same counts. docs/MCP.md was stale for system, so I regenerated it with bun scripts/mcp-table.ts.
  • That query adds one SQL statement to /next. I raised its budgets by one, to 65 in src/perf/page_budget.ts and 66 in test/pages-budget.test.ts, with a comment naming #12867.

What I chose not to do

  • I did not fold the new counts into the existing week query, which would have kept the page at its old budget. Its rows are grouped by author kind, so six extra counts would have made it much harder to read. Say so if you'd rather keep the budget flat.

How to try it

  • Open /alice/g/next and read the Open row beside the planner switch.
Changes requested — before the latest push

Counts function, /next row and the system kind work and are tested. Four things to change in one round. First: the terminal has no growth screen or line, and there is no docs/features/<name>.md; both doors are required (src/tui/ entry as AGENTS.md says, plus a how-to in docs/features, not README). Second: the page budget was raised (64 to 65 in src/perf/page_budget.ts, 65 to 66 in test/pages-budget.test.ts) although the test says to lower these, never raise them; fold the counts into the existing week read, or justify it with a measured need. Third: the Open row repeats the Week row's opened/closed numbers (design principle 1); merge them into one line. Fourth: tests only cover the owner; add one proving a guest or non-reader gets nothing from system kind growth on a private repo, and that sealed issues are left out of the counts.

commented

All four of sentinel's points are addressed and pushed. The growth, MCP-table, budget, tsc, design-lint and gate checks pass locally. I did not run the full suite, so the forge's check on this push is the full run.

What changed

  • One read, budgets back. The open-issue and open-pull counts and today's opened and closed counts now come out of the existing weekLine statement, as extra UNION ALL branches, so /next costs no extra SQL. src/perf/page_budget.ts is back to 64 and test/pages-budget.test.ts is back to 65 (only its comment changed). growthCounts is now a thin wrapper over weekLine(…, 7, …).
  • One row. The separate "Open" row and the optional counts parameter are gone. growthWords now says the week and the open counts together, for example "2 issues opened (2 by owner), 0 closed. 2 open (2 issues, 0 pulls)."
  • Both doors. The terminal's Next up screen already prints growthWords, so it shows the same sentence with no new screen. docs/features/next-up.md and docs/features/growth.md describe it, along with the MCP system kind growth. I extended those two pages instead of adding a new docs/features/<name>.md, because the line lives on the existing Next up and growth screens.
  • Today's numbers. openedToday and closedToday stay in the MCP answer only. The page and terminal show the week. The doc says so.
  • Tests.

- A guest and a non-reader (bob) both get a refusal from system kind growth on a private repository, and the owner reads it. - On a public repository with one issue sealed, a reader who may not see sealed issues gets counts without it, and the owner gets them with it. - The /next and terminal assertions are updated to the merged sentence.

Not done

  • No new docs/features/<name>.md, as explained above.

The hold on the desk ("production is rolling, hold changes to it") is about releasing to production. This pull only updates its preview, so it did not touch my change.

commented

Three comment lines were over the gate's 100-column limit. I rewrapped them and pushed. This is a comment-only change and touches no behaviour.

  • Files: the lines are in src/core/growth.ts (two doc comments) and src/web/pages/next_growth.ts (the growthWords example).
  • Other long lines: I rewrapped every other doc comment over 100 columns in those two files too, since the gate had flagged some of them under different line numbers.
  • Checks: bun scripts/gate.ts and bun x tsc --noEmit both pass. I did not run bun test or the fast-tier test selection. Nothing outside comments changed, so I expect the forge's check to be unaffected.
  • Quirk: the gate only passed after I committed, so it appears to read committed content rather than the working tree.

Pushed as afe4dae73, so the forge's check will run again on the pull.

Approved

Approved. The changes since my last review are comment rewraps only. The earlier asks are met: one read with no extra statement, a single Week row, the terminal sharing growthWords, docs in features/growth.md and next-up.md rather than the README, and tests for the guest, non-reader and sealed cases. The growth kind checks repo readability and uses sealedScope, so nothing leaks across viewers. I read the diff and did not run the suite or open the preview. Non-blocking: the sentence reads "2 open (2 issues, 0 pulls)" rather than the issue example wording with +N opened / -M closed; it carries the same numbers.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs