From d318d3ccd128d9feaf030fdc906663dd401b7de5 Mon Sep 17 00:00:00 2001 From: frstrtr Date: Wed, 24 Jun 2026 13:49:27 +0000 Subject: [PATCH] web(d-web): V36 share-version crossing widget on embedded dashboard Surfaces ratchet state at a glance from the existing /v36_status JSON (VOTING/ACTIVATED, vote %, work-weighted signaling, current->target share version) -- the same internal state debug.log uses, never a stub. Charter #3 (crossing visibility): makes the live V35->V36 cross legible to the operator directly in the dashboard, serving LTC prod #288. Static drop-in to the on-disk --dashboard-dir; card defaults hidden and renders only on a successful fetch, so it degrades gracefully on coins or nodes where /v36_status is empty. Non-consensus web layer only. --- web-static/dashboard.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/web-static/dashboard.html b/web-static/dashboard.html index e51a1db38..1c6e57f69 100644 --- a/web-static/dashboard.html +++ b/web-static/dashboard.html @@ -1783,6 +1783,13 @@

๐ŸŒ c2pool Hash Rate

DOA+Orphan: -
Share Difficulty: -
+ + @@ -2880,6 +2887,31 @@

Legend

d3.json('../global_stats', function(d) { _gs = d; _tryRenderStats(); }); d3.json('../merged_stats', function(d) { _ms = d || {}; _tryRenderStats(); }); d3.json('../best_share', function(d) { _bs = d || {}; _tryRenderStats(); }); + d3.json('../v36_status', function(d) { if (d) renderV36Status(d); }); + } + + // V36 crossing widget: maps /v36_status ratchet state to an at-a-glance label. + // Sourced from the same internal state debug.log uses -- never a stub. + function renderV36Status(v) { + var card = document.getElementById('v36_card'); + if (!card) return; + var labels = { + no_transition: 'ACTIVATED', + activating: 'ACTIVATING', + signaling_strong: 'VOTING (strong)', + signaling: 'VOTING', + propagating: 'PROPAGATING', + building_chain: 'BUILDING CHAIN', + waiting: 'WAITING' + }; + card.style.display = ''; + card.classList.toggle('transitioning', !!v.is_transitioning); + d3.select('#v36_status_label').text(labels[v.status] || v.status || '-'); + d3.select('#v36_vote_pct').text(v.overall_v36_vote_pct != null ? v.overall_v36_vote_pct + '%' : '-'); + d3.select('#v36_ww_pct').text(v.sampling_signaling != null ? v.sampling_signaling + '%' : '-'); + d3.select('#v36_share_label').text(v.current_share_name || (v.current_share_type != null ? 'V' + v.current_share_type : '-')); + d3.select('#v36_target_label').text(v.target_version_name || (v.target_version != null ? 'V' + v.target_version : '-')); + d3.select('#v36_msg').text(v.message ? '\u00b7 ' + v.message : ''); } function renderBestShare(bs) {