--- title: Suggestions --- ```js import {apiFetch, pollDelay, waitForVisible} from "./components/config.js"; const POLL = 30_000; ``` ```js const sugState = (async function*() { let failures = 0; while (true) { let data = [], ok = false; try { const r = await apiFetch("/suggestions/?rank=wsjf&limit=100"); ok = r.ok; data = ok ? await r.json() : []; } catch {} failures = ok ? 0 : failures + 1; yield {data, ok, ts: new Date()}; await waitForVisible(pollDelay({ok, base: POLL, failures})); } })(); ``` ```js const suggestions = sugState.data ?? []; const _ok = sugState.ok ?? false; const _ts = sugState.ts; ``` # Demand-Weighted Suggestions ```js import {injectTocTop} from "./components/toc-sidebar.js"; import {withDocHelp} from "./components/doc-overlay.js"; const _liveEl = html`
Ranked by WSJF = (base_value + relevance_weight × relevance) / job_size. Gated needs accrue relevance when unmet.
`); display(html`Daily WSJF triage consumes this backlog in its digest.
`); ``` ```js const stageBadge = (stage) => { const colors = { suggestion: "#6b7280", requirement: "#2563eb", promoted: "#059669", declined: "#9ca3af", }; return html`${stage}`; }; const rows = suggestions.map((s) => html`${s.origin_ref}` : ""}| Stage | Title | Domain | Relevance | WSJF | Last requested |
|---|---|---|---|---|---|
| No open suggestions yet. | |||||