Skip to content

namir-clap: GUI meters bind to a telemetry reader captured once at editor-open #95

Description

@ErwanLegrand

crates/namir-clap/src/gui.rs:170, src/ui_host.rs:64, 101

set_parent snapshots telemetry_reader() at editor-open time. Two consequences:

  • A host that opens the editor before the first activate() (common) gets None, so drain_meters returns at its first line for the editor's entire life and both meters read -inf permanently.
  • After any deactivate/reactivate -- including the restart the plugin itself requests for latency -- activate installs a fresh ring (audio.rs:156-159) while the GUI keeps draining the retired one, freezing the meters.

Untested: every ClapUiHost test either passes None or wires a hand-made ring directly, so neither transition is exercised.

Fix: add a generation counter bumped by set_telemetry_reader, and have drain_meters re-clone from SharedInner when its own generation is behind.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions