GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): workflow skipped count follows the picked workflow (#43708) · Ryoku-dev/hyakki@61a31f6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/workflows
    • WorkflowRunsView.browser.test.tsx
    • WorkflowRunsView.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/workflows/WorkflowRunsView.browser.test.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/workflows/WorkflowRunsView.browser.test.tsx
+37Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,43 @@ describe("WorkflowRunsView", () => {
701701
await expect.element(runs).toMatchTextContent("Has not run yet.");
702702
});
703703

704+
it("counts the skipped runs of the workflow picked, not of every workflow", async () => {
705+
setup({
706+
workflows: [
707+
{ name: "release", version: 1, triggers: [] },
708+
{ name: "report", version: 1, triggers: ["webhook pings"] },
709+
],
710+
runs: [
711+
run({ runId: "rel", title: "Release 1.3", status: "completed", endedAt: at(3) }),
712+
run({
713+
runId: "s1",
714+
workflow: "report",
715+
title: "Ping 1",
716+
status: "skipped",
717+
endedAt: at(1),
718+
}),
719+
run({
720+
runId: "s2",
721+
workflow: "report",
722+
title: "Ping 2",
723+
status: "skipped",
724+
endedAt: at(2),
725+
}),
726+
],
727+
questions: [],
728+
});
729+
await using _desktop = await desktop();
730+
await using screen = await render(page());
731+
732+
await screen.getByRole("button", { name: "All", exact: true }).click();
733+
await expect.element(screen.getByRole("button", { name: "Show 2 skipped" })).toBeVisible();
734+
await screen.getByRole("combobox", { name: "Workflow" }).click();
735+
await screen.getByRole("option", { name: "release" }).click();
736+
await expect
737+
.element(screen.getByRole("navigation", { name: "Workflow runs" }))
738+
.not.toMatchTextContent(/skipped/);
739+
});
740+
704741
const KIND_KEY = "t3code:workflows:question-kind";
705742
const asked = (runId: string, kind?: string): WorkflowQuestion => ({
706743
...question,
Collapse file

‎apps/web/src/components/workflows/WorkflowRunsView.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/workflows/WorkflowRunsView.tsx
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ export function WorkflowRunsView({
209209
const lists = workflowRunLists(groups);
210210
const all = allWorkflowRunNodes(groups);
211211
const section = groups.workflows.find((candidate) => candidate.name === workflow) ?? null;
212+
// With a workflow picked, the list holds only its runs, so count only its skipped ones.
213+
const skipped = listedWorkflowRuns(
214+
section === null ? snapshot.runs : snapshot.runs.filter((run) => run.workflow === section.name),
215+
false,
216+
).skipped;
212217
// A run that another invoked is not in the list itself; the one it is part of stands for it.
213218
const listedFor = (node: WorkflowRunNode | null): string | null => {
214219
if (node === null) return null;
@@ -407,12 +412,12 @@ export function WorkflowRunsView({
407412
))}
408413
</ul>
409414
)}
410-
{tab === "all" && visible.skipped > 0 && !openedSkipped ? (
415+
{tab === "all" && skipped > 0 && !openedSkipped ? (
411416
<div className="flex justify-center pt-2">
412417
<Button size="xs" variant="ghost" onClick={() => setShowSkipped(!showSkipped)}>
413418
{showSkipped
414419
? gt("Hide skipped")
415-
: gt("Show {count} skipped", { count: visible.skipped })}
420+
: gt("Show {count} skipped", { count: skipped })}
416421
</Button>
417422
</div>
418423
) : null}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.