You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ensure that above the fold on the /plan-usage console web ui page, usage for each plan is shown - separate from host #2229
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.
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).
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.
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.
Respect the Machine selector: the summary covers whatever scope the page shows (Fleet, This machine or one machine).
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.
Activity
JacobStephens2 commentedon Nov 14, 2026
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,agyandmuse. 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.htmlrenders, in order: the title, a long intro paragraph, the Machine selector, a Machines list, then onesection.plan-usage-loginper Login, each a<dl>of Login, Account, Routes per machine, every Plan window, Credits, Cooldown and Observed rows.groupinsrc/plan_usage/fleet.rs:160merges rows into one Login only by account identity (Claude organization and email, Codex account id, Muse account label).agyandgrokreport 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 fromcrate::plan_usage::observation::SUBSCRIPTION(src/plan_usage/observation.rs:104), which the Clear cooldowns selector already uses.What to build.
.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 toPageinsrc/console/plan_usage.rsand fill it from the sameloginsthe 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).SUBSCRIPTIONorder. For each Plan window, show its name, a<meter>andN% used, its reset time when ahead, orreset 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 saysnothing observed yetorCLI not on PATH, as the sections do.agyandgrok, whose Logins have no identity, show the freshest observation among their per-machine Logins. That's the same freshest-wins rulegroupuses for shared logins (freshness). The per-machine sections below stay the detailed, authoritative view.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 theBy Harnesssection lists all five Harnesses, shows the shared claude login's70% usedwith 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.scripts/affected-tests main. Seesite/tests/README.mdandconsole/README.mdfor 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 withnpm run docs --prefix siteand check withnpm run docs:check --prefix site. Searchsite/architecture/index.html(about line 206, Fleet Plan usage grouping) andsite/how-it-works/index.htmlfor the page, and add a sentence where they describe it.Out of scope. Changing how
groupmerges Logins, the CLI text output ofthirdshift 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.
Show Plan usage by Harness above machine details (JacobStephens2#2229)