feat(workflows): pick a lane in the pipeline pass-rate panel

The panel aggregated every lane at once, which answers "does this stage get
proved across the project" but never "does THIS lane prove it". A lane picker
now narrows the same aggregation through ?lane=<id> on
GET /api/lanes/pipeline-stats, counting that lane plus its own archived
features — dropping the features would hide most of a lane's history the moment
it starts its next one.

The response carries a `lanes` array that the filter never narrows: it
populates the picker, so it has to keep offering every other lane even while
the counts show one. For the same reason the picker renders above the empty
branch rather than inside the populated one — narrowing to a lane that has
recorded nothing would otherwise be a one-way trip, with no control left to
select anything else. A lane filter that is not a positive integer is rejected
with 400 EBADLANE rather than silently aggregating everything.
This commit is contained in:
2026-08-26 11:19:39 +07:00
parent 9696698d40
commit 20d85d3450
12 changed files with 195 additions and 33 deletions
+6 -2
View File
@@ -1924,9 +1924,13 @@ export const api = {
/**
* GET /api/lanes/pipeline-stats — per-node pass counts aggregated over every
* lane and every archived feature.
* @returns `{ pipelines }` — see {@link PipelineStats}.
* @param laneId Narrow to one lane and its archived features; omit for all.
* @returns `{ pipelines, lanes }` — see {@link PipelineStats}.
*/
pipelineStats: () => request<PipelineStats>("/lanes/pipeline-stats"),
pipelineStats: (laneId?: number | null) =>
request<PipelineStats>(
`/lanes/pipeline-stats${laneId ? `?lane=${encodeURIComponent(laneId)}` : ""}`
),
/**
* GET /api/lanes/branches — a candidate source repo's local branches.
* @param repo Absolute path to an existing git repository.