Skip to content

Network traffic: harden graph updates and preserve range state #611

Description

@johnny9

Scope split

The graph reset behavior originally tracked here was split into #806 so it can be implemented and reviewed independently. This issue no longer includes reset behavior.

This issue is limited to the network traffic sampling lifecycle, suppression of hidden-page work, range preservation, and safe shutdown covered by PR #805.

Code Gap

The QML network traffic page shows received/sent totals and graph history, but its updater has release risks.

NetworkTrafficTower creates a timer/thread without clear ownership or shutdown cleanup. It can continue deriving and publishing graph updates when the page is hidden, and the existing range handling needs to preserve totals and retained history consistently.

Work Needed

  • Make network traffic sampling thread/timer ownership explicit and safe during shutdown.
  • Ensure graph updates do not leak timers/threads or update QML from the wrong thread.
  • Avoid deriving or publishing graph snapshots while the page is inactive, while retaining the raw samples needed when it becomes active again.
  • Preserve totals and graph history consistently when changing ranges.
  • Add coverage for opening/closing the page, activation changes, changing ranges, and shutdown while sampling is active.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions