Skip to content

Learning: the pull request scorecard, lessons with their evidence, and what reviewers ask for - #406

Merged
nambok merged 2 commits into
mainfrom
learning-scorecard
Nov 13, 2026
Merged

nambok merged 2 commits into
mainfrom
learning-scorecard

Conversation

@nambok

@nambok nambok commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Learning page gets three sections for the platform's new learning loop: a scorecard of what became of the pull requests Coderhelm opened, the lessons it took from them with their evidence, and what each reviewer keeps asking for. Each section loads by itself and shows nothing on a gateway that does not have its route yet, so this can ship before or after the platform change (CoderHelm/coderhelm-platform#652).

Changes

  • Pull request scorecard (/api/learning/scorecard): opened, merged with the merge rate, closed without merging, reverted, needed a person's commit, finished with open items, review rounds to approval, and open to merge, for the team and per repository. Period: this month, 3 months, 12 months or all time. It follows the page's repository filter. A rate with nothing behind it reads "No data yet", never zero; the median is given as the span it falls in; the page says when counting began.
  • Lessons from pull requests (/api/learning/lessons): each lesson with how it is checked, the pull requests it was seen on, its evidence (people's words and their changed lines) and where it stands: in use, in the guide file, contradicted, faded or turned off. The repository's guide pull request is linked with its state.
  • Guide pull request switch (/api/settings/guide-prs), in the lessons section: "Open guide pull requests" for the team, on unless turned off, and, with a repository picked in the page's filter, that repository's own choice (follow the team, on, off). Saved at once. Admins only; a member sees how it is set.
  • What reviewers ask for (/api/learning/reviewers): per reviewer, each ask, its kind, the pull requests it was seen on and whether it is in use. An admin can forget one ask or everything kept about a reviewer (/api/learning/reviewers/forget), after a confirmation. A member sees the list without the buttons; a refusal is said in words.
  • src/lib/api.ts: the four calls and their types. src/lib/routes.ts: the page's description.
  • Tests: fixtures for the three routes in e2e/wide-data/learning.ts (also answered for the cross-page specs) and 13 new cases in e2e/learning.spec.ts.

Verification

Run locally on this branch, on main 6a68de0:

  • npm run lint: UI lint passed, no hardcoded hosted addresses.
  • npm run typecheck: clean.
  • npm run check:openapi: matches the pinned platform commit (the new routes are not part of the public API document).
  • npm run build with the CI environment: passes, /learning is prerendered.
  • Playwright against the static build, as CI serves it: learning.spec.ts, no-sideways-scroll, readable-text, no-mid-word-breaks, tabs-no-scroll, audit-shell, capabilities: 385 passed, 0 failed, with both commits.
  • The 8 new cases: the scorecard's numbers, periods and repository filter; lessons with their check, evidence and guide pull request; an admin forgetting one ask, then a reviewer; a member without the buttons; a refused forget; the empty states; a gateway without the routes (no sections) and one that fails (each section says so, the rest of the page loads); a phone at 375 wide with no sideways scroll.
  • I looked at the phone screenshots of the scorecard and the lessons sections.

Not verified live: every API call in these tests is answered by fixtures. The full e2e suite was not run locally beyond the specs above; CI runs it.

…d what reviewers ask for

Three sections on the Learning page, each loading by itself from the
gateway's new routes and showing nothing on a gateway that does not have
them yet.

Pull request scorecard: of the pull requests Coderhelm opened, how many
merged, closed without merging or were reverted, how many needed a
person's commit, how many finished with open items, the review rounds to
approval and the time from open to merge, for the team and per repository,
over this month, 3 months, 12 months or all time. It follows the page's
repository filter. A rate with nothing behind it reads "No data yet", never
zero, and the page says when counting began.

Lessons from pull requests: each lesson the coding agent took from people's
edits, closing comments and revert reasons, with how it is checked, the
pull requests it was seen on, its evidence, and where it stands (in use, in
the guide file, contradicted, faded, turned off). The repository's guide
pull request is linked with its state.

What reviewers ask for: per reviewer, each ask, its kind, the pull requests
it was seen on and whether it is in use. An admin can forget one ask or
everything kept about a reviewer; a member sees the list without the
buttons, and a refusal is said in words.
…sitory

In the lessons section: "Open guide pull requests", a switch for the team
that is on unless turned off, and, with a repository picked in the page's
filter, that repository's own choice (follow the team, on, off). Each
change is saved at once. Without a repository picked, the ones set apart
are named. Everyone sees how it is set; only an admin can change it, and a
refused save is said in words with the switch left as it was. A gateway
without the setting shows no switch.
@nambok
nambok merged commit e096192 into main Nov 13, 2026
10 checks passed
@nambok
nambok deleted the learning-scorecard branch November 13, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant