STATE-WP-0069 T06: add workplan flow entity and prefer open_workplans
Introduce flows/workplan.yaml and /flows/workplan/* routes alongside the legacy workstream flow. Dashboard, README, and MCP flow docs now prefer open_workplans with open_workstreams fallback until dual-key retirement.
This commit is contained in:
parent
f596fc27c7
commit
2b83654ac3
12 changed files with 122 additions and 13 deletions
|
|
@ -37,5 +37,6 @@ except urllib.error.URLError as e:
|
|||
"waiting_tasks": [],
|
||||
"blocked_tasks": [],
|
||||
"recent_progress": [],
|
||||
"open_workplans": [],
|
||||
"open_workstreams": [],
|
||||
}))
|
||||
|
|
|
|||
|
|
@ -86,5 +86,5 @@ a cycle exists and the WHI is penalised by 50%. The WHI KPI card on the
|
|||
|
||||
## Data source
|
||||
|
||||
Dependency edges are derived from the `depends_on` arrays on `open_workstreams`
|
||||
Dependency edges are derived from the `depends_on` arrays on `open_workplans`
|
||||
in `GET /state/summary`. Polls every **15 seconds**.
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ display(html`<div class="grid grid-cols-3" style="gap:1rem;margin-bottom:1.5rem"
|
|||
|
||||
```js
|
||||
const waitingTasks = summary.waiting_tasks ?? summary.blocked_tasks ?? [];
|
||||
const wsById = Object.fromEntries((summary.open_workstreams ?? []).map(w => [w.id, w]));
|
||||
const wsById = Object.fromEntries((summary.open_workplans ?? summary.open_workstreams ?? []).map(w => [w.id, w]));
|
||||
const todayCount = (summary.recent_progress ?? []).filter(e =>
|
||||
e.created_at?.startsWith(new Date().toISOString().slice(0, 10))).length;
|
||||
const decCount = (decisions.open ?? 0) + (decisions.escalated ?? 0);
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ display(Plot.plot({
|
|||
display(_filtersForm);
|
||||
|
||||
{
|
||||
// Enrich each workplan with tasks/deps data from open_workstreams summary
|
||||
// Enrich each workplan with tasks/deps data from open_workplans summary
|
||||
const _openWsMap = Object.fromEntries(openWs.map(w => [w.id, w]));
|
||||
const _wsTable = buildEntityTable(
|
||||
filtered,
|
||||
|
|
@ -304,7 +304,7 @@ display(_filtersForm);
|
|||
## Dependencies
|
||||
|
||||
```js
|
||||
// Build dep cards from the enriched open_workstreams in the summary
|
||||
// Build dep cards from the enriched open_workplans in the summary
|
||||
const wsWithDeps = openWs.filter(w => {
|
||||
const domain = data.find(d => d.id === w.id)?.domain ?? "unknown";
|
||||
return (filters.domain.length === 0 || filters.domain.includes(domain)) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue