enhance(actions): add pending job status and align job statuses with GitHub (#39376)

This commit is contained in:
silverwind
2026-09-27 20:30:42 +02:00
committed by GitHub
parent 0d09986790
commit 9e7b302bd3
45 changed files with 397 additions and 189 deletions
+14 -5
View File
@@ -228,11 +228,13 @@ const splitRoutedEdges = computed(() => {
const nodesWithIncomingEdge = computed(() => new Set(graphModel.value.adjacency.incomingByNodeId.keys()));
const nodesWithOutgoingEdge = computed(() => new Set(graphModel.value.adjacency.outgoingByNodeId.keys()));
function isJobLinked(job: ActionsJob) {
return !job.isReusableCaller && job.status !== 'pending'; // callers have no detail page, pending jobs have nothing to show yet
}
function onNodeClick(job: GraphNode | ActionsJob, event: MouseEvent) {
const target = 'jobs' in job ? job.jobs[0]! : job;
// Reusable callers have no per-job detail page; clicking them is a no-op so the graph
// doesn't lead users to a dead destination.
if (target.isReusableCaller) return;
if (!isJobLinked(target)) return;
const link = `${props.runLink}/jobs/${target.id}`;
if (event.ctrlKey || event.metaKey) {
window.open(link, '_blank');
@@ -342,6 +344,7 @@ function onNodeClick(job: GraphNode | ActionsJob, event: MouseEvent) {
v-for="ch in job.jobs"
:key="ch.id"
class="graph-list-row"
:class="{ 'unlinked-node': !isJobLinked(ch) }"
@mouseenter="handleNodeMouseEnter(job.id)"
@click.stop="onNodeClick(ch, $event)"
>
@@ -373,6 +376,7 @@ function onNodeClick(job: GraphNode | ActionsJob, event: MouseEvent) {
v-for="ch in job.jobs"
:key="ch.id"
class="graph-list-row"
:class="{ 'unlinked-node': !isJobLinked(ch) }"
@mouseenter="handleNodeMouseEnter(job.id)"
@click="onNodeClick(ch, $event)"
>
@@ -391,7 +395,7 @@ function onNodeClick(job: GraphNode | ActionsJob, event: MouseEvent) {
<g
v-else
class="job-node-group"
:class="{ 'related-node': isNodeHighlighted(job.id), 'caller-node': job.jobs[0]!.isReusableCaller }"
:class="{ 'related-node': isNodeHighlighted(job.id), 'unlinked-node': !isJobLinked(job.jobs[0]!) }"
@click="onNodeClick(job, $event)"
@mouseenter="handleNodeMouseEnter(job.id)"
@mouseleave="handleNodeMouseLeave"
@@ -523,10 +527,15 @@ function onNodeClick(job: GraphNode | ActionsJob, event: MouseEvent) {
transition: opacity 0.15s ease;
}
.job-node-group.caller-node {
.job-node-group.unlinked-node,
.graph-list-row.unlinked-node {
cursor: default;
}
.graph-list-row.unlinked-node:hover {
background: none;
}
.job-node-group:hover .job-rect,
.job-node-group.related-node .job-rect {
stroke: var(--color-primary);