Skip to content

feat(OMN-20752): the Overview shows Baseline spend from the served counterfactual - #375

Merged
jake-b-omni merged 1 commit into
devfrom
jake/omn-20752-baseline-spend
Oct 8, 2026
Merged

jake-b-omni merged 1 commit into
devfrom
jake/omn-20752-baseline-spend

Conversation

@jake-b-omni

@jake-b-omni jake-b-omni commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The OMN-20223 walk on 2026-10-08 found no Baseline spend figure on the Overview. The mockup shows it beside Actual spend and Verified savings, and the figure is already served: the same metering-summary.v1 all-time row that the Spend and Savings cards read carries counterfactual_usd, the number onex metering --json reports (0.015292 in the walk).

Change. A Baseline spend metric card binds counterfactual_usd from that row through the existing MeteringTotalCard path. It reads the same all-time row as Spend and Savings, so the three figures cannot disagree.

  • required_fields match the Savings card's: baseline_model, pricing_manifest_version and baseline_state. So the card is captioned with the row's baseline model and pricing manifest, plus the "Modelled" note.
  • An unresolved baseline renders Baseline unresolved, never $0, even when the row serves 0.
  • Layout: the free slot at row 8, col 8, beside Run locally and Avg saving / call. The headline row is full, and reflowing it would move every panel the walk's screenshots compare.

Release. 1.1.5 → 1.1.6 (project-level lockfile fields only) with a CHANGELOG entry, so onex dashboard can pin a bundle that carries the card.

Tests. src/pages/LocalDashboardPage.omn20752.test.tsx (7) renders the Overview with the walk's all-time row. All 7 fail without the card.

  • B1: the card shows $0.0153, and a different served amount shows that amount.
  • B2: an unresolved baseline shows "Baseline unresolved" and never $0, whether counterfactual_usd is null or served as 0.
  • B3: the caption names the baseline model, the pricing manifest and "Modelled".
  • B4: no row shows a typed "Not measured", with no digits.
  • B5: a day row's counterfactual is not the headline.

pages.test.ts gains counterfactual_usd in the Overview's metric keys. The lab catalogue already lists that column for metering-summary.v1. Full vitest: 2174 passed, 15 skipped. tsc and eslint are clean.

Evidence-Source: OCC#13354
Evidence-Ticket: OMN-20752

🤖 Generated with Claude Code

…unterfactual

The walk found no Baseline spend on the Overview, though the mockup shows
it beside Actual spend and Savings and the figure is served: the same
metering-summary.v1 all-time row the Spend and Savings cards read carries
counterfactual_usd, the number `onex metering --json` reports.

A Baseline spend card now binds that column, with the row's baseline
model and pricing manifest as its caption. It requires baseline_state, so
an unresolved baseline renders Baseline unresolved, never $0, even when
the row serves 0.

Bumps to 1.1.6 so onex dashboard can pin a bundle that carries it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jake-b-omni
jake-b-omni enabled auto-merge (squash) October 8, 2026 21:33
@onexbot-occ-writer

Copy link
Copy Markdown
Contributor

OCC autobind did not mint a companion for this PR: no changed-file candidate could be proven RED against the merge base, and emitting a PR-existence probe instead would be non-falsifiable evidence (OMN-15247). Hand-authored evidence is required.

Considered 7 changed file(s):

  • CHANGELOG.md: release-line source, but the diff also changes a path that is not a release artefact, so release lines are not offered
  • package-lock.json: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)
  • package.json: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)
  • src/pages/LocalDashboardPage.omn20752.test.tsx: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)
  • src/pages/local/overview.contracts.yaml: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)
  • src/pages/local/overview.page.yaml: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)
  • src/pages/local/pages.test.ts: no candidate grammar reads this file type (only Python declarations, uv.lock lines, release-artefact lines and contract-pin lines are proposed)

This verdict is occ-autobind's, derived from this head and its merge base alone. A second producer, the occ-companion-effect backstop, consumes its own command on the lab bus and may still mint a companion under the generic binding. Whether it does depends on that consumer running, not on this diff (OMN-18876).

@jake-b-omni
jake-b-omni merged commit 56cebf5 into dev Oct 8, 2026
44 of 48 checks passed
@jake-b-omni
jake-b-omni deleted the jake/omn-20752-baseline-spend branch October 8, 2026 22:17
jake-b-omni pushed a commit that referenced this pull request Oct 9, 2026
… Runs table and the merged pages

The scroll test asserted the Runs table scrolls sideways, the behaviour
OMN-20759 removes; it now asserts the table needs no sideways scroll. Two
stale expectations from merged work also failed this spec on dev: per-run
cost prints $0.0004 since #376, and Savings and Baseline spend (#375) both
carry the baseline caption and modelled note. The e2e suite is not in CI,
so neither break was caught when it merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jake-b-omni added a commit that referenced this pull request Oct 9, 2026
…440x900 (#379)

* fix(OMN-20759): the Runs and Recent runs tables fit their panels at 1440x900

The OMN-20223 re-walk found both run tables wider than their panels at 1440:
Runs (17 columns) scrolled sideways with Host clipped, and the Overview's
Recent runs clipped the Run id. Runs had no fit treatment at all, and Recent
runs gave the run id and timestamp a 9ch floor while the host, a 33-character
token with no break opportunity, could not wrap.

Both tables now use the fit wrapper. Run id, time, model, backend and host may
break inside themselves; every other cell still wraps at spaces, and no column
is dropped. A Playwright check at 1440x900 asserts each table's scrollWidth
fits its container, no cell is clipped and every header is present; it fails
on dev with 1230 px and 82 px of overflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(OMN-20759): bump to 1.1.9 so onex dashboard can pin the table fit

#378 (OMN-20758) took 1.1.8 first, so the table fit releases as 1.1.9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(OMN-20759): the local dashboard contract spec matches the fitted Runs table and the merged pages

The scroll test asserted the Runs table scrolls sideways, the behaviour
OMN-20759 removes; it now asserts the table needs no sideways scroll. Two
stale expectations from merged work also failed this spec on dev: per-run
cost prints $0.0004 since #376, and Savings and Baseline spend (#375) both
carry the baseline caption and modelled note. The e2e suite is not in CI,
so neither break was caught when it merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Jake Brower <jake@bodegalogic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant