From 1fb741e426b1e8a1c5c8ee8ff253a3e65457275a Mon Sep 17 00:00:00 2001 From: eti Date: Tue, 4 Aug 2026 18:58:38 +0200 Subject: [PATCH] web: add repository pipelines page with mocked data Adds the pipelines tab at /[handle]/[repo]/pipelines. The cards follow the issue cards: what set the run off on top, then a status tag, a dropdown listing the workflows, when it ran and how long it took. While a run is still going the dropdown counts the finished ones, so 1/3. The data is fake for now. It sits in components/repo/pipelines/mock.ts and the page load filters it, so pointing this at bobbin later should only mean rewriting +page.ts. The search box and the push/pull-request tabs keep each other's state, so searching inside a tab does not throw the tab away. Along for the ride: Tag gained a danger colour for failed runs, DropdownItem takes a class and now renders Button, and Button exposes a bindable ref. The links to workflow logs point at a route that does not exist yet. Signed-off-by: eti --- .../pipelines/PipelineCard.stories.svelte | 26 +++ .../repo/pipelines/PipelineCard.svelte | 27 +++ .../repo/pipelines/PipelineCardContent.svelte | 154 ++++++++++++++++++ .../repo/pipelines/PipelineEmptyState.svelte | 77 +++++++++ .../pipelines/PipelineList.stories.svelte | 22 +++ .../repo/pipelines/PipelineList.svelte | 28 ++++ .../pipelines/PipelineSearch.stories.svelte | 17 ++ .../repo/pipelines/PipelineSearch.svelte | 78 +++++++++ .../repo/pipelines/PipelineStatusIcon.svelte | 57 +++++++ .../pipelines/PipelineToolbar.stories.svelte | 21 +++ .../repo/pipelines/PipelineToolbar.svelte | 80 +++++++++ .../repo/pipelines/PipelineWorkflows.svelte | 81 +++++++++ web/src/lib/components/repo/pipelines/mock.ts | 88 ++++++++++ .../lib/components/repo/pipelines/pipeline.ts | 89 ++++++++++ web/src/lib/components/repo/types.ts | 36 ++++ web/src/lib/components/ui/Button.svelte | 4 + web/src/lib/components/ui/DropdownItem.svelte | 6 +- web/src/lib/components/ui/Separator.svelte | 9 +- web/src/lib/components/ui/Tag.stories.svelte | 6 +- web/src/lib/components/ui/Tag.svelte | 7 +- web/src/lib/format.ts | 17 ++ .../[handle]/[repo]/pipelines/+page.svelte | 25 +++ .../routes/[handle]/[repo]/pipelines/+page.ts | 25 +++ 23 files changed, 973 insertions(+), 7 deletions(-) create mode 100644 web/src/lib/components/repo/pipelines/PipelineCard.stories.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineCard.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineCardContent.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineEmptyState.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineList.stories.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineList.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineSearch.stories.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineSearch.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineStatusIcon.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineToolbar.stories.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineToolbar.svelte create mode 100644 web/src/lib/components/repo/pipelines/PipelineWorkflows.svelte create mode 100644 web/src/lib/components/repo/pipelines/mock.ts create mode 100644 web/src/lib/components/repo/pipelines/pipeline.ts create mode 100644 web/src/routes/[handle]/[repo]/pipelines/+page.svelte create mode 100644 web/src/routes/[handle]/[repo]/pipelines/+page.ts diff --git a/web/src/lib/components/repo/pipelines/PipelineCard.stories.svelte b/web/src/lib/components/repo/pipelines/PipelineCard.stories.svelte new file mode 100644 index 00000000..1746bb19 --- /dev/null +++ b/web/src/lib/components/repo/pipelines/PipelineCard.stories.svelte @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/web/src/lib/components/repo/pipelines/PipelineCard.svelte b/web/src/lib/components/repo/pipelines/PipelineCard.svelte new file mode 100644 index 00000000..c56a41ff --- /dev/null +++ b/web/src/lib/components/repo/pipelines/PipelineCard.svelte @@ -0,0 +1,27 @@ + + + + + diff --git a/web/src/lib/components/repo/pipelines/PipelineCardContent.svelte b/web/src/lib/components/repo/pipelines/PipelineCardContent.svelte new file mode 100644 index 00000000..7be23d6c --- /dev/null +++ b/web/src/lib/components/repo/pipelines/PipelineCardContent.svelte @@ -0,0 +1,154 @@ + + + + +{#snippet triggerLabel()} + {#if pipeline.trigger.kind === "push"} +