Skip to content

Ensure that above the fold on the /plan-usage console web ui page, usage for each plan is shown - separate from host #2229

Closed

Description

@JacobStephens2
Screenshot 2026-11-14 at 4 43 00 PM

so one display for claude, codex, grok, agy, and muse - I don't want to have to scroll through the page to see this or to find this for example.

Activity

  1. added
    enhancement
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 14, 2026
  2. JacobStephens2 commented on Nov 14, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Goal. When the Console's Plan usage page (/plan-usage) opens, show one compact summary of Plan usage per subscription Harness: claude, codex, grok, agy and muse. Put it above the fold, before the intro paragraph, the Machine selector and the Machines list. The Day shift should see all five without scrolling or matching up per-host sections. Keep every existing section below it.

    Current behaviour (confirmed by reading the code). src/console/plan_usage.html renders, in order: the title, a long intro paragraph, the Machine selector, a Machines list, then one section.plan-usage-login per Login, each a <dl> of Login, Account, Routes per machine, every Plan window, Credits, Cooldown and Observed rows. group in src/plan_usage/fleet.rs:160 merges rows into one Login only by account identity (Claude organization and email, Codex account id, Muse account label). agy and grok report no account (src/plan_usage/fleet.rs:131), so in a Fleet they get a separate full section for every machine. No summary exists. The five Harnesses come from crate::plan_usage::observation::SUBSCRIPTION (src/plan_usage/observation.rs:104), which the Clear cooldowns selector already uses.

    What to build.

    1. A new section right after .page-title, for example <section aria-labelledby="plan-usage-summary"><h2 id="plan-usage-summary">By Harness</h2>…, built as a compact table or grid. Add a small field to Page in src/console/plan_usage.rs and fill it from the same logins the page already has. No new reads, and no changes to the API or CLI JSON: this only changes the page (ADR 0026's twin is the JSON, which stays the same).
    2. Always show one entry for each of the five subscription Harnesses, in SUBSCRIPTION order. For each Plan window, show its name, a <meter> and N% used, its reset time when ahead, or reset since observed / utilization not reported, matching how the login sections word these. Also show an active Cooldown, Included usage not allowed, Spend control reached, whether any of its routes is limited (availability.limited()), and the age of the observation. A Harness with no observation says nothing observed yet or CLI not on PATH, as the sections do.
    3. No host names in the summary. A Harness with one Login, whether shared across machines or not, shows that Login's state. A Harness with several Logins that have different identities shows one compact sub-row per identity, labelled by identity, never by host. For agy and grok, whose Logins have no identity, show the freshest observation among their per-machine Logins. That's the same freshest-wins rule group uses for shared logins (freshness). The per-machine sections below stay the detailed, authoritative view.
    4. Respect the Machine selector: the summary covers whatever scope the page shows (Fleet, This machine or one machine).
    5. Keep the summary short enough that, at a 1280×720 viewport, the header, nav, title and all five Harness entries are visible without scrolling in a Fleet of three machines. It must still fit a phone width without horizontal overflow; the existing test already checks a phone. Shorten or move the intro paragraph below the summary if needed. Reuse the existing styles in console/ CSS (metrics-*, plan-usage-*) where possible.

    Tests.

    • console/tests/plan-usage.test.cjs: in the Fleet test (shared claude login, pushed agy machine, offline peer), assert the By Harness section lists all five Harnesses, shows the shared claude login's 70% used with no host names, shows agy's freshest window, and has a bounding-box bottom within the viewport at 1280×720. Keep the phone-fit check passing.
    • tests/console/plan_usage.rs: extend the page or parity test so the HTML contains the summary for every subscription Harness and the API JSON is unchanged.
    • Final validation: scripts/affected-tests main. See site/tests/README.md and console/README.md for browser setup.

    Docs (same PR). Update the Console Plan usage paragraph in docs/guide.md (about line 2009, "The Console's Plan usage page…") to describe the per-Harness summary at the top. Regenerate with npm run docs --prefix site and check with npm run docs:check --prefix site. Search site/architecture/index.html (about line 206, Fleet Plan usage grouping) and site/how-it-works/index.html for the page, and add a sentence where they describe it.

    Out of scope. Changing how group merges Logins, the CLI text output of thirdshift plan-usage, routing, and the header warning.

    Limitation. The issue's screenshot was not downloaded for triage, so its exact layout was not inspected. The brief relies on the issue's text and the template.

    ready-for-agent was recommended; ready-for-human is applied until the Day shift permits readiness.

  3. added
    ready-for-human
    ready-for-agent
    in-progress
    and removed
    in-progress
    ready-for-human
    ready-for-agent
    on Nov 14, 2026
  4. removed
    in-progress
    on Nov 18, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions