~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

web: The run workflow dialog lists the ref typed, not one asked before

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:web/run-workflow-race
web/src/lib/organisms/RunWorkflow.svelte+8−1
@@ -21,13 +21,20 @@
let busy = $state(false);
const asked = $derived(listed?.workflows.filter((w) => w.asked) ?? []);
/** How many times the workflows were asked for: an answer to any but the last is let go. */
let asking = 0;
/** The workflows at the ref named, or the default branch. */
async function load() {
const mine = ++asking;
problem = '';
try {
listed = await ask<typeof listWorkflows.main>('dev.knotless.listWorkflows', { repo: repo.uri, ref: ref.trim() || undefined });
const answer = await ask<typeof listWorkflows.main>('dev.knotless.listWorkflows', { repo: repo.uri, ref: ref.trim() || undefined });
// The default branch's, asked as the dialog opened, can come after a ref typed since.
if (mine !== asking) return;
listed = answer;
if (!asked.some((w) => w.name === workflow)) workflow = asked[0]?.name ?? '';
} catch (e) {
if (mine !== asking) return;
listed = null;
problem = (e as Error).message;
}