Skip to content

frontend: Discard tray MAVLink listeners on destroy - #4033

Closed
joaoantoniocardoso wants to merge 1 commit into
masterfrom
pr/tray-mavlink-listener-discard
Closed

frontend: Discard tray MAVLink listeners on destroy#4033
joaoantoniocardoso wants to merge 1 commit into
masterfrom
pr/tray-mavlink-listener-discard

Conversation

@joaoantoniocardoso

@joaoantoniocardoso joaoantoniocardoso commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • HealthTray HEARTBEAT and GpsTrayMenu GPS listeners are stored with markRaw and discard()ed in beforeDestroy.
  • Avoids stacking callbacks on shared MAVLink2Rest endpoints (and deep-observing Endpoint.latestData every frame).

Test plan

  • Heartbeat icon and GPS trays still update normally
  • Remount / HMR of App tray: listener count does not grow (no duplicate HEARTBEAT handling)
  • No regression in armed state / GPS fix display

Store HEARTBEAT/GPS listeners with markRaw and discard them in
beforeDestroy so remounts do not stack callbacks on shared endpoints.
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: LGTM :shipit:

Cleans up MAVLink listeners for the Health and GPS tray menus by storing them (wrapped in markRaw so Vue 2.7 does not deep-observe the Listener → Endpoint.latestData chain) and calling listener.discard() in beforeDestroy. Prevents stacked HEARTBEAT/GPS callbacks and unnecessary per-frame deep-reactivity walks on component remount/HMR.

No further comments, nice job 👍

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

@joaoantoniocardoso
joaoantoniocardoso marked this pull request as draft July 25, 2026 15:51
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review July 25, 2026 15:51
@joaoantoniocardoso joaoantoniocardoso added the move-to-stable Needs to be cherry-picked and move to stable label Jul 25, 2026
@joaoantoniocardoso

Copy link
Copy Markdown
Member Author

Superseded by #4046 (same changes, head moved to fork joaoantoniocardoso/BlueOS-docker).

@joaoantoniocardoso

Copy link
Copy Markdown
Member Author

Closed in favor of #4046.

@joaoantoniocardoso
joaoantoniocardoso deleted the pr/tray-mavlink-listener-discard branch July 27, 2026 21:03
@joaoantoniocardoso joaoantoniocardoso removed the move-to-stable Needs to be cherry-picked and move to stable label Jul 27, 2026
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.

1 participant