TODAY Widget
The TODAY widget is a pinned dashboard card showing the top NOW tasks selected by the most recent triage run. It is the only morning-ritual UI surface that has shipped.
Where it lives
- Route:
/(the Command Center dashboard). - Render order:
2(pinned near the top, above the rest of the widget grid). - Code:
optimalOS/client/widgets/today.ts:143-251—createTodayWidget(). - Wiring:
optimalOS/client/dashboard.ts:39,42—registerWidget(createTodayWidget()).
What it shows
| Section | Content |
|---|---|
| Header | Last-run timestamp, unconsumed-brief count, Rerank button, Open morning ritual link. |
| NOW grid | Up to 3 cards. Each card shows: rank badge (#1 / #2 / #3), title, track tag, score (2 decimals), due-date pill (if set), expand-reasoning chevron. |
| Reasoning panel | When expanded, shows the model's reasoning plus clash_resolution text if the run produced one. |
| Distribution warning | Prepended above the grid when the most recent run had to auto-demote tasks past a cap. |
If there are no NOW tasks, the widget renders the empty state: "No NOW tasks. Drop a brief and rerank."
The "Open morning ritual" link
The link target /morning is hard-coded in the widget but the /morning page itself is not yet implemented. The link will 404 in the current build. Tracking under the Loom charter (optimalOS/docs/superpowers/specs/2026-04-14-loom-charter.md).
Live refresh
The widget refreshes from four triggers:
- Initial render.
widget.render()callsrefresh(). - Manual rerank. Clicking Rerank posts to
/api/triage/rerunand polls/api/triage/runsevery 2 s until the latest run is no longerrunning. - WebSocket events. The dashboard subscribes to the state hub. When it sees
triage_run_completedortriage_run_failed, it dispatches atriage:updatedCustomEventonwindow(optimalOS/client/dashboard.ts:832-837). The widget listens for that event (optimalOS/client/widgets/today.ts:241-243). - Dashboard-driven. The dashboard can call
widget.refresh()directly when it needs to.
Data source
The widget pulls from GET /api/morning (optimalOS/src/routes/morning.ts:9-39). The endpoint returns:
{
"now": [
{ "task_id": "...", "title": "...", "track": "...", "score": 0.87, "lane": "now", "rank": 1, "reasoning": "...", "clash_resolution": null, "due_at": "..." }
],
"next": [/* up to 10 */],
"latest_run": { "id": 42, "status": "succeeded", "started_at": "...", "completed_at": "...", "distribution_warning": null },
"unconsumed_briefs": 0
}NOW is capped at 10 by the route, but the widget renders only up to the configured triage.max_now (default 3).