Skip to content

Add an Energy page to the console - #4

Merged
Virgile-pct merged 3 commits into
mainfrom
feat/energy-page
Oct 29, 2026
Merged

Virgile-pct merged 3 commits into
mainfrom
feat/energy-page

Conversation

@Virgile-pct

@Virgile-pct Virgile-pct commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Adds an Energy page to the node's console, through the plugin web UI contract (web_ui page plus a local bundle).

  • bundle/energy.js reads plugins.powermetrics-plugin from /api/status every 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.
  • The snapshot gains watts, the last reading, so the page can draw it.
  • plugin-manifest.json is generated from the binary (--print-package-manifest) and checked in, like the web UI exemplar's plugin.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.py ships plugin-manifest.json and bundle/; 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 --archive took 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.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a6b4518-ac06-4186-9ce9-13320075c49b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Virgile-pct
Virgile-pct force-pushed the feat/energy-page branch 2 times, most recently from 244ecb2 to 0fa169d Compare October 29, 2026 15:24
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
Virgile-pct changed the base branch from feat/price-floor to main October 29, 2026 15:36
@Virgile-pct
Virgile-pct merged commit c3bae8e into main Oct 29, 2026
9 checks passed
@Virgile-pct
Virgile-pct deleted the feat/energy-page branch October 30, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant