Skip to content

Tracer: Overview token totals and seven-day usage trend #709

Closed

Description

@DoodleBears

Parent and scope

Parent #541; related #126. This is the next Overview tracer after #705/#706.

Observable behavior

In Activity Center → Overview → Statistics, the Human sees today's reported token total across PersonaBots and a per-Bot breakdown, then switches to the last seven Host-local calendar days to inspect the trend. Bot activity state never filters reported statistics: idle Bots with usage in the selected period remain included; a period with no recorded calls has no per-Bot usage rows. Retained usage from Bots no longer in the current Registry is included and labeled; current names resolve from Registry and other rows retain the stable Bot ID. The top action/work area and message unread are unchanged.

Implementation

  • Reuse the canonical Usage daily projection and explicit Session ownership from Usage read model / Typert remote / Profile contract #39 / ADR-0094. Aggregate observed Orchestrator, Assignment and Subagent attempts, all actual providers/models, exactly once. No costs or Channel token attribution.
  • Add a bounded read-only Usage summary through the existing Host Bridge / Typert Remote / API Gateway: global totals and daily series independent of per-Bot pagination, with current names resolved by Registry. The browser never reads Session logs or database tables.
  • Keep reported input, output, cache-read and cache-write buckets and totals nullable. Missing provider reports, reconciling/degraded state and legacy baseline are explicit; unknown never becomes zero. A genuinely empty ready interval can show zero.
  • Default today; seven-day mode includes today plus six earlier Host-local dates. Reuse the existing TanStack UsageChart/theme, native controls, numeric daily and Bot detail, and the existing Statistics disclosure. Bot detail opens its PersonaBot Profile.
  • Manual refresh and bounded polling update settled usage; late source corrections and restart use the same retained projection. Dispose polling on leaving the view.

Acceptance / testing

  • Today/seven-day global total and paginated per-Bot rows agree with the canonical Profile usage query; all-time history does not leak into the selected range.
  • Unknown buckets/totals and unavailable/degraded states stay explicit; fresh zero differs from unavailable. No truncation/page can falsify global totals.
  • Native switch/refresh, real TanStack chart and Profile navigation work without answering requests or changing read receipts.
  • Focused owning Usage / public Host Bridge and mounted Client coverage exercises multiple Bots, roles/routes, local date boundaries, paging, duplicate/late source facts, stale queries and cleanup.
  • A real DSH model reply produces usage visible in Overview and matching Profile. Capture desktop/narrow light/dark screenshots, verify a subsequent model reply and restart, include evidence in one PR, then await Human QA.

Memory activity is a separate follow-up tracer. No new usage persistence, monetary estimate, provider route policy, or wake semantics.

Activity

  1. added this to the v1.1 milestone on Oct 2, 2026
  2. added
    ready-for-agentFully specified, ready for an AFK agent
    area:ui-uxInteraction and visual experience; may accompany a code-layer area
    area:fullstackEnd-to-end Host and Client implementation
    feature:inboxBot Inbox and Human Inbox attention
    scope:tracerHuman-testable implementation slice
    on Oct 2, 2026
  3. DoodleBears commented on Oct 2, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Codex
    • Task: codex/local/01a0f083-4337-71d2-8639-dec84699b8d9 (not a DSH Session)
    • Issue scope: Tracer: Overview token totals and seven-day usage trend #709 — Overview today/seven-day observed Usage summary and per-Bot breakdown, canonical owner/public Bridge/native Client, one PR with real model E2E/screenshots then Human QA.
    • Branch: codex/overview-usage-seven-days
    • Started: 2026-10-02 10:20 UTC
    • State: active
  4. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 2, 2026
  5. DoodleBears commented on Oct 2, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

  6. added and removed
    ready-for-agentFully specified, ready for an AFK agent
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 2, 2026
  7. DoodleBears commented on Oct 2, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — Human QA follow-up

  8. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    and removed on Oct 2, 2026
  9. DoodleBears commented on Oct 2, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome — Human QA compact alignment

    • Agent: Codex
    • Task: codex/local/01a0f083-4337-71d2-8639-dec84699b8d9 (not a DSH Session)
    • State: paused — awaiting Human QA
    • PR: feat: Overview token totals and seven-day usage (#709) #711; final head 02314ed4819f017df5e182e02b68d0998c0f15de, includes main feat(activity): show Provider-declared public tool detail #710.
    • Implemented Human feedback: shared PersonaBot Channel Profile card, total typography, compact grouping/icon controls, daily and per-Bot stacked charts, tooltip measures and collapsed exact daily bucket table.
    • Real browser measurements match Profile: 15px total, 12px 14px card padding, 128px daily chart. Light/dark and 420px views passed with no document overflow; actual Profile navigation and unchanged unread were verified.
    • Cross-midnight evidence: Today=0 and Last 7 days=142,268, agreeing with both canonical Profiles; idle Bots with reported usage remain in the seven-day breakdown.
    • 50 affected tests, independent Standards/Spec review and real E2E passed. Final complete Linux CI: https://github.com/BotHarness/BotHarness/actions/runs/37035577269
    • CodeRabbit completed full review on compact UI head 963b87d4; its one minor evidence-name comment is addressed by the explicit capture/public-name copy mapping and the thread is resolved. Final 02314ed4 is evidence-only; no claim of a new full review of that documentation delta.
    • Updated actual screenshots and reproduction mapping are included in the PR. It remains unmerged pending Human QA.
  10. added and removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 2, 2026
  11. DoodleBears commented on Oct 2, 2026

    @DoodleBears
    ContributorAuthor

    Completed: PR #711 merged as a86e1f9 after Human QA. Compact Token usage now follows the PersonaBot Profile pattern, with real DSH E2E evidence and passing CI. Agent task: codex/local/01a0f083-4337-71d2-8639-dec84699b8d9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fullstackEnd-to-end Host and Client implementationarea:ui-uxInteraction and visual experience; may accompany a code-layer areafeature:inboxBot Inbox and Human Inbox attentionready-for-humanRequires human implementationscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions