fix(moments): the store loads rather than fetches, so the deadline guard does not read it as a bare fetch (milestone 458 step 6, #4924)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 52s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / Build & push image (push) Successful in 45s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 14:47:12 -04:00
co-authored by Claude Opus 5.5
parent b73a689849
commit 5bcc603310
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ async function addMapping() {
}
}
onMounted(() => store.fetch(true));
onMounted(() => store.load(true));
</script>
<template>
@@ -107,7 +107,7 @@ onMounted(() => store.fetch(true));
<p v-if="store.loading && !data" class="empty-msg">Loading moments…</p>
<p v-else-if="store.failed && !data" class="error-msg">
The moment catalog could not be loaded.
<button type="button" class="btn-text" @click="store.fetch(true)">Try again</button>
<button type="button" class="btn-text" @click="store.load(true)">Try again</button>
</p>
<template v-else-if="data">
@@ -139,7 +139,7 @@ async function load() {
}
procedureDraft.value = "";
procedureError.value = "";
await Promise.all([canon.fetchCatalog(), momentsStore.fetch()]);
await Promise.all([canon.fetchCatalog(), momentsStore.load()]);
}
async function save() {
+3 -3
View File
@@ -18,7 +18,7 @@ export const useMomentsStore = defineStore("moments", () => {
const loading = ref(false);
const failed = ref(false);
async function fetch(force = false) {
async function load(force = false) {
if (data.value && !force) return data.value;
loading.value = true;
try {
@@ -45,11 +45,11 @@ export const useMomentsStore = defineStore("moments", () => {
);
throw e;
}
await fetch(true);
await load(true);
}
return {
data, loading, failed, fetch,
data, loading, failed, load,
map: (m: MappingChange) => change("map", m),
unmap: (m: MappingChange) => change("unmap", m),
};