Skip to content

I3294 — /ui shows usage by provider, model, session, task and issue, and every figure opens its reported events

Extend the observatory's Token Spectrum scene on /ui, read only from the economics capabilities, to group usage by provider, model, session, task and issue, each figure naming its class and age and linking to the events it sums.

BLOCKED wave 4 · p3 · implementation profile · parallel safe

Part of every-sessions-usage-is-observed — What every AI session consumed is observed from the provider, attributed to the work it served, and never estimated into a fact.

Blocked. This issue cannot start until I3293, I3292, I0304 are done. The status is derived from that, not declared.

Objective

Extend the observatory's Token Spectrum scene on /ui, read only from the economics capabilities, to group usage by provider, model, session, task and issue, each figure naming its class and age and linking to the events it sums.

Why

The owner wants consumption visible in the UI immediately; ADR 0135 makes /ui the primary surface and forbids accounting in a renderer. /ui has no economics page; usage is drawn today by the Token Spectrum scene, and usage is runtime state the CI-taken snapshot cannot hold. It extends milestone execution-telemetry. Proposed in ADR 0213 (Usage is observed through each provider's official telemetry into one provider-neutral record, and reported, estimated and billed amounts are never merged) (proposed; it carries no authority until the owner accepts it). Sources: chatgpt-majordomus:c236#7, chatgpt-majordomus:c253#2.

Current state

/ui has no economics page; the observatory's Token Spectrum scene (ui/observatory.rs) draws economics.runs and links to /ui/evidence; nothing draws session usage.

Desired state

A live usage view over the existing stream; the published snapshot, taken where no usage store exists, shows that absence and no usage figures.

Scope

  • docs/MAJORDOMUS_UI.md
  • apps/majordomus-cli/src/live.rs
  • site/content/economics.md
  • apps/majordomus-cli/src/ui/observatory.rs
  • apps/majordomus-cli/tests/observatory.rs
  • apps/majordomus-cli/src/cockpit/pages.rs

Dependencies

Acceptance criteria

  • Every figure links to its events
  • Estimated figures are visibly distinct from reported ones
  • The view computes no sum the capability did not return
  • Usage is drawn by extending the observatory's Token Spectrum scene (ui/observatory.rs), not by a second rendering
  • The published snapshot shows the absence of a usage store and no usage figures (test)
  • /cockpit and site/content/economics.md show the same capability output and compute no sum of their own

Validation

  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test observatory
  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --lib ui::observatory

Evidence required

  • test_ui_usage

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3294.yaml. Read it back with majordomus plan show I3294.

Searches the titles and descriptions of every page this site publishes.