Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
---
|
|
|
|
|
title: Tasks
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
```js
|
2026-03-11 01:40:52 +01:00
|
|
|
import {API, POLL} from "./components/config.js";
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const taskState = (async function*() {
|
|
|
|
|
while (true) {
|
|
|
|
|
let data = [], ok = false;
|
|
|
|
|
try {
|
2026-03-02 23:39:17 +01:00
|
|
|
const [rt, rw, rto, rr] = await Promise.all([
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
fetch(`${API}/tasks/?limit=500`),
|
|
|
|
|
fetch(`${API}/workstreams/`),
|
|
|
|
|
fetch(`${API}/topics/`),
|
2026-03-02 23:39:17 +01:00
|
|
|
fetch(`${API}/repos/`),
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
]);
|
2026-03-02 23:39:17 +01:00
|
|
|
ok = rt.ok && rw.ok && rto.ok && rr.ok;
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
if (ok) {
|
2026-03-02 23:39:17 +01:00
|
|
|
const [taskList, wsList, topicList, repoList] = await Promise.all([rt.json(), rw.json(), rto.json(), rr.json()]);
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
const topicMap = Object.fromEntries(topicList.map(t => [t.id, t]));
|
2026-03-02 23:39:17 +01:00
|
|
|
const repoMap = Object.fromEntries(repoList.map(r => [r.id, r]));
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
const wsMap = Object.fromEntries(wsList.map(w => [w.id, {
|
|
|
|
|
...w,
|
2026-03-02 23:39:17 +01:00
|
|
|
domain: repoMap[w.repo_id]?.domain_slug ?? topicMap[w.topic_id]?.domain_slug ?? "unknown",
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
}]));
|
|
|
|
|
data = taskList.map(t => ({
|
|
|
|
|
...t,
|
|
|
|
|
workstream_title: wsMap[t.workstream_id]?.title ?? "—",
|
|
|
|
|
domain: wsMap[t.workstream_id]?.domain ?? "unknown",
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
} catch {}
|
|
|
|
|
yield {data, ok, ts: new Date()};
|
|
|
|
|
await new Promise(res => setTimeout(res, POLL));
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const data = taskState.data ?? [];
|
|
|
|
|
const _ok = taskState.ok ?? false;
|
|
|
|
|
const _ts = taskState.ts;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
import {MultiSelect} from "./components/multiselect.js";
|
|
|
|
|
|
|
|
|
|
const STATUSES = ["todo", "in_progress", "blocked", "done", "cancelled"];
|
|
|
|
|
const PRIORITIES = ["critical", "high", "medium", "low"];
|
2026-02-28 15:31:28 +01:00
|
|
|
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"];
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
|
|
|
|
|
const _filtersForm = Inputs.form(
|
|
|
|
|
{
|
|
|
|
|
status: MultiSelect(STATUSES, {label: "Status", placeholder: "All statuses"}),
|
|
|
|
|
priority: MultiSelect(PRIORITIES, {label: "Priority", placeholder: "All priorities"}),
|
|
|
|
|
domain: MultiSelect(DOMAINS, {label: "Domain", placeholder: "All domains"}),
|
|
|
|
|
assignee: Inputs.text({placeholder: "Assignee…", style: "width:120px"}),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
template: ({status, priority, domain, assignee}) => html`<div class="filter-bar">
|
|
|
|
|
${status}${priority}${domain}
|
2026-03-18 02:17:04 +01:00
|
|
|
<div class="filter-text-input">${assignee}</div>
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
</div>`,
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const filters = Generators.input(_filtersForm);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const filtered = data.filter(t =>
|
|
|
|
|
(filters.status.length === 0 || filters.status.includes(t.status)) &&
|
|
|
|
|
(filters.priority.length === 0 || filters.priority.includes(t.priority)) &&
|
|
|
|
|
(filters.domain.length === 0 || filters.domain.includes(t.domain)) &&
|
|
|
|
|
(!filters.assignee || (t.assignee ?? "").toLowerCase().includes(filters.assignee.toLowerCase()))
|
|
|
|
|
);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Tasks
|
|
|
|
|
|
|
|
|
|
```js
|
feat(dashboard): add entity detail modal and fixed-layout tables
Replace Inputs.table() with buildEntityTable() across workstreams and
tasks pages. Add click-to-detail modal (openEntityModal) on all entity
list views: workstreams, tasks, extension points, and technical debt.
- New component: src/components/entity-modal.js
- openEntityModal(entity, type) — full-detail overlay (Esc/click-outside to close)
- buildEntityTable(rows, cols, onRowClick) — table-layout:fixed, overflow-safe wrapper
- CSS injected lazily; no separate stylesheet required
- Tables: table-layout:fixed keeps content within the content column;
title col 32%, workstream col 14%, all cells ellipsis + title tooltip
- Cards (EP, TD): onclick → modal; workstream name span gets title tooltip
- Blocked task cards also wired to modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:28:44 +01:00
|
|
|
import {injectTocTop} from "./components/toc-sidebar.js";
|
|
|
|
|
import {withDocHelp} from "./components/doc-overlay.js";
|
|
|
|
|
import {openEntityModal, buildEntityTable} from "./components/entity-modal.js";
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
|
|
|
|
|
// ── KPI sidebar card ─────────────────────────────────────────────────────────
|
|
|
|
|
const _open = data.filter(t => ["todo", "in_progress", "blocked"].includes(t.status));
|
|
|
|
|
const _blocked = data.filter(t => t.status === "blocked");
|
|
|
|
|
const _inProg = data.filter(t => t.status === "in_progress");
|
|
|
|
|
const _done = data.filter(t => t.status === "done");
|
|
|
|
|
const _total = data.filter(t => t.status !== "cancelled").length;
|
|
|
|
|
const _donePct = _total > 0 ? Math.round(_done.length / _total * 100) : 0;
|
|
|
|
|
|
|
|
|
|
const _kpiBox = html`<div class="kpi-infobox">
|
|
|
|
|
<div class="kpi-infobox-title">Task Overview</div>
|
|
|
|
|
<div class="kpi-row">
|
|
|
|
|
<span class="kpi-row-label">open</span>
|
|
|
|
|
<div class="kpi-row-right">
|
|
|
|
|
<div class="kpi-row-value">${_open.length}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="kpi-row">
|
|
|
|
|
<span class="kpi-row-label">blocked</span>
|
|
|
|
|
<div class="kpi-row-right">
|
|
|
|
|
<div class="kpi-row-value" style="color:${_blocked.length > 0 ? '#dc2626' : 'inherit'}">${_blocked.length}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="kpi-row">
|
|
|
|
|
<span class="kpi-row-label">in progress</span>
|
|
|
|
|
<div class="kpi-row-right">
|
|
|
|
|
<div class="kpi-row-value">${_inProg.length}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="kpi-row" style="border-top:1px solid var(--theme-foreground-faint,#eee)">
|
|
|
|
|
<span class="kpi-row-label">done</span>
|
|
|
|
|
<div class="kpi-row-right">
|
|
|
|
|
<div class="kpi-row-value">${_done.length}</div>
|
|
|
|
|
<div class="kpi-row-sub">${_donePct}% of total</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`;
|
|
|
|
|
|
|
|
|
|
// ── Live indicator ────────────────────────────────────────────────────────────
|
|
|
|
|
const _liveEl = html`<div class="live-indicator">
|
|
|
|
|
<span style="color:${_ok ? 'var(--theme-foreground-focus)' : 'red'}">●</span>
|
|
|
|
|
${_ok
|
|
|
|
|
? `Live · updated ${_ts?.toLocaleTimeString()}`
|
|
|
|
|
: html`<span style="color:red">Offline — run: <code>make api</code></span>`}
|
|
|
|
|
</div>`;
|
|
|
|
|
withDocHelp(_liveEl, "/docs/live-data");
|
|
|
|
|
|
feat(dashboard): nav restructure, full context-help coverage, 11 new ref docs
Navigation:
- New order: Overview · Todo · Domains · Repos · Workstreams (collapsible,
open:false, with atomic sub-entries: Decisions, Tasks, Debt, Extends,
Dependencies) · Contributions · SBOM · Progress · Reference (collapsible)
- Reference section gains path:/reference landing page; all 18 doc pages
listed in nav (alphabetical) and in reference.md table
New pages:
- todo.md — Internal / Ecosystem / Third-party todo classification
- dependencies.md — dependency edge table derived from state/summary
- reference.md — Reference landing page with full doc index
New reference doc pages (11):
contributions, debt, dependencies, domains, extensions, overview,
repos, tasks, todo + reference (meta) already added previously
doc-overlay.js — lazy bubblehelp tooltip:
- _titleCache Map + _fetchDocTitle(docPath): on first hover of any ?
button, fetches the target doc page, parses <h1>, sets btn.title
- Native browser tooltip appears exactly on the ? circle on subsequent hover
Context-help wired on all 14 dashboard pages:
- h1 withDocHelp added to: index, todo, domains, repos, tasks, techdept,
extensions, dependencies (contributions/workstreams/decisions/sbom/
progress/reference were already wired)
- domains.md + repos.md: added missing withDocHelp import and live-data link
- tasks/techdept/extensions: removed duplicate _h1 const that caused
SyntaxError: Identifier '_h1' has already been declared
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 23:46:26 +01:00
|
|
|
const _h1 = document.querySelector("#observablehq-main h1");
|
|
|
|
|
if (_h1) { _h1.style.position = "relative"; withDocHelp(_h1, "/docs/tasks"); }
|
|
|
|
|
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
// ── Inject into TOC sidebar ───────────────────────────────────────────────────
|
|
|
|
|
injectTocTop("task-kpi-box", _kpiBox);
|
|
|
|
|
injectTocTop("live-indicator", _liveEl);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Status Distribution
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
import * as Plot from "npm:@observablehq/plot";
|
|
|
|
|
|
|
|
|
|
const STATUS_COLOR = {
|
|
|
|
|
todo: "#94a3b8",
|
|
|
|
|
in_progress: "#3b82f6",
|
|
|
|
|
blocked: "#ef4444",
|
|
|
|
|
done: "#22c55e",
|
|
|
|
|
cancelled: "#cbd5e1",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const byStatus = STATUSES
|
|
|
|
|
.map(s => ({status: s, count: filtered.filter(t => t.status === s).length}))
|
|
|
|
|
.filter(d => d.count > 0);
|
|
|
|
|
|
|
|
|
|
display(byStatus.length === 0
|
|
|
|
|
? html`<p class="dim">No tasks match the current filter.</p>`
|
|
|
|
|
: Plot.plot({
|
|
|
|
|
marks: [
|
|
|
|
|
Plot.barX(byStatus, {y: "status", x: "count", fill: d => STATUS_COLOR[d.status] ?? "#94a3b8", tip: true}),
|
|
|
|
|
Plot.ruleX([0]),
|
|
|
|
|
],
|
|
|
|
|
marginLeft: 90,
|
|
|
|
|
width: 500,
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Blocked Tasks
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
const _blockedInFilter = filtered.filter(t => t.status === "blocked");
|
|
|
|
|
|
|
|
|
|
if (_blockedInFilter.length === 0) {
|
|
|
|
|
display(html`<p class="dim">No blocked tasks in current filter. ✓</p>`);
|
|
|
|
|
} else {
|
|
|
|
|
display(html`<div class="task-blocked-list">${_blockedInFilter.map(t => html`
|
feat(dashboard): add entity detail modal and fixed-layout tables
Replace Inputs.table() with buildEntityTable() across workstreams and
tasks pages. Add click-to-detail modal (openEntityModal) on all entity
list views: workstreams, tasks, extension points, and technical debt.
- New component: src/components/entity-modal.js
- openEntityModal(entity, type) — full-detail overlay (Esc/click-outside to close)
- buildEntityTable(rows, cols, onRowClick) — table-layout:fixed, overflow-safe wrapper
- CSS injected lazily; no separate stylesheet required
- Tables: table-layout:fixed keeps content within the content column;
title col 32%, workstream col 14%, all cells ellipsis + title tooltip
- Cards (EP, TD): onclick → modal; workstream name span gets title tooltip
- Blocked task cards also wired to modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:28:44 +01:00
|
|
|
<div class="task-blocked-item entity-row" onclick=${() => openEntityModal(t, "task")}>
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
<div class="task-item-header">
|
|
|
|
|
<span class="task-badge task-priority-${t.priority}">${t.priority}</span>
|
|
|
|
|
<span class="task-context">${t.domain}</span>
|
|
|
|
|
<span class="task-context task-ws-name">${t.workstream_title}</span>
|
|
|
|
|
${t.due_date ? html`<span class="task-due">${new Date(t.due_date) < new Date() ? "⚠ overdue" : "due"} ${t.due_date}</span>` : ""}
|
|
|
|
|
${t.assignee ? html`<span class="task-assignee">@${t.assignee}</span>` : ""}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="task-title">${t.title}</div>
|
|
|
|
|
${t.blocking_reason ? html`<div class="task-blocking-reason">⊘ ${t.blocking_reason}</div>` : ""}
|
|
|
|
|
</div>
|
|
|
|
|
`)}</div>`);
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## All Tasks
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
display(_filtersForm);
|
|
|
|
|
display(html`<p><strong>${filtered.length}</strong> tasks shown.</p>`);
|
|
|
|
|
|
|
|
|
|
const PRIORITY_ORDER = {critical: 0, high: 1, medium: 2, low: 3};
|
|
|
|
|
const STATUS_ORDER = {blocked: 0, in_progress: 1, todo: 2, done: 3, cancelled: 4};
|
|
|
|
|
|
|
|
|
|
const sorted = [...filtered].sort((a, b) => {
|
|
|
|
|
const sd = (STATUS_ORDER[a.status] ?? 9) - (STATUS_ORDER[b.status] ?? 9);
|
|
|
|
|
if (sd !== 0) return sd;
|
|
|
|
|
return (PRIORITY_ORDER[a.priority] ?? 9) - (PRIORITY_ORDER[b.priority] ?? 9);
|
|
|
|
|
});
|
|
|
|
|
|
feat(dashboard): add entity detail modal and fixed-layout tables
Replace Inputs.table() with buildEntityTable() across workstreams and
tasks pages. Add click-to-detail modal (openEntityModal) on all entity
list views: workstreams, tasks, extension points, and technical debt.
- New component: src/components/entity-modal.js
- openEntityModal(entity, type) — full-detail overlay (Esc/click-outside to close)
- buildEntityTable(rows, cols, onRowClick) — table-layout:fixed, overflow-safe wrapper
- CSS injected lazily; no separate stylesheet required
- Tables: table-layout:fixed keeps content within the content column;
title col 32%, workstream col 14%, all cells ellipsis + title tooltip
- Cards (EP, TD): onclick → modal; workstream name span gets title tooltip
- Blocked task cards also wired to modal
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 18:28:44 +01:00
|
|
|
display(buildEntityTable(
|
|
|
|
|
sorted,
|
|
|
|
|
[
|
|
|
|
|
{label: "Status", key: "status"},
|
|
|
|
|
{label: "Priority", key: "priority"},
|
|
|
|
|
{label: "Title", key: "title", cls: "et-title-col et-title-cell"},
|
|
|
|
|
{label: "Domain", key: "domain"},
|
|
|
|
|
{label: "Workstream", key: "workstream_title", cls: "et-ws-col et-ws-cell"},
|
|
|
|
|
{label: "Assignee", render: t => t.assignee ?? "—"},
|
|
|
|
|
{label: "Due", render: t => t.due_date ?? "—"},
|
|
|
|
|
],
|
|
|
|
|
t => openEntityModal(t, "task"),
|
|
|
|
|
));
|
Add Tasks dashboard page
New page with:
- Data fetch: /tasks/ + /workstreams/ + /topics/ in parallel, enriched
with domain and workstream_title per task
- Task Overview KPI card in TOC sidebar: open / blocked (red if >0) /
in progress / done with % of total
- Status Distribution chart (horizontal bar, colour-coded by status)
- Blocked Tasks section: cards with priority badge, domain, workstream,
blocking_reason highlighted in amber
- All Tasks: filterable table (status, priority, domain, assignee
multiselect + text), sorted blocked→in_progress→todo→done, 25 rows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 01:04:19 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
/* ── Live indicator ───────────────────────────────────────────────────────── */
|
|
|
|
|
.live-indicator { font-size: 0.8rem; color: gray; position: relative; padding: 0.55rem 1.8rem 0.55rem 0.7rem; margin-bottom: 0.75rem; }
|
|
|
|
|
|
|
|
|
|
/* ── KPI infobox ──────────────────────────────────────────────────────────── */
|
|
|
|
|
.kpi-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.3rem 0; }
|
|
|
|
|
.kpi-row + .kpi-row { border-top: 1px solid var(--theme-foreground-faint, #eee); }
|
|
|
|
|
.kpi-row-label { font-size: 0.8rem; color: var(--theme-foreground-muted, #666); white-space: nowrap; }
|
|
|
|
|
.kpi-row-right { text-align: right; }
|
|
|
|
|
.kpi-row-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
|
|
|
|
|
.kpi-row-sub { font-size: 0.68rem; color: var(--theme-foreground-faint, #aaa); line-height: 1.2; }
|
|
|
|
|
|
|
|
|
|
/* ── Filters ──────────────────────────────────────────────────────────────── */
|
|
|
|
|
|
|
|
|
|
/* ── Blocked task cards ───────────────────────────────────────────────────── */
|
|
|
|
|
.task-blocked-list { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
|
|
|
.task-blocked-item { border-left: 3px solid #ef4444; border-radius: 0 6px 6px 0; background: var(--theme-background-alt); padding: 0.65rem 0.9rem; }
|
|
|
|
|
.task-item-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; font-size: 0.75rem; }
|
|
|
|
|
.task-badge { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 10px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
|
|
|
.task-priority-critical { background: #fee2e2; color: #991b1b; }
|
|
|
|
|
.task-priority-high { background: #ffedd5; color: #9a3412; }
|
|
|
|
|
.task-priority-medium { background: #dbeafe; color: #1e40af; }
|
|
|
|
|
.task-priority-low { background: #f1f5f9; color: #475569; }
|
|
|
|
|
.task-context { color: var(--theme-foreground-muted, #666); }
|
|
|
|
|
.task-ws-name { font-style: italic; }
|
|
|
|
|
.task-due { color: #dc2626; font-weight: 600; }
|
|
|
|
|
.task-assignee { color: var(--theme-foreground-muted, #888); }
|
|
|
|
|
.task-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.15rem; }
|
|
|
|
|
.task-blocking-reason { font-size: 0.8rem; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 0.2rem 0.5rem; margin-top: 0.25rem; }
|
|
|
|
|
|
|
|
|
|
/* ── Utility ──────────────────────────────────────────────────────────────── */
|
|
|
|
|
.dim { color: gray; font-style: italic; }
|
|
|
|
|
</style>
|