feat: add workplan aliases and legacy meter

Adds preferred workplan REST/event surfaces, legacy-meter telemetry and weekly review summaries, documentation/dashboard terminology updates, dashboard API loading fixes, and close-out sync for STATE-WP-0052 and STATE-WP-0054.
This commit is contained in:
2026-06-04 08:25:31 +02:00
parent 355f80b078
commit 166aedfa8d
43 changed files with 1851 additions and 145 deletions

View File

@@ -63,7 +63,7 @@ Current loaders:
| File | API endpoint |
|---|---|
| `summary.json.py` | `/state/summary` |
| `workstreams.json.py` | `/workstreams/` |
| `workstreams.json.py` | `/workplans/` |
| `contributions.json.py` | `/contributions/` |
| `decisions.json.py` | `/decisions/` |
| `domains.json.py` | `/domains/` |
@@ -144,7 +144,7 @@ The dashboard has 30+ pages organised in four navigation groups:
| Page | Route | Purpose |
|---|---|---|
| Workstreams | `/workstreams` | All workstreams with Workstream Health Index |
| Workplans | `/workstreams` | All workplans with Workplan Health Index; route name remains compatibility-backed |
| Decisions | `/decisions` | Decision log with resolve-in-place form |
| Dependencies | `/dependencies` | Dependency graph explorer |
| Extensions | `/extensions` | Extension point registry |
@@ -163,8 +163,11 @@ The dashboard has 30+ pages organised in four navigation groups:
All shared components live in `src/components/` and are imported as ES modules:
### `config.js`
Exports two constants used by every live-polling page:
- `API = "http://127.0.0.1:8000"` — the FastAPI base URL
Exports shared runtime configuration used by every live-polling page:
- `API` — the FastAPI base URL. It defaults to `http://127.0.0.1:8000`
outside the browser, derives from the dashboard host in browser sessions, and
can be overridden with `?api_base=...`, `globalThis.STATE_HUB_API_BASE`, or
`localStorage.stateHubApiBase`.
- `POLL = 15_000` — polling interval in milliseconds
### `entity-modal.js`

View File

@@ -62,7 +62,7 @@ create_dependency(
Via REST:
```bash
curl -X POST http://127.0.0.1:8000/workstreams/<from_id>/dependencies/ \
curl -X POST http://127.0.0.1:8000/workplans/<from_id>/dependencies/ \
-H "Content-Type: application/json" \
-d '{"to_workstream_id": "<to_id>", "description": "..."}'
```

View File

@@ -127,7 +127,7 @@ The Goals page groups everything by domain:
Workstreams carry an optional `repo_goal_id` field. Setting it traces *why* a workstream exists — which specific repo goal it contributes to. This connection is currently recorded in the DB but is not yet visualised in the Workstreams page.
To set the link when creating a workstream via `create_workstream`, pass `repo_goal_id`. To update an existing one, use `PATCH /workstreams/{id}/` with `{"repo_goal_id": "<uuid>"}`.
To set the link when creating a workplan through the preferred API, pass `repo_goal_id`. To update an existing one, use `PATCH /workplans/{id}/` with `{"repo_goal_id": "<uuid>"}`. Legacy `create_workstream` and `/workstreams/{id}/` callers remain compatibility-supported while they are metered.
---

View File

@@ -49,7 +49,7 @@ make api # db + migrate + uvicorn (restarts if already running)
| Page | Endpoints |
|---|---|
| Overview | `/state/summary` |
| Workstreams | `/workstreams/`, `/topics/`, `/state/summary` |
| Workplans | `/workplans/`, `/topics/`, `/state/summary` |
| Decisions | `/decisions/?limit=500`, `/topics/` |
| Progress | `/progress/?limit=500` |

View File

@@ -83,8 +83,8 @@ and summary.
## Data source
Polls `GET /state/summary` every **15 seconds**. The workstream chart also polls
`GET /workstreams/`, `GET /tasks/?limit=2000`, `GET /topics/`, `GET /repos/`,
and `GET /workstreams/workplan-index` for repository grouping, task counts, and
`GET /workplans/`, `GET /tasks/?limit=2000`, `GET /topics/`, `GET /repos/`,
and `GET /workplans/index` for repository grouping, task counts, and
workplan filename tooltips. Blocking decisions are fetched separately via
`GET /decisions/?decision_type=pending` and only re-fetched after a successful
resolve action — this prevents the inline form from being wiped on every poll.

View File

@@ -95,5 +95,5 @@ status group.
Polls every **15 seconds**:
- `GET /tasks/?limit=500`
- `GET /workstreams/`
- `GET /workplans/`
- `GET /topics/`

View File

@@ -64,7 +64,7 @@ to this reference page.
Polls every **15 seconds**:
- `GET /tasks/?limit=500` — all tasks
- `GET /workstreams/` — for domain + title context
- `GET /workplans/` — for domain + title context
- `GET /topics/` — for domain slug resolution
- `GET /contributions/` — for third-party todos

View File

@@ -77,7 +77,7 @@ advance_workstation(entity_type="workstream", entity_id="<uuid>", target_worksta
Direct status patching still exists for bootstrap and compatibility work:
```bash
curl -X PATCH http://127.0.0.1:8000/workstreams/<uuid>/ \
curl -X PATCH http://127.0.0.1:8000/workplans/<uuid>/ \
-H "Content-Type: application/json" \
-d '{"status": "finished"}'
```

View File

@@ -108,7 +108,7 @@ create_workstream(
Via REST:
```bash
curl -X POST http://127.0.0.1:8000/workstreams/ \
curl -X POST http://127.0.0.1:8000/workplans/ \
-H "Content-Type: application/json" \
-d '{"topic_id": "<uuid>", "title": "…", "status": "ready"}'
```

View File

@@ -16,7 +16,7 @@ GET /progress/?event_type=daily_triage&limit=14
Each event carries the report under `detail.report`, with a summary and a list
of recommendations. Candidate values are resolved through
`/workstreams/workplan-index` so file-backed workplans can link to their
`/workplans/index` so file-backed workplans can link to their
workstream detail pages.
## How to read recommendations