Skip to content

[metrics] Notify value listeners when deleting definitions - #310

Open
peterolkhov wants to merge 1 commit into
tinyplex:mainfrom
peterolkhov:codex/fix-metric-deletion-notifications
Open

peterolkhov wants to merge 1 commit into
tinyplex:mainfrom
peterolkhov:codex/fix-metric-deletion-notifications

Conversation

@peterolkhov

Copy link
Copy Markdown

Summary

Deleting a populated metric definition clears its value without notifying metric listeners. A mounted MetricView keeps displaying the old number even though getMetric returns undefined.

Notify specific and wildcard listeners through the existing dispatcher after deletion. Absent, empty and repeated deletions stay quiet. If an IDs listener recreates the metric during deletion, preserve its new value and notification.

How did you test this change?

  • Unchanged upstream reproduction: notification and rendered-value assertions fail; both ordinary controls pass.
  • New native regressions: six assertion failures against the original owner, then all 97 affected metrics/React tests pass with the fix. The unchanged public fixture passes all four cases after the fix.
  • Official CI commands: compile, lint, spelling, TypeScript and all 5,352 core tests pass. Statements, branches, functions and lines each remain at 100% across all four configured coverage bundles.

Full preCommit also includes Bun, server/database tests and a production build; those additional checks were not run.

Prepared with OpenAI Codex assistance.

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.

1 participant