Repository navigation
Add an Energy page to the console - #4
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Virgile-pct
force-pushed
the
feat/price-floor
branch
from
October 29, 2026 13:52
32c2af2 to
23d717a
Compare
Virgile-pct
force-pushed
the
feat/energy-page
branch
from
October 29, 2026 13:52
f7b8b02 to
6af38e7
Compare
Virgile-pct
force-pushed
the
feat/price-floor
branch
from
October 29, 2026 15:14
23d717a to
4c1aeea
Compare
Virgile-pct
force-pushed
the
feat/energy-page
branch
2 times, most recently
from
October 29, 2026 15:24
244ecb2 to
0fa169d
Compare
The plugin now declares a web UI page. bundle/energy.js reads this plugin's snapshot from /api/status every 5 s and shows the board power, the idle draw, both energy rates, the costs when a price is set, and the last 10 minutes of board power as an SVG line. The snapshot gains watts, the last reading. Release archives ship plugin-manifest.json, generated from the binary with --print-package-manifest, and bundle/. A test fails when the checked-in manifest and the binary disagree, and the release smoke compares them again on each packaged archive.
The console already titles a plugin page with its label.
The smoke step held a raw carriage return inside tr -d '...', which ended the run: block and made release.yml invalid. It now says '\r'. The page polls with a timer set after each answer, gives a request up after one interval, aborts it on unmount, and only appends a newer reading to the power line.
Virgile-pct
force-pushed
the
feat/energy-page
branch
from
October 29, 2026 15:36
0fa169d to
a38e685
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an Energy page to the node's console, through the plugin web UI contract (
web_uipage plus a local bundle).bundle/energy.jsreadsplugins.powermetrics-pluginfrom/api/statusevery 5 s and shows the board power now, the idle draw, both energy rates, the two costs when a price is set (Report the cost per million output tokens from an electricity price #3), the measured tokens and time, and the last 10 minutes of board power as an SVG line against the idle draw. It keeps nothing and stops polling on unmount.watts, the last reading, so the page can draw it.plugin-manifest.jsonis generated from the binary (--print-package-manifest) and checked in, like the web UI exemplar'splugin.package.json. A unit test fails when it and the binary disagree, and the release smoke compares them again on every packaged archive.scripts/package.pyshipsplugin-manifest.jsonandbundle/; its tests check both.Checked locally: fmt, clippy
-D warnings, 28 Rust tests, the packaging tests, and the page rendered in a harness with a fake host and status feed (cards, costs in EUR, the power line, no console errors, unmount clears the page).End to end on Windows (RTX 4070 Ti, Qwen3-8B Q4_K_M, a main build with the console compiled in):
mesh-llm plugins install --archivetook the packaged zip, the console shows an Energy tab, and the page there showed 0.47 Wh per 1,000 tokens over a 15 W idle draw, so 0.096 EUR per million tokens at 0.2016 EUR/kWh, with the request peaks around 190 W on the power line. The page leaves its title to the console, which already shows the page label.