Repository navigation
✨ PRs by model: list one model's pull requests - #18785
Conversation
GET /api/governor/pr-models takes an optional model= (canonicalised with modelfamily.Canonical) and then adds prs[]: every PR in the window in that model's bucket, with the most_reworked fields plus outcome, agent, created_at, merged_at and first_pass, sorted by review rounds + fix attempts then newest, capped at 200 with prs_truncated. Without model the response is unchanged. Each PRs-by-model row gets a "PRs" disclosure that fetches the list on demand, cached per window and model. Refs hivecommons#18722 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
pr_models_header_once.test.js lifts renderGovernorPRModelsTile out of index.html; the row now calls the PR-list toggle and list helpers, so lift them (and stub the open-row state and loader) alongside it. Refs hivecommons#18722 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t
|
@Danathar this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (3 waiting): fixes are handed out before new work as soon as you have capacity. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. stage 080-awaiting-merge-admission → 072-returned-to-contributor: conflicting Evidence bundle `#18785ed036fe` sha256:ff7e215bd9eea07aab7ae896b422f960c608b58f5cdaf49a2dd97191ac0a35f1 — download from the dashboard or `hivectl review evidence #18785`. |
Both sides added to the same UI test lists; keep both. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
The Governor PRs by model card shows totals per model, but the only PRs it lists are the ten most reworked across all models. This PR lets you open one model's own PRs.
/api/governor/pr-modelsgets an optionalmodel=parameter, and each model row gets a ▸ PRs button that opens the list. Withoutmodel=, the response is unchanged.Refs #18722
Part of #18723
What this changes
GET /api/governor/pr-models?window=…&model=<id>returns the usual body plusprs[]. That is every PR in the window whose bucket is that model.most_reworkedfields plusoutcome,agent,created_at,merged_atandfirst_pass. No PR bodies are returned.prs_truncated: truewhen there are more.prs: [], not an error. A missing or blankmodel=returns the same response as today.Why
To see why a model's numbers look the way they do, you need its PRs: which ones, merged or closed, and how much rework each one needed. Before this PR, nothing on the dashboard or in the API listed them per model.
How it works
The handler canonicalises
model=withmodelfamily.Canonical, soanthropic/claude-opus-5-5andclaude-opus-5.5give the same list. It then makes a second pass over the same PR snapshot, with the same window and attribution filters as the aggregate. So the list length equals the bucket'sprscount, and the outcome counts equalmerged,closed_unmergedandopen. The aggregate function,most_reworkedand its cap are untouched. The new code sits in a new file, so the sibling PRs-by-model issues rebase cleanly.Example:
?window=30d&model=gpt-6.1-terralists that model's PRs, worst rework first, each with its outcome and a GitHub link.Files
src/pkg/dashboard/api_governor_pr_models_list.go(new):governorPRModelsQueryModel,governorPRModelPRList,withGovernorPRModelPRsand the response/item types.src/pkg/dashboard/api_governor_pr_models.go:handleGovernorPRModelsuses the wrapped response whenmodel=is set (4 lines).src/pkg/dashboard/static-src/js/governor-view.js+static/index.html(regenerated):toggleGovernorPRModelPRs,loadGovernorPRModelPRs,governorPRModelPRsToggleHtml,governorPRModelPRListHtml.src/pkg/dashboard/static-src/css/governor.css: styles for the button and the list.src/docs/api-reference/agents-and-controls.md,src/docs/dashboard.md: the parameter and the button.changelog.d/added-18722-governor-pr-models-list-prs.md.Tests
api_governor_pr_models_list_test.go:TestHandleGovernorPRModelsModelFilterListsPRsuses two models, mixed outcomes and raw spellings. It checks that the canonical and raw queries return the same list, membership, the window, the sort and the outcome-count invariant. It also checks that an unknown model gives[], that a missing or blankmodelleaves the response unchanged, and that the shared fields are identical with the filter.TestGovernorPRModelPRListCapsAt200builds 201 PRs and checks the cap, the sort andprs_truncated.dashboard/test/governor-pr-models-ui.test.js: opening a row requestsmodel=…, renders the list with GitHub links and escaped titles, and reuses the cache.governor_pr_models_ui_test.go: adds the handler name and markers.gofmt -lwas run locally, as AGENTS.md requires.🤖 Generated with Claude Code
https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t