Skip to content

[Frontend] feat(testing-view): highlight measurements that trigger a protection - #686

Open
jeereemiassb wants to merge 2 commits into
new-backendfrom
testing-view/protection-highlight
Open

jeereemiassb wants to merge 2 commits into
new-backendfrom
testing-view/protection-highlight

Conversation

@jeereemiassb

@jeereemiassb jeereemiassb commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What

When the new backend sends protection/update, the measurement that triggered it turns red in the Telemetry tab: red background, red name and a shield icon. It stays like that until the messages are cleared. The trash button in Messages now clears the protections too, and its tooltip says so.

How

  • A protection id is (position << 13) | measurementId, so addProtection keeps the last protection of each measurement under id & 0x1FFF, in activeProtections (messages slice).
  • VariableItem matches a measurement through a new optional Variable.adjId: its numeric ADJ id.

Depends on

Nothing gets highlighted yet, because:

  • The testing-view still reads the old catalog, where a measurement has no numeric id. Once it reads the new adj/DataPackets, VariableItem needs each measurement's numeric id: either fill adjId with it, or, if Variable.id becomes that number, compare against variable.id and drop adjId.
  • protection/update is published by [Backend] feat(backend): payload an websocket modules #680 (backend/websocket), which also points the frontend-kit at the new websocket endpoint.

Notes

  • The new protocol has no recovery ("ok") event, so the highlight is cleared by hand with the clear button.
  • All protections are red. The severity (fault/warning) is only in adj/ProtectionPackets, which this PR doesn't fetch.
  • Possible follow-ups: list protections in Messages, and mark the packet/board header when the measurement is collapsed.

Testing

  • New unit tests for the slice: protection id to measurement, several protections on one measurement, and clearing.
  • pnpm --filter testing-view build and pnpm --filter testing-view test pass locally, and eslint passes on the changed files. The frontend CI doesn't run for PRs into new-backend.
  • Not tried against a running backend: nothing publishes protection/update on this base yet.

Subscribe to protection/update and keep the last protection of each
measurement, keyed by the low 13 bits of the compound protection id.
The measurement row turns red with a shield icon until the messages are
cleared, since the new protocol sends no recovery event.

Measurements are matched by a new optional Variable.adjId (numeric ADJ
id), which the new adj/DataPackets catalog has to fill.
@jeereemiassb
jeereemiassb force-pushed the testing-view/protection-highlight branch from bb788c9 to 3423725 Compare December 3, 2026 19:01

This branch has not been deployed

No deployments
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