Repository navigation
status: Say what pool pace means, render decisions as markdown, add a top summary - #83
Conversation
… top summary The usage rows said "pace 7%" without saying what that was. It is the scheduler's allowance, not the share of the window gone. Each pool now reads "50% used · 8% of week gone · ~636% at reset", worked out from the pool's own reset and window length. Mistral's row shows its $300 calendar-month allowance from the pools file named in `src/github/usage-config.json`. On a phone, labels now wrap instead of overlapping. Decision entries were inserted as plain text, so a task list after a paragraph ran into it. They now go through the existing markdown-it + DOMPurify renderer, which shows task items as ☑/☐. A summary block at the top lists running agents by pool, queued runs, the scheduler's mode and last passes, and each pool's line. It is built only from data the page already reads, so it adds no GitHub request; the Mistral allowance costs one conditional GET, made only when the snapshot has no allowance. Checked the numbers against the issue: OpenAI's 7% allowance matches a reset at 11:52 UTC on 15 Oct (95% target × 7.9% of the week gone), so the window start was right. The data was stale because the usage snapshot had not been republished for over an hour. Per controller.json, tracker's usage.yml (bot-heartbeat) publishes it, and why it stopped can't be seen from this repository. Left undone: - Merge queues and the broker probe are not in the summary, because nothing on the page reads them yet. - Run kind is not shown: runs only carry a title. - No Mistral spend is shown: the publisher must add `mistral.allowance.spent_usd`, or models and prices. Verified: `npm run check` (typecheck, 1574 tests, build) exit 0. Self-review: 1 pass, no blockers. I fixed three important findings: the summary is redrawn only when its text changes, it says when usage is unreadable rather than unpublished, and a 404 on the pools file is not asked for again. Still open: - Tests for the agents-line grouping and cap, `javascript:` URLs in summary links, and markdown edge cases (`- [x]` with no text, escaped `\\[x]`). - Fractional `window_minutes`. - The Mistral summary line ignores the lower-bound estimate marker. - A pool over pace but not held is not marked hot in the summary. Generated-by: AI
|
VERDICT: APPROVE Reviewed admitted head Follow-ups
The new decision-document HTML path remains behind the existing markdown-it/DOMPurify allowlist; summary external links use |
There was a problem hiding this comment.
VERDICT: APPROVE
Reviewed admitted head 5c7c88f1d425fe003b806b59f5352d53a4be490c against merge-base e924610263c84b584ee52e351af81d328636f901 of origin/main. No blockers found by static inspection. No test suites, formatters, linters, or CI results were used.
Follow-ups
-
[important]
src/github/homeview.ts:197-199: Include link destinations in the summary's redraw signature. The signature is onlytextContent. When one run replaces another with the same title (or an agent moves to a new run for the same item), all displayed text can remain identical while the URL changes. The early return then preserves the old run link indefinitely. Include the rendered hrefs or the relevant run identities in the signature while retaining the focus-preservation behavior. -
[important]
src/github/summaryview.ts:85-91: Preserve resource freshness in the top summary. Pool values are rendered without the stale marker used by the detailed usage rows, and the summary does not qualify cached/unavailable usage sources. A stalled publisher can therefore leave the first-screen resource summary showing an old percentage and projection as if current, even while the row below correctly says stale. Carry observation/source freshness into these lines so the summary does not hide this operational warning. -
[important]
src/github/summaryview.ts:91: Preserve the lower-bound marker on estimated Mistral spend. For an allowance estimated from only some models,lowerBoundmeans the actual spend can be arbitrarily higher than the displayed value. This line converts that to an ordinaryest.amount, whereasmistralRowcorrectly renders≥ ~. Keep that distinction in the summary too; otherwise an incomplete accounting snapshot can appear comfortably below the allowance when it is not.
The new decision-document HTML path remains behind the existing markdown-it/DOMPurify allowlist; summary external links use safeHref, and the new allowance request is constrained to a validated GitHub API repository/content path. No workflow, merge-policy, or permission files changed.
The usage rows said "pace 7%" without saying what that was. It is the scheduler's allowance, not the share of the window gone. Each pool now reads "50% used · 8% of week gone · ~636% at reset", worked out from the pool's own reset and window length. Mistral's row shows its $300 calendar-month allowance from the pools file named in
src/github/usage-config.json. On a phone, labels now wrap instead of overlapping. Decision entries were inserted as plain text, so a task list after a paragraph ran into it. They now go through the existing markdown-it + DOMPurify renderer, which shows task items as ☑/☐. A summary block at the top lists running agents by pool, queued runs, the scheduler's mode and last passes, and each pool's line. It is built only from data the page already reads, so it adds no GitHub request; the Mistral allowance costs one conditional GET, made only when the snapshot has no allowance.Checked the numbers against the issue: OpenAI's 7% allowance matches a reset at 11:52 UTC on 15 Oct (95% target × 7.9% of the week gone), so the window start was right. The data was stale because the usage snapshot had not been republished for over an hour. Per controller.json, tracker's usage.yml (bot-heartbeat) publishes it, and why it stopped can't be seen from this repository.
Left undone:
mistral.allowance.spent_usd, or models and prices.Verified:
npm run check(typecheck, 1574 tests, build) exit 0.Self-review: 1 pass, no blockers. I fixed three important findings: the summary is redrawn only when its text changes, it says when usage is unreadable rather than unpublished, and a 404 on the pools file is not asked for again. Still open:
javascript:URLs in summary links, and markdown edge cases (- [x]with no text, escaped\\[x]).window_minutes.