Fix: ship /api/plans/:id/activity endpoint

The bug: a437 (2026-08-03) promised this endpoint but the route was never built. SPA called it from 3 places (list mount-time chips, detail activity card, detail linked activity) and all 3 silently 404'd. Every plan card showed … loading forever on the state chip.

The fix (src/mavis-hq.js): shipped the endpoint with the 4-state machine from a437:

The keep_alive carve-out: VPS-timer pings every 60s on every live thread. Without filtering, no plan would ever look paused. The endpoint now:

Response shape:


{ ok, plan_id, computed_state, state_explanation,
  current_step, owner, recent_heartbeats,
  last_finished_bulletin, paused }

Also fixed: SPA mount-time fetch for state chip ran BEFORE c.innerHTML was set, so chips didn't exist in DOM. Moved the forEach to after the innerHTML assignment.

Verification (Playwright iPhone 13, 390x844):

Files touched:

Commits:

Bulletins: