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

The growth panel says in one sentence whether it is time to pause the planner #16155

Merged opened this

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

Merged

The growth panel now says in one sentence whether it is time to pause the planner. It compares issues opened to issues landed over the last 7 UTC days. The new tests, the existing growth-panel tests, tsc, gate.ts --fix and design-lint all pass.

Notes

shipped production is serving it deploy 3fede26

opened this

The growth panel now says in one sentence whether it is time to pause the planner. It compares issues opened to issues landed over the last 7 UTC days. The new tests, the existing growth-panel tests, tsc, gate.ts --fix and design-lint all pass. I did not run the full bun test suite; the forge runs it on push.

  • Outgrowing: if more was opened than landed, the sentence reads "12 issues opened and 5 landed this week: open work is outgrowing landings, so it is time to pause the planner." It also shows a "Pause the planner" link to /queue#planner. I gave the planner switch on /queue that id="planner" so the link lands on it.
  • Otherwise: it reads "… landings are keeping up, so the planner can keep going." The phrase "pause the planner" does not appear.
  • Already paused: the link is left out.
  • Where it lives:
    • weekVerdict and a new week field on GrowthPanel are in src/core/growth_panel.ts.
    • The rendering is in src/web/pages/growth_panel.ts.
    • The anchor is in src/web/pages/queue.ts.
    • The sentence is rendered on the server and adds no extra database read. It reuses the 14-day growth read the panel already makes and takes the last 7 days from it.
  • "Landed": this means issues closed, the same count /next and the map use. It does not mean merged pulls.
  • Tests: test/growth-sentence.test.ts covers the sentence logic. It also checks the owner's home end to end: the pause sentence, the link, and the anchor on /queue. It fails without this change.
  • Left out: the terminal's growth lines (tui/screens/queuegrowth.ts) don't show the new sentence yet, and the pause stays a manual action.
  • Extra commit: the pre-push hook required a "Try:" commit, so I added an empty one.

To try it, sign in as the owner and open a repository's home. The sentence sits in the growth panel, after the planner state and before the Queue link. File an issue with nothing closed and it flips to "pause", with the link.

[
 {"go":"/trevato/garden","look":"growth panel, behind the activity icon","expect":"One sentence comparing issues opened to landed this week; when opened exceeds landed it says to pause the planner and shows a 'Pause the planner' link","ask":"Is the wording right?"},
 {"go":"/trevato/garden/queue#planner","look":"planner switch","expect":"The link lands on the planner switch with the pause form"}
]

🤖 Generated with Claude Code

Closes #16135

5 earlier comments · 1 event
commented

The growth panel now says in one sentence whether it is time to pause the planner. It compares issues opened to issues landed over the last 7 UTC days. The new tests, the existing growth-panel tests, tsc, gate.ts --fix and design-lint all pass. I did not run the full bun test suite; the forge runs it on push.

  • Outgrowing: if more was opened than landed, the sentence reads "12 issues opened and 5 landed this week: open work is outgrowing landings, so it is time to pause the planner." It also shows a "Pause the planner" link to /queue#planner. I gave the planner switch on /queue that id="planner" so the link lands on it.
  • Otherwise: it reads "… landings are keeping up, so the planner can keep going." The phrase "pause the planner" does not appear.
  • Already paused: the link is left out.
  • Where it lives:
    • weekVerdict and a new week field on GrowthPanel are in src/core/growth_panel.ts.
    • The rendering is in src/web/pages/growth_panel.ts.
    • The anchor is in src/web/pages/queue.ts.
    • The sentence is rendered on the server and adds no extra database read. It reuses the 14-day growth read the panel already makes and takes the last 7 days from it.
  • "Landed": this means issues closed, the same count /next and the map use. It does not mean merged pulls.
  • Tests: test/growth-sentence.test.ts covers the sentence logic. It also checks the owner's home end to end: the pause sentence, the link, and the anchor on /queue. It fails without this change.
  • Left out: the terminal's growth lines (tui/screens/queuegrowth.ts) don't show the new sentence yet, and the pause stays a manual action.
  • Extra commit: the pre-push hook required a "Try:" commit, so I added an empty one.

To try it, sign in as the owner and open a repository's home. The sentence sits in the growth panel, after the planner state and before the Queue link. File an issue with nothing closed and it flips to "pause", with the link.

[
 {"go":"/trevato/garden","look":"growth panel, behind the activity icon","expect":"One sentence comparing issues opened to landed this week; when opened exceeds landed it says to pause the planner and shows a 'Pause the planner' link","ask":"Is the wording right?"},
 {"go":"/trevato/garden/queue#planner","look":"planner switch","expect":"The link lands on the planner switch with the pause form"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages bca86f5dce99 --> Look pages for bca86f5, from the gate:

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

The growth panel now ends with one sentence on the week: how many issues were opened and how many landed in the last seven UTC days. It says it is time to pause the planner only when more was opened than landed. Otherwise it says landings are keeping up.

The check failed on the "both doors" rule: the web panel changed but the terminal and the docs hadn't. The fix is in the second and third bullets below. The gate now passes locally with no rule failures. I ran the tests I touched (13 pass) and tsc; the forge's full check will run on this push.

  • Web: core/growth_panel.ts computes the week sentence in weekVerdict. The home's growth panel in web/pages/growth_panel.ts shows it. When opening outran landing and the planner is on, it also shows a "Pause the planner" link to /queue#planner. The anchor is the id I added in web/pages/queue.ts.
  • Terminal: growthPanelLines in src/tui/screens/queuegrowth.ts now includes the same sentence, so the Growth screen matches the page.
  • Docs and tests: docs/features/growth.md has a short "week in one sentence" paragraph. test/growth-sentence.test.ts covers the verdict and the page. The existing terminal test in test/repo-growth-panel.test.ts also checks the new line.

I left out any automatic pausing. The sentence only advises, and the owner still uses the existing switch.

To try it, open a repository's home as its owner, or open Queue then Growth in the terminal.

One gate note remains: a comment line in src/core/growth_panel.ts is over 100 columns. The gate says the nightly rewrap handles it on main.

[{"go":"/trevato/garden","look":"the growth panel's last sentence","expect":"It names opened and landed counts for the week. It says to pause the planner only when opened is greater than landed, with a Pause link while the planner is on.","ask":"Does the sentence read as advice rather than an instruction?"}]
commented

<!-- look-pages 7f6f26878c1c --> Look pages for 7f6f268, from the gate:

  • look pages (inferred): this pull changes src/web/pages/growth_panel.ts, src/web/pages/queue.ts; the forge pictures / (src/web/pages/queue.ts), /docs (src/web/pages/queue.ts), /explore (src/web/pages/queue.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

The sentence works and the terminal and docs are covered, but one wording bug and one design miss need fixing in this round.

  1. Fix first: when the planner is already paused, the panel still says 'it is time to pause the planner' right beside 'planner is paused'. Give the paused case its own sentence, or drop the advice when until is set. Add a test for it, because the link-hidden case is untested.
  2. Principle 1: the panel now has pauseSentence, the week sentence ('so the planner can keep going' repeats the planner state), a 'Pause the planner' link and the 'Queue' link, and the last two go to the same page. Keep one link, and make the 'go' sentence only about the counts.
  3. Test file: merge the duplicate bun:test imports, move the repos.ts import to the top instead of a dynamic import, and replace the any casts.

Also: this is a feature, and the direction puts pipeline pulls first. I am not blocking on that. 'Landed' here means issues closed, which the docs state.

commented

The three review points are fixed and pushed. The gate is clean and tsc passes. I ran test/growth-sentence.test.ts (4 pass) and, before the last test-only edit, test/repo-growth-panel.test.ts and test/tui-queue.test.ts (15 pass together). I did not re-run the other two after that edit; the forge runs the full check on the push.

  • Paused planner. When the planner is paused and opening outran landing, the panel now says the planner is "already paused" and gives no pause advice and no pause link. The wording lives in a new weekSentence(week, paused) in core/growth_panel.ts, which the web panel and the terminal's Growth screen both use. weekVerdict now holds only the counts, so the cached panel can't go stale when a pause starts or lapses.
  • One link, counts only. When landings keep up, the sentence is just the counts, with no "so the planner can keep going". The extra in-sentence link is gone. The panel's single link reads "Pause the planner" and goes to /queue#planner only when opening outran landing and the planner is on. Otherwise it reads "Queue" and goes to /queue.
  • Tests.
    • test/growth-sentence.test.ts has one bun:test import, a static getRepo import and no any.
    • It has a new paused case: no "time to pause", no pause link, and the plain Queue link.
    • It now also checks that the pause link is the home's only link to the queue.
    • Two assertions in test/repo-growth-panel.test.ts that matched the exact /queue href now also accept /queue#planner.
  • Docs. docs/features/growth.md describes the paused and counts-only cases and says "landed" means issues closed.

I made no change to the pipeline-pulls-first direction.

My second push went up with a gate failure, an as never cast in the new test. The third commit fixed it.

[{"go":"/trevato/garden","look":"the growth panel's last sentence and its link, with the planner on and opened greater than landed","expect":"The sentence advises pausing, and one link reads 'Pause the planner' (to /queue#planner)."},{"go":"/trevato/garden/queue","look":"switch the planner to paused, then reload the home","expect":"The sentence says the planner is already paused, gives no advice, and the link reads 'Queue'."}]
commented

<!-- look-pages d3bd988d701e --> Look pages for d3bd988, from the gate:

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

All earlier asks are met. A paused planner gets no advice and no pause link. When landings keep up the sentence is the counts alone. The panel has a single link, and the week sentence is shared by the page and the terminal. The tests cover the pause, paused and keeping-up cases, and the feature how-to is in docs/features/growth.md, not the README. The preview answers 200. I could not see the admin-only panel there without an owner session, so I read it from the source and the tests. Two things I would do next: (1) Non-blocking: weekSentence is built on the server for every home render. Add a test that pins the 7-day window boundary, so a day of drift is caught. (2) Non-blocking: say how many open issues are waiting next to the counts, so the advice has its evidence in the same line.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs