igneum/site/api
igneum-labs 870bc4ed33 Home live scene reads the chain, not the window: chain block, shards proven, last lock, live colours, a plain unavailable state
The "LIVE DEVNET" scene on the home page showed blocks 21, proven 0, locked 3 and grey nodes while the devnet stood past
chain block 140,000 with 2,090 shards paid and a checkpoint locking every 30 s. Four causes, all in site/index.html:
- "blocks" was the scene's own spawn counter, never the chain;
- "proven" counted blocks of the 90 s window whose shards were all paid, and proofs land a median 380 s behind the tip
  (median_proof_lag_s), so the window can never hold one;
- "locked" counted locked checkpoint blocks inside the same 90 s window (always about 3);
- the live path skipped the colour state machine, so every real block stayed grey, and a failed first fetch left the
  simulation running under a label that looked live, with no further polls.

Now: /api/live carries state.height (the chain block number, the same field /api/stats reports, one indexed subquery);
the scene's counters read chain block (state.height), shards proven (proving.paid_shards_total, the node's count of paid
shard records, with the 10-minute count and the median lag in the note) and last lock (finality.latest_locked_index);
live blocks take the observer's own words (pending, included, excluded, proven, locked checkpoint, final to its left),
refreshed on every poll, with a legend in those words; the hero tile shows the chain block instead of the node's
held-block count; polling never stops (2 s while fresh, 10 s while off) and the off state is labelled "simulated preview ·
live feed unavailable" or "observer offline, last update N ago" with a note that the counters count simulated blocks.
Also found while verifying: the scene advanced a fixed 16 ms per frame, so it ran at double speed on 120 Hz displays;
it now uses the real frame time, capped at 50 ms.

/live had the same window bug in its "proven 0/16" counter; it now reads the observer's 10-minute truth (chain blocks
with every shard paid, of the chain blocks planned in 10 min) with the lag and the chain total in its title.

Verified against the live API through tools/site-serve.mjs in the built-in browser and headless Chromium:
chain block 140,489, shards proven 2,130, last lock #6,784; the failed-fetch state shown by blocking /api/live.
Screenshots: docs/plans/site-ui-3-shots/item0/ (1440 and 390, live and failed). Checks: identity grep 0 hits,
link check 708 links 0 broken, site/api tests 14 pass, site build clean.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 18:14:05 +00:00
..
_neon.mjs Public stats API: /api/stats and /api/supply, documented with live examples, contract test and a live check 2026-10-05 19:35:40 +00:00
checkpoint.mjs Light client v0: the browser verifies the latest certified checkpoint 2026-10-03 22:21:12 +00:00
explorer.mjs Explorer pages: /explorer, /block/<hash|number>, /address/<addr>, the search router, a local preview server, CI 2026-10-05 19:35:40 +00:00
faucet.mjs Public testnet launch, the public side: dl/public downloads path, site download buttons, HiveOS package, faucet 2026-10-05 15:59:31 +00:00
faucet.test.mjs Public testnet launch, the public side: dl/public downloads path, site download buttons, HiveOS package, faucet 2026-10-05 15:59:31 +00:00
live.mjs Home live scene reads the chain, not the window: chain block, shards proven, last lock, live colours, a plain unavailable state 2026-10-06 18:14:05 +00:00
log.mjs Log intake: accepts LOG_INTAKE_KEY_NEXT during a key rotation (round 4, X23) 2026-10-04 18:25:33 +00:00
public-stats.test.mjs Public stats API: /api/stats and /api/supply, documented with live examples, contract test and a live check 2026-10-05 19:35:40 +00:00
stats.mjs Public stats API: /api/stats and /api/supply, documented with live examples, contract test and a live check 2026-10-05 19:35:40 +00:00
supply.mjs Public stats API: /api/stats and /api/supply, documented with live examples, contract test and a live check 2026-10-05 19:35:40 +00:00