Command center polish: Spend reason, header

Task 11805 · Done · Coder · created · updated

Defects in the delivered command center (epic 11717). They were seen by Task 11760 and filed only as draft #11803, which sits outside this epic and will not dispatch. This task replaces it: delete draft #11803 when this one merges. Reproduction (Task 11759 report screenshots at 1280px and 375px, and Task 11760's local stack and live eval): 1. In the overview strip, the Spend tile shows a bare "—" with no visible reason. The Worst health tile shows its reason caption. Cause: `apps/web/src/pages/command-center/OverviewStrip.tsx:58` renders spend through `KpiTile` with no caption. `WorstHealth` passes `withCaption` to `MissingValue` (line 44). 2. At 1280px, the onboarding "Set up your company" card (fixed, top-right) covers the right side of the command center header, where Ask Jarvis and the Jarvis view's "Command center" button sit. 3. The live Jarvis model (Haiku default) writes `**bold**` in company briefs. The Help panel renders no markdown, so the asterisks show literally. Cause: `apps/api/app/support_agent/links.py:75` `sanitize` keeps `**`/`__`. Fix (no new surface): - When a KpiTile metric is missing, show the MissingValue reason caption, matching the Worst health tile. Prefer the existing `withCaption` path. If KpiTile is shared, the Operator dashboard should look the same. - Keep the onboarding card off the page header's actions at ≥1280px. Dock it below the header, or reserve its width in the main column. - Strip markdown emphasis (`**`, `__`) in `links.sanitize` before a reply is stored. Also add "no asterisks" to the prompt's plain-text rule. Acceptance: - AC1: a missing Spend metric shows its reason as visible text (vitest on OverviewStrip). - AC2: at 1280px, the onboarding card's bounding box does not intersect the command center header's action buttons (Playwright bbox assertion in `apps/web/e2e/command-center.spec.ts`, with a screenshot). - AC3: `sanitize("**Moved:** x", …)` returns "Moved: x" (pytest), and a stored Jarvis reply never contains literal `**`. Out of scope: the exec API figures, Jarvis tools, the Operator dashboard's behaviour and tabs (except the shared tile caption), the onboarding checklist's content. Done means: - vitest for AC1 green; e2e for AC2 green with the screenshot attached to the PR; pytest for AC3 green. - `./dc check quick` green; the merge lane's `./dc check full` green; draft #11803 deleted.

Outcome

Empty KPI tiles (Spend) show their reason; Jarvis replies stored without **/__; e2e pins onboarding card clear of header at 1280px. Quick gate green; PR #7485 queued in lane. Draft #11803 needs operator delete (not mine to delete). Memory: none applied.

Pull request

Artifacts

Activity

  • Ready
  • Runner started
  • Runner ended (done)