Skip to content

feat(ext): show the running dig-node version + out-of-date badge#136

Merged
MichaelTaylor3d merged 2 commits into
mainfrom
feat/583-node-version-outofdate
Jul 14, 2026
Merged

feat(ext): show the running dig-node version + out-of-date badge#136
MichaelTaylor3d merged 2 commits into
mainfrom
feat/583-node-version-outofdate

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Node version section to the fullscreen Updates tab, rendered unconditionally above the beacon panel (no pairing needed) — clearly labeled + visually distinct from the existing "Beacon vX.Y.Z" line, so a user can never conflate the running dig-node build with the dig-updater/beacon build.
  • The running version reuses the extension's existing getNodeLiveStatus WS status (#239) as ground truth — the same live signal the popup's connection pill already reads (state, version), independent of beacon health. No new SW plumbing was needed (see the "already-shipped check" realization below).
  • The latest-available version is read from the public update-feed manifest (https://updates.dig.net/v1/alpha/manifest.json), fetched directly over HTTPS via a new feedManifestApi RTK Query slice (mirrors priceApi.ts/catMetadataApi.ts — no CSP change needed, https://*.dig.net already covers the host).
  • A tolerant semver compare (src/lib/node-version.ts) drives an honest four-state badge: Up to date / Update available — vX.Y.Z / Node offline / Couldn't check for updates — never a false "up to date" when the node is disconnected or the feed can't be read.
  • All new copy ships across the 14 supported locales (react-intl, completeness-gate-clean).

Blast radius checked (gitnexus/socraticode)

  • UpdatesTab.tsx (adds <NodeVersionSection />, no change to UpdaterPanel/UpdaterStatusGate).
  • src/app/store.ts (registers the new feedManifestApi reducer/middleware, mirroring the existing priceApi/catMetadataApi/feeApi direct-HTTPS slices).
  • Reused, unmodified: nodeApi.ts / getNodeLiveStatus (#239), StatusPill, FourState patterns.
  • No dig-node changes; no wire/API contract changed (both consumed endpoints — getNodeLiveStatus and the public feed manifest — already exist).

Realizations / follow-ups

  • Duplicate-plumbing catch: the issue's suggested /version HTTP fetch would have DUPLICATED the extension's existing getNodeLiveStatus WS status (#239), which already carries the node's own version field with no pairing required. Reused it instead — logged in DEVELOPMENT_LOG.md as a durable "check for an existing live signal before wiring a new one" lesson.
  • dig-node coherence (non-blocking, not done here): a stable control.info-style field name (vs. today's version on both /health-style status AND control.status) would reduce the "which version is this" ambiguity that caused #583 in the first place — worth a small dig-node-side naming pass in a follow-up, but not required (today's getNodeLiveStatus.version is already clean ground truth).
  • docs.dig.net: the whole Updates/beacon tab (#516) isn't documented on docs.dig.net yet — pre-existing gap from #516, out of scope here; flagging so it's tracked (not silently dropped).
  • Nice-to-have not done: a "jump to Check now" affordance when out-of-date — the core ask (version + badge) is covered; the existing Check-now button remains one scroll away in the paired beacon panel.

Test plan

  • Unit: src/lib/node-version.test.ts (semver compare + badge-state matrix, 15 tests)
  • Unit: src/lib/feed-manifest.test.ts (parse + fetch, 9 tests)
  • Unit: src/features/updates/feedManifestApi.test.ts (RTK Query endpoint, 3 tests)
  • Unit: src/features/updates/NodeVersionSection.test.tsx (4 states: offline / feed-unreachable / up-to-date / update-available)
  • Extended UpdatesTab.test.tsx (+1 integration test proving the node version and beacon version render distinctly)
  • Full suite green: npm run typecheck clean, npm run lint 0 errors, npm run test:node 32/32, npx vitest run --coverage 253 files / 2602 tests passed, overall coverage 96.23% lines (repo floor 80%)
  • Playwright e2e (built app.html, real bundle): e2e/updates-tab.spec.ts extended with getNodeLiveStatus + a routed feed-manifest response — 8/8 passing, covering up-to-date, update-available, node-offline, and feed-unreachable
  • Screenshots (desktop + mobile) inspected: fullscreen-updates.png, mobile-updates.png, updates-node-outdated.png, updates-not-installed.png

Version bump

feat: → minor: 1.99.11.100.0 (new capability, no breaking change).

Co-Authored-By: Claude noreply@anthropic.com

The Updates tab showed only the dig-updater/beacon version (`control.updater.status`),
easily conflated with the node's own build. Add a NodeVersionSection that renders
unconditionally above the beacon panel (no pairing needed):

- The running dig-node version reuses the existing `getNodeLiveStatus` WS status (#239)
  as ground truth — no new SW plumbing, since that live signal already carries the
  node's own reported `version`, independent of beacon health.
- The latest-available version comes from the public update-feed manifest
  (updates.dig.net/v1/alpha/manifest.json), read via a new direct-HTTPS RTK Query
  slice (feedManifestApi.ts, mirroring priceApi.ts) — no CSP change needed
  (https://*.dig.net already covers the host).
- A tolerant semver compare (src/lib/node-version.ts) drives an honest four-state
  badge: upToDate / updateAvailable (names the version) / nodeOffline / feedUnreachable
  — never a false "up to date" when the node is down or the feed can't be read.

All new copy ships across the 14 supported locales. Minor bump (new capability, no
breaking change): 1.99.1 -> 1.100.0.

Closes #583

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread serve-dist.js
if (req.url === '/') filePath = path.join(DIR, 'popup.html');
if (!filePath.startsWith(DIR)) filePath = path.join(DIR, 'popup.html');

fs.stat(filePath, (err, stat) => {
Comment thread serve-dist.js
filePath = path.join(filePath, 'index.html');
}

fs.readFile(filePath, (err, content) => {
…formed version

FIX 1: The feedManifestApi.test.ts makeStore() was missing the autoBatch:{type:'tick'} enhancer override that src/app/store.ts requires to prevent jsdom teardown flakes. Reused the same config.

FIX 2: Regenerated screenshots (fullscreen-updates.png, mobile-updates.png, updates-node-outdated.png) to show v1.100.0.

FIX 3: Added hasValidVersionFormat() guard in nodeVersionBadge() to reject malformed feed versions (e.g. "invalid"). Prevents false "up to date" from garbage feed entries. Now returns feedUnreachable state instead. Added test.

All 253 test files + 2603 tests green, no teardown flakes. Coverage: 96.23%.

Co-Authored-By: Claude <noreply@anthropic.com>
@MichaelTaylor3d MichaelTaylor3d force-pushed the feat/583-node-version-outofdate branch from 644a819 to ede796f Compare July 14, 2026 16:01
@MichaelTaylor3d MichaelTaylor3d marked this pull request as ready for review July 14, 2026 16:08
@MichaelTaylor3d MichaelTaylor3d merged commit 43658d6 into main Jul 14, 2026
7 of 8 checks passed
@MichaelTaylor3d MichaelTaylor3d deleted the feat/583-node-version-outofdate branch July 14, 2026 16:08
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.

2 participants