Skip to content

Show only the pages that apply: module pages need their module, Logs needs a switch - #2

Merged
Scrypty merged 2 commits into
mainfrom
fix/2026-10-13-hide-mining-without-module
Oct 13, 2026
Merged

Scrypty merged 2 commits into
mainfrom
fix/2026-10-13-hide-mining-without-module

Conversation

@Scrypty

@Scrypty Scrypty commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Four fixes to what the console shows. Sidebar rule: Home, Network and Settings are always there; Logs only when you turn it on; a module's page (Mining) only when that module is installed and on.

1. Module pages need their module. modules_pages is now derived from installed and enabled modules (modules_pages_for: stratum-v2, datum, gridpool give mining). The host has no module store yet, so /api/status sends [] in standalone and managed mode, never the constant ["mining"]. The web fallback (before the first status, or a host that sends nothing) lists Home, Network, Settings. A typed #mining shows the existing module note. The mock sends [] except in the modules scenario.

2. Logs is off by default. New setting show_logs (console.json, /api/settings, /api/status), default false. Settings has a small Console card with Show the Logs page. A typed #logs while it is off shows a note with a button to turn it on. The mock has show_logs=1.

3. Logs page empty on Umbrel (root cause). The Docker image sets RUST_LOG=blvm_ui_next=info for the console, and the node inherited it. The node reads the same variable, and a filter naming only the console's crate silences every node line (reproduced: 0 lines with it, 45 without; in the agent container node.log held only the console's [console] starting ... line). The agent now drops RUST_LOG from the node's environment; Child environment (child_env) can still set one. The tail also now starts with the last 500 lines of node.log (also lines written before the console started) instead of the last 64 KB, and the page asks for 500 on its first request. Verified in Docker (web + agent, Umbrel-style external mode): regtest and a minute of signet show live INFO lines on the Logs page. Tests: tailer (1000-line file gives the last 500 with sequence 1..500, appends follow, partial line held back, truncation handled, internal and external agent), edge sizes (3, 500, 501 lines, with and without a final newline), and a daemon test that the spawned node's stdout and stderr land in node.log immediately and that the console's RUST_LOG is not passed on.

4. Chain size. Upstream blvm (v0.1.60) reports size_on_disk as an estimate of about 1 MB per block, not a measurement (102 GB reported against 12 GB real at 99 000 blocks; "27 GB at 54k Testnet4 blocks" was the same estimate). In managed mode the console now shows the measured size of the network's folder (the cached figure behind managed.networks[].bytes, refreshed about once a minute) and the free space of the volume holding the data root; the node's number is ignored there. Standalone keeps the node's figure, labelled "reported by the node" (disk_used_source). A test checks that the snapshot's disk fields come from the folder even when the node reports a different number.

README documents all four (also the rename of the store repo to commons-umbrel-store that was already in the workspace).

A 0.2.1 release and a re-pin of the store digest follow once this is merged.

🤖 Generated with Claude Code

Scrypty and others added 2 commits October 13, 2026 18:19
…needs a switch

* modules_pages is derived from installed and enabled modules (modules_pages_for); with no module store it is [] in
  both modes. The sidebar fallback (before the first status, or a host that sends nothing) is Home, Network,
  Settings. A typed #mining without a module shows the module note.
* Logs is hidden until the new "Show the Logs page" switch (Settings, Console card; show_logs, default off) is on.
  A typed #logs while it is off shows a note with a button to turn it on.
* Logs page empty on Umbrel: the node inherited the container's RUST_LOG=blvm_ui_next=info, which silences every
  line the node writes. The agent no longer passes RUST_LOG on (child_env still can). The log tail starts with the
  last 500 lines of node.log, including lines written before the console started.
* Chain size in managed mode is the measured size of the network's folder, not the node's size_on_disk (the
  official blvm estimates about 1 MB per block); free space is for the data root's volume. Standalone keeps the
  node's figure, labelled "reported by the node".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nnot break them

Every fixture that starts a node or binds a listener now takes its ports from one
shared helper (agent::testkit::free_port, free_port_pair, isolate): the managed,
installer and http fixtures set Console.p2p_port and an RPC override per network
on free loopback ports, so a node already holding 18443/18444 no longer fails them.
The reaping guard and atexit hook are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Scrypty

Scrypty commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 95396f2: the host tests now run on free ports, so a running node on the machine can no longer break them.

Every fixture that starts a node or binds a listener takes its ports from one shared helper (agent::testkit::free_port, free_port_pair, isolate). The managed, installer and http fixtures set Console.p2p_port and an RPC override per network on free loopback ports. Only test code changed (8 files, all hunks inside test modules).

Verified on a Mac where OrbStack (umbrelOS VM) holds TCP 18444 for the whole run. Before: lib: 255 passed; 18 failed. After, three cargo test runs in a row (private target dir):

  • run 1: lib 273 passed; 0 failed; 1 ignored
  • run 2: lib 273 passed; 0 failed; 1 ignored
  • run 3: lib 273 passed; 0 failed; 1 ignored

pgrep -f fake-blvm and pgrep -f "blvm --network" were empty after each run. cargo build --release --locked is clean.

@Scrypty
Scrypty merged commit 0539f6a into main Oct 13, 2026
1 check passed
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