Files
potato-mesh/web
l5y 7b38f92b2d web: refactor 6/7 node page (#777)
* web: refactor 6/7 node page

* web: address node-page refactor review and close coverage gaps

Fix the concurrency cap in fetchNodeDetailsIntoIndex so it actually
limits in-flight requests.  The previous implementation built each
fetch as an immediately-invoked async IIFE, so all N fetches started
the moment the loop ran; the slicing-then-Promise.all step only
changed when settlement was observed, not when work began.  Replace
the IIFE-then-batch pattern with a worker pool: a fixed-size set of
worker promises iterates a shared queue and only pulls the next
identifier once the previous fetch settles.

Reduce cross-module coupling around the role-aware short-name badge
by extracting renderRoleAwareBadge into a new badge.js module that
single-node-table, messages, detail-html, and traces import directly,
so the neighbour module is no longer pulled in by four non-neighbour
callers.  Tighten applyDetails in role-index.js by hoisting the
ternary into a single key binding and dropping the redundant
instanceof Map guard.

Close the patch-coverage gap reported by Codecov: add tests for
parameter-validation paths in bootstrap (parseReferencePayload,
normalizeNodeReference, fetchNodeDetailHtml, initializeNodeDetailPage),
the worker-pool branches in role-index (no-fetch, empty queue, 404,
non-success responses, and an explicit concurrency-cap assertion),
the badge fallback path, the nested-neighbor seedNeighborRoleIndex
branches, the renderNeighborBadge metadata-merge and short-name
fallback paths, the empty-trace and empty-chart short-circuits, and
single-node-table validation.  All ten node-page submodules now
report 100% line coverage.
2026-05-02 23:05:36 +02:00
..
2026-04-29 10:33:33 +02:00
2026-05-02 23:05:36 +02:00
2026-05-02 22:12:20 +02:00
2026-04-29 10:33:33 +02:00
2025-11-08 10:41:57 +01:00
2025-11-08 10:41:57 +01:00
2026-04-29 10:33:33 +02:00
2026-04-29 10:33:33 +02:00