Files
meshcore-analyzer/scripts/non-unit-tests.json
T
TeTeHackoandClaude Opus 5.5 417c8dd00a feat(observers): latest /neighbors report on the observers list and page (#2270, #2271) (#2300)
Closes #2270, closes #2271.

The ingestor took only the confirmed region scopes out of an observer's
`/neighbors` report (#1865) and dropped the rest. Nothing could
therefore say when an observer last reported, or whom it heard.

## Ingestor

`observer_neighbor_reports` (created in `dbschema.Apply`) keeps the
latest report of each observer, one row per observer, replaced by every
live report.

The report is unauthenticated, so `neighbors[]` is stored sanitised:

- only 64-hex keys
- `snr` and `heard_secs_ago` finite and in range
- `status` limited to `[a-z_]`
- `scopes` clamped
- at most 500 rows

`total_neighbors` is believed only when it is not below the number of
rows that arrived.

A **retained replay** only fills a missing row, and it is dated by the
report's own `timestamp`. After an ingestor restart, a long-dead
observer therefore does not look as if it just reported.

## API

The table is optional for the server (no `AssertReady` change); without
it the fields are simply absent.

- `GET /api/observers`: `neighbors_report_at` and `neighbors_count`,
from one batch query in the existing cached builder.
- `GET /api/observers/{id}`: also `neighbor_report`, which is
`{received_at, reported_at, neighbor_count, queried_neighbors,
self_scopes, self_default_scope, neighbors: [{pubkey, name, role, snr,
heard_secs_ago, status, scopes}]}`. Names and roles come from the node
table in one query.

## Frontend

`public/observer-neighbors.js` is shared by both pages and escapes
everything.

- **#2270, observers list:** a sortable **Neighbors** column, e.g. `3h
ago · 12`, or `—` when the observer never reported. The same value
appears in the slide-over.
- **#2270, observer page:** **Neighbors Report** and **Neighbors** stat
cards.
- **#2271, observer page:** a **Neighbors** table listing each neighbor
by name (a link to the node) or key prefix, with SNR, heard, scope query
status and scopes. The heading says when the list is shorter than the
count, e.g. `(2 of 3 listed)`.

## Tests

- **ingestor:** sanitising, the cap, live replace, the retained rules
(fill only, dated by the report, undated ignored) and the MQTT topic end
to end. The existing #1865 scope tests are unchanged and still pass.
- **server:** the list summary, the detail with names, and both
endpoints without the table.
- **frontend:**
  - unit tests of the helpers
- an XSS case for every rendered field; I checked that it fails when
escaping is removed
- `test-observers-headings` now expects the new column after `Last
Packet`
- **E2E:** `test-observer-neighbors-2270-e2e.js` intercepts the observer
endpoints, since the fixture has no reports. It is listed in
`scripts/non-unit-tests.json` and on shard 2.

Gates that pass:

- `go test -race` in `cmd/server`, `cmd/ingestor` and
`internal/dbschema`
- `sh test-all.sh`
- `eslint@8`, with 0 errors
- the XSS diff gate
- these E2E suites: the new one,
`test-issue-1639-observers-sort-e2e.js`,
`test-observer-iata-1188-e2e.js` and `test-e2e-playwright.js`

Performance: the list adds one primary-key-sized query per cache fill,
and the detail adds two small queries per request.

Also fixes #2330 (folded in from #2337, second commit).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:36:53 +01:00

152 lines
7.7 KiB
JSON

{
"browser": {
"reason": "Requires Playwright and Chromium; most suites also require a running local fixture server via BASE_URL. Existing E2E workflow steps retain their separate setup and selection. Never point these tests at production.",
"files": [
"tests/e2e/test-1110-live-filter.js",
"tests/e2e/test-a11y-axe-1668.js",
"tests/e2e/test-analytics-fluid-charts.js",
"tests/e2e/test-audio-lab-1297-e2e.js",
"tests/e2e/test-audio-live-1297-e2e.js",
"tests/e2e/test-bottom-nav-1061-e2e.js",
"tests/e2e/test-channel-color-picker-e2e.js",
"tests/e2e/test-channel-decrypt-e2e.js",
"tests/e2e/test-channel-fluid-e2e.js",
"tests/e2e/test-channel-issue-1087-e2e.js",
"tests/e2e/test-channel-issue-1111-e2e.js",
"tests/e2e/test-channel-modal-e2e.js",
"tests/e2e/test-channel-qr-e2e.js",
"tests/e2e/test-channels-add-modal-e2e.js",
"tests/e2e/test-channels-list-render-e2e.js",
"tests/e2e/test-channels-selection-flow-e2e.js",
"tests/e2e/test-channels-share-color-e2e.js",
"tests/e2e/test-channels-ws-batch-e2e.js",
"tests/e2e/test-channels-ws-race-1498-e2e.js",
"tests/e2e/test-charts-fluid-1058-e2e.js",
"tests/e2e/test-customize-branding-e2e.js",
"tests/e2e/test-customize-display-e2e.js",
"tests/e2e/test-customize-export-e2e.js",
"tests/e2e/test-customize-theme-e2e.js",
"tests/e2e/test-drag-manager-e2e.js",
"tests/e2e/test-e2e-1267-mobile-vcr.js",
"tests/e2e/test-e2e-playwright.js",
"tests/e2e/test-filter-ux-e2e.js",
"tests/e2e/test-gesture-hints-1065-e2e.js",
"tests/e2e/test-gestures-1062-e2e.js",
"tests/e2e/test-gestures-1185-scroll-discriminator-e2e.js",
"tests/e2e/test-health-status-e2e.js",
"tests/e2e/test-home-coverage-e2e.js",
"tests/e2e/test-hop-path-inference-e2e.js",
"tests/e2e/test-issue-1109-hamburger-dropdown-visible-e2e.js",
"tests/e2e/test-issue-1122-packets-filter-ux-e2e.js",
"tests/e2e/test-issue-1128-multi-viewport-e2e.js",
"tests/e2e/test-issue-1128-packets-layout-e2e.js",
"tests/e2e/test-issue-1136-live-region-e2e.js",
"tests/e2e/test-issue-1146-path-link-contrast-e2e.js",
"tests/e2e/test-issue-1147-section-order-e2e.js",
"tests/e2e/test-issue-1150-404-state-e2e.js",
"tests/e2e/test-issue-1151-orphan-separators-e2e.js",
"tests/e2e/test-issue-1204-live-panel-structure-e2e.js",
"tests/e2e/test-issue-1205-live-controls-anchor-e2e.js",
"tests/e2e/test-issue-1206-resize-observer-leak-e2e.js",
"tests/e2e/test-issue-1206-vcr-overlap-e2e.js",
"tests/e2e/test-issue-1224-channels-mobile-ux-e2e.js",
"tests/e2e/test-issue-1234-live-chrome-pass2-e2e.js",
"tests/e2e/test-issue-1236-map-mobile-e2e.js",
"tests/e2e/test-issue-1244-live-vcr-row-hints-e2e.js",
"tests/e2e/test-issue-1273-qr-overlay-height-e2e.js",
"tests/e2e/test-issue-1274-legend-coverage-e2e.js",
"tests/e2e/test-issue-1279-legend-p2-e2e.js",
"tests/e2e/test-issue-1281-location-row-e2e.js",
"tests/e2e/test-issue-1306-collisions-terminology-e2e.js",
"tests/e2e/test-issue-1329-map-controls-accordion-e2e.js",
"tests/e2e/test-issue-1367-channels-chat-app-e2e.js",
"tests/e2e/test-issue-1374-route-map-a11y-e2e.js",
"tests/e2e/test-issue-1400-nav-vertical-clip.js",
"tests/e2e/test-issue-1413-nav-overlap-e2e.js",
"tests/e2e/test-issue-1486-collapse-reopens-detail-e2e.js",
"tests/e2e/test-issue-1487-byop-modal-layout-e2e.js",
"tests/e2e/test-issue-1510-live-nav-pin-e2e.js",
"tests/e2e/test-issue-1567-corner-clears-drag-e2e.js",
"tests/e2e/test-issue-1599-replay-freeze-e2e.js",
"tests/e2e/test-issue-1630-reach-mobile-e2e.js",
"tests/e2e/test-issue-1268-rf-params-e2e.js",
"tests/e2e/test-issue-1639-observers-sort-e2e.js",
"tests/e2e/test-issue-748-node-analytics-coverage-e2e.js",
"tests/e2e/test-issue-2218-node-analytics-stale-e2e.js",
"tests/e2e/test-issue-661-airtime-e2e.js",
"tests/e2e/test-issue-1640-compare-discovery-e2e.js",
"tests/e2e/test-issue-1648-m1-icons-e2e.js",
"tests/e2e/test-issue-1648-m2-icons-e2e.js",
"tests/e2e/test-issue-1648-m3-icons-e2e.js",
"tests/e2e/test-issue-1648-m4-icons-e2e.js",
"tests/e2e/test-issue-1648-m5-icons-e2e.js",
"tests/e2e/test-issue-1657-analytics-channels-group-sprites-e2e.js",
"tests/e2e/test-issue-1692-packets-init-parallel-e2e.js",
"tests/e2e/test-issue-1705-subpath-contrast-e2e.js",
"tests/e2e/test-issue-1758-ng-filter-rerenders-e2e.js",
"tests/e2e/test-issue-1799-label-vocab-e2e.js",
"tests/e2e/test-issue-1833-legend-toggle-clickable-e2e.js",
"tests/e2e/test-issue-1997-distance-building-e2e.js",
"tests/e2e/test-live-dedup.js",
"tests/e2e/test-live-fullscreen-1572-e2e.js",
"tests/e2e/test-live-layout-1178-1179-e2e.js",
"tests/e2e/test-live-mql-leak-1180-e2e.js",
"tests/e2e/test-live-multibyte-only-e2e.js",
"tests/e2e/test-logo-default-sage-teal-e2e.js",
"tests/e2e/test-logo-pulse-1173-e2e.js",
"tests/e2e/test-logo-rebrand-e2e.js",
"tests/e2e/test-logo-theme-e2e.js",
"tests/e2e/test-map-estimated-e2e.js",
"tests/e2e/test-reported-nodes-e2e.js",
"tests/e2e/test-map-modal-fluid-e2e.js",
"tests/e2e/test-map-nodes-pagination-e2e.js",
"tests/e2e/test-nav-drawer-1064-e2e.js",
"tests/e2e/test-nav-fluid-1055-e2e.js",
"tests/e2e/test-nav-more-floor-1139-e2e.js",
"tests/e2e/test-nav-priority-1102-e2e.js",
"tests/e2e/test-nav-priority-1311-e2e.js",
"tests/e2e/test-nav-priority-1391-e2e.js",
"tests/e2e/test-neighbor-map-btn-clip-e2e.js",
"tests/e2e/test-node-reach-coverage-e2e.js",
"tests/e2e/test-node-reach-e2e.js",
"tests/e2e/test-nodes-export-e2e.js",
"tests/e2e/test-observer-iata-1188-e2e.js",
"tests/e2e/test-observer-detail-ownership-e2e.js",
"tests/e2e/test-packets-compact-columns-e2e.js",
"tests/e2e/test-packets-node-filter-e2e.js",
"tests/e2e/test-packets-scope-column.js",
"tests/e2e/test-path-inspector-coverage-e2e.js",
"tests/e2e/test-rx-coverage-mobile-nav-e2e.js",
"tests/e2e/test-rx-coverage-gaps-e2e.js",
"tests/e2e/test-rx-coverage-noise-e2e.js",
"tests/e2e/test-rx-coverage-viewport-e2e.js",
"tests/e2e/test-show-neighbors.js",
"tests/e2e/test-slideover-1056-e2e.js",
"tests/e2e/test-slideover-1168-munger-e2e.js",
"tests/e2e/test-table-fluid-e2e.js",
"tests/e2e/test-theme-url-param-2236-e2e.js",
"tests/e2e/test-touch-gestures-coverage-e2e.js",
"tests/e2e/test-touch-targets.js",
"tests/e2e/test-user-management-e2e.js"
]
},
"domIntegration": {
"reason": "Requires jsdom. The JS unit gate runs with no node_modules at all (its job has no npm install), so a suite needing a third-party module cannot live in test-all.sh. It runs in the E2E job, which does npm ci, and is invoked by its own deploy.yml line.",
"files": [
"tests/e2e/test-region-quick-picks.js",
"tests/e2e/test-radio-setting-1869-e2e.js",
"tests/e2e/test-observer-neighbors-2270-e2e.js",
"tests/e2e/test-table-sort.js"
]
},
"playwrightRunner": {
"reason": "Requires the @playwright/test runner (not plain node), its configuration, Chromium, and a local server. @playwright/test is not currently declared in package.json; these suites are inventoried but not part of the standalone unit gate.",
"files": [
"tests/e2e/test-issue-1522-trace-url-sync-e2e.js",
"tests/e2e/test-marker-outline-weight.js",
"tests/e2e/test-path-inspector-e2e.js",
"tests/e2e/test-pr-1490-live-map-gpu-animations-e2e.js"
]
}
}