fix(dashboard): replace stale t.domain with t.domain_slug across all pages
After the v0.5 migration TopicRead.domain was renamed to domain_slug. index.md, decisions.md and tasks.md still referenced the old field, causing every workstream domain to fall back to "unknown". Also updated tasks.md to load the domain filter list dynamically from /domains/ instead of the hardcoded 6-slug array. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -90,7 +90,7 @@ if (summary.error) display(html`<div class="warning">⚠️ ${summary.error}</di
|
||||
```js
|
||||
import * as Plot from "npm:@observablehq/plot";
|
||||
|
||||
const topicById = Object.fromEntries((summary.topics ?? []).map(t => [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) {
|
||||
<strong>💡 Getting started</strong>
|
||||
<p>These registered projects have no workstreams yet:</p>
|
||||
<ul>${emptyRegistered.map(t => html`<li>
|
||||
<strong>${t.domain}</strong> — open repo in Claude Code and say <em>"Hi!"</em> to kick off first session, or run <code>custodian create-workstream --domain ${t.domain} --title "My first workstream"</code> manually
|
||||
<strong>${t.domain_slug}</strong> — open repo in Claude Code and say <em>"Hi!"</em> to kick off first session, or run <code>custodian create-workstream --domain ${t.domain_slug} --title "My first workstream"</code> manually
|
||||
</li>`)}</ul>
|
||||
</div>`);
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user