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

Waiting items on home: one button each (Approve, Re-run, Close) #5783

Parked opened this
Closed without merging

Home's waiting line now lists the items it counts, up to 5, each with one button. Anything beyond 5 shows as "N more on /review". tsc and scripts/design-lint.ts are clean, and the 35 tests in test/home-kpi-row.test.ts pass, including a new one.

Notes

stopped parked by the crew deploy f642b42

opened this

Home's waiting line now lists the items it counts, up to 5, each with one button. Anything beyond 5 shows as "N more on /review". tsc and scripts/design-lint.ts are clean, and the 35 tests in test/home-kpi-row.test.ts pass, including a new one. I did not run the whole suite.

  • Buttons:
    • A pull waiting for a look gets Approve, which is the same merge the landing gate runs.
    • A pull whose check failed, or one stuck after repeated change requests, gets Re-run. This posts to the pull's /checks, the road the stalled-flow cards already use.
    • Any other ask on an issue gets Close.
  • Back to home: Approve and Close post to /review/act, which now accepts next=/ and lands the person back on home. A refusal also returns there, with the flash message. Any other next value is ignored, so nothing redirects off-site. Re-run uses its own next=/.
  • Code: the new module is src/web/studio/waiting_rows.ts. waitingLine in src/web/studio/kpi_row.ts renders its rows with the existing row/listCard components, so there are no new component classes.
  • Test: the new case in test/home-kpi-row.test.ts checks that three waiting pulls give three Approve rows, each posting merge with next=/.
  • Pre-existing failures: five "board's forge strip" tests in test/board.test.ts and test/forge-degraded.test.ts fail on this branch. They fail the same way with my change stashed.

Left out:

  • Collapsing items older than 30 days into "N stale, archive?". That is a separate bullet in #5735.
  • Re-run has no test of its own. The home test fixture only builds plain pull asks, so only the Approve path is covered end to end.
  • A button for asks with no pull or issue (a pause, a proposal). Those still link to /review.

To try it: sign in with something waiting on you and open /. Each row under the waiting line has its button.

Closes #5741

5 earlier comments
commented

Home's waiting line now lists the items it counts, up to 5, each with one button. Anything beyond 5 shows as "N more on /review". tsc and scripts/design-lint.ts are clean, and the 35 tests in test/home-kpi-row.test.ts pass, including a new one. I did not run the whole suite.

  • Buttons:
    • A pull waiting for a look gets Approve, which is the same merge the landing gate runs.
    • A pull whose check failed, or one stuck after repeated change requests, gets Re-run. This posts to the pull's /checks, the road the stalled-flow cards already use.
    • Any other ask on an issue gets Close.
  • Back to home: Approve and Close post to /review/act, which now accepts next=/ and lands the person back on home. A refusal also returns there, with the flash message. Any other next value is ignored, so nothing redirects off-site. Re-run uses its own next=/.
  • Code: the new module is src/web/studio/waiting_rows.ts. waitingLine in src/web/studio/kpi_row.ts renders its rows with the existing row/listCard components, so there are no new component classes.
  • Test: the new case in test/home-kpi-row.test.ts checks that three waiting pulls give three Approve rows, each posting merge with next=/.
  • Pre-existing failures: five "board's forge strip" tests in test/board.test.ts and test/forge-degraded.test.ts fail on this branch. They fail the same way with my change stashed.

Left out:

  • Collapsing items older than 30 days into "N stale, archive?". That is a separate bullet in #5735.
  • Re-run has no test of its own. The home test fixture only builds plain pull asks, so only the Approve path is covered end to end.
  • A button for asks with no pull or issue (a pause, a proposal). Those still link to /review.

To try it: sign in with something waiting on you and open /. Each row under the waiting line has its button.

commented

Home's waiting line now lists up to five of the waiting items, each with the one button that settles it. The type check, bun scripts/design-lint.ts and test/home-kpi-row.test.ts (35 tests) pass; I did not run the full suite. I didn't boot the app or click the buttons. The work was already committed and pushed on this branch (fd1539b6), so I verified it and added nothing new.

  • Approve: on a pull waiting for a look. It posts to /review/act with verb=merge, which is the existing merge gate.
  • Re-run: on a pull whose check stopped or was handed over. It posts to the pull's existing /checks route.
  • Close: on an issue. It posts to /review/act with verb=close.
  • Landing back on home: each form sends next=/. /review/act now sends the person back to home when it sees that, for both success and refusal. /checks already did.
  • Shape: the rows live in a new src/web/studio/waiting_rows.ts, and waitingLine in kpi_row.ts renders them with a "N more on /review" link past five.
  • Test: one new test in test/home-kpi-row.test.ts checks that three waiting pulls each get an Approve button posting to /review/act with next=/.

Left out: asks with no pull or issue, such as pauses and proposals, get no button and link to /review. There is no test for Re-run or Close, nor for the next=/ landing in /review/act.

Issue #5741 sits behind the "Later" gate because triage found no pillar. That doesn't change this change, and the gate is a person's call.

To try it, sign in with something waiting on you and open /. Each listed item has its button, and acting returns you to /.

commented

I merged main into this branch and pushed. The type check is clean, and test/home-kpi-row.test.ts passes (38 tests). I did not run the full bun test; the forge's check runs it on the push.

The only conflict was in src/web/studio/kpi_row.ts, in the waiting block. main now caches the waiting count and oldest age per user (cachedWaiting). This branch renders the waiting items as rows with one button each (Approve, Re-run or Close). The merged block uses the cached count and oldest age for the headline line and the "N more on /review" link. The rows still come from orderedAsks, uncached, so the buttons always reflect the current items.

commented

I merged main into the branch and pushed it. The one conflict was in src/web/studio/review_act.ts, and it is resolved.

  • The conflict: both sides changed the final redirect(...) in the review action. This branch sends a next=/ form back to / through landing(). main added forgeUrl: ctx.app.config.url to the same call. The merged call uses landing(form, next) and also passes forgeUrl.
  • Tests: I ran bun test review kpi (188 tests, 187 pass). The one failure is test/review-wait.test.ts, "before the review it is the crew's", which expects the home page not to contain id="needs-you". I ran that file on a clean checkout of origin/main and it fails there too, so this merge didn't cause it.
  • Not run to completion: I started bun x tsc --noEmit and a full bun test in the background, but they hadn't finished when I pushed. The forge's check will run the whole thing on this push.
commented

I merged main into the branch and pushed. The only conflict was in src/web/studio/kpi_row.ts.

main changed waitingLine to use the shared review set, which adds the stale-archive fold. This pull changed the same function to add the waiting-item rows. The merged version keeps both:

  • Count line: the "N waiting" line and the capped row list ("N more on /review") appear when there are live asks.
  • Stale fold: the "stale, archive?" fold still appears after them. It also appears when there are no live asks, as it does on main.
  • Removed import: I dropped the waitingOn import because nothing uses it any more.

bun x tsc --noEmit is clean. I ran the 94 tests in the 13 test files covering home/KPI, waiting asks, review, and stale; all pass. I did not run the full bun test, because it timed out in the sandbox. The forge's check runs the whole suite on this push.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs