diff --git a/state-hub/dashboard/src/decisions.md b/state-hub/dashboard/src/decisions.md index 971ca0f..4c36e42 100644 --- a/state-hub/dashboard/src/decisions.md +++ b/state-hub/dashboard/src/decisions.md @@ -24,7 +24,7 @@ const decState = (async function*() { data = decisions .map(d => ({ ...d, - domain: topicMap[d.topic_id]?.domain ?? null, + domain: topicMap[d.topic_id]?.domain_slug ?? null, topic_title: topicMap[d.topic_id]?.title ?? null, })) .sort((a, b) => { diff --git a/state-hub/dashboard/src/index.md b/state-hub/dashboard/src/index.md index 94c8f00..ab376c7 100644 --- a/state-hub/dashboard/src/index.md +++ b/state-hub/dashboard/src/index.md @@ -90,7 +90,7 @@ if (summary.error) display(html`
⚠️ ${summary.error} [t.id, t.domain])); +const topicById = Object.fromEntries((summary.topics ?? []).map(t => [t.id, t.domain_slug])); const openWs = (summary.open_workstreams ?? []).map(w => ({ title: w.title, @@ -270,7 +270,7 @@ if (regs.length === 0) { const regs = regsState ?? []; const registeredDomains = new Set(regs.map(e => e.detail?.domain).filter(Boolean)); const emptyRegistered = (summary.topics ?? []).filter(t => - registeredDomains.has(t.domain) && (t.workstreams ?? []).length === 0 + registeredDomains.has(t.domain_slug) && (t.workstreams ?? []).length === 0 ); if (emptyRegistered.length > 0) { @@ -278,7 +278,7 @@ if (emptyRegistered.length > 0) { 💡 Getting started

These registered projects have no workstreams yet:

`); } diff --git a/state-hub/dashboard/src/tasks.md b/state-hub/dashboard/src/tasks.md index 251125d..29bda02 100644 --- a/state-hub/dashboard/src/tasks.md +++ b/state-hub/dashboard/src/tasks.md @@ -23,7 +23,7 @@ const taskState = (async function*() { const topicMap = Object.fromEntries(topicList.map(t => [t.id, t])); const wsMap = Object.fromEntries(wsList.map(w => [w.id, { ...w, - domain: topicMap[w.topic_id]?.domain ?? "unknown", + domain: topicMap[w.topic_id]?.domain_slug ?? "unknown", }])); data = taskList.map(t => ({ ...t, @@ -49,7 +49,10 @@ import {MultiSelect} from "./components/multiselect.js"; const STATUSES = ["todo", "in_progress", "blocked", "done", "cancelled"]; const PRIORITIES = ["critical", "high", "medium", "low"]; -const DOMAINS = ["custodian", "railiance", "markitect", "coulomb_social", "personhood", "foerster_capabilities"]; +const _domainsResp = await fetch(`${API}/domains/?status=active`).catch(() => null); +const DOMAINS = _domainsResp?.ok + ? (await _domainsResp.json()).map(d => d.slug) + : ["custodian", "railiance", "markitect", "coulomb_social", "personhood", "foerster_capabilities"]; const _filtersForm = Inputs.form( {