Files
meshcore-analyzer/cmd/server
bc92b8b5c9 fix: restore color-coded hex breakdown in packet detail (#329)
The buildBreakdown function was never ported when the Go backend replaced
Node.js. The server has returned breakdown:{} since the Go migration,
causing createColoredHexDump() and buildHexLegend() to render everything
as monochrome.

- Add BuildBreakdown() to decoder.go: computes labeled byte ranges for
  Header, Transport Codes, Path Length, Path, and Payload sections.
  ADVERT payloads are further broken down into PubKey, Timestamp,
  Signature, Flags, Latitude, Longitude, and Name sub-ranges.
- Wire into handlePacketDetail in routes.go (was struct{}{}).
- Update PacketDetailResponse.Breakdown from interface{} to *Breakdown.
- Add per-section CSS classes (section-header/transport/path/payload) to
  sectionRow() in packets.js so the field breakdown table also carries
  distinct background tints per section.
- Add matching CSS rules in style.css.
- 8 new tests covering all section types, transport routes, zero-hop
  packets, and ADVERT sub-fields (location, name).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 23:42:41 +00:00
..