Skip to content

AxoIncidentBar: perf, ranking-accuracy, and sender-identification fixes#1157

Merged
PTKu merged 2 commits into
devfrom
fix-incident-bar-perf-issues
May 28, 2026
Merged

AxoIncidentBar: perf, ranking-accuracy, and sender-identification fixes#1157
PTKu merged 2 commits into
devfrom
fix-incident-bar-perf-issues

Conversation

@PTKu
Copy link
Copy Markdown
Contributor

@PTKu PTKu commented May 28, 2026

Summary

  • AxoCauseAnalyzer ranking fixes — severity-tier sort is now the outermost key (a Critical candidate is never ranked below an Error one regardless of burst/ownership/age bonuses); age contribution capped at 7 days so uninitialized RisenUtc cannot dominate the score; BurstWindow cutoff clamped against DateTime underflow; candidates with empty DisplayMessage excluded.
  • AxoIncidentBarView perf and diagnostics — polling cadence driven by _analyzer.ActiveCount instead of Provider.ActiveMessagesCount (authoritative in all topologies); Tick() always reads state first then conditionally pulls details when any messenger is non-Idle; Serilog (Information / Debug / Warning / Error) replaces the silent catch { }.
  • Sender identification — SenderDisplayName becomes a top-down AttributeName breadcrumb (e.g. Station › Drive › Encoder); new IRankableMessage.SenderSymbol carries the full PLC symbol path (rendered as a mono subtitle + title tooltip on the bar). AxoMessengerRankableAdapter defaults SenderSymbol to the messenger symbol so existing call sites compile unchanged.
  • Provider read-path tweaks — ReadMessageStateAsync now batches Risen / Fallen / Acknowledged alongside the state triple; ReadDetails issues its batch at eAccessPriority.Low to reduce contention with operator-driven traffic.
  • Documentation — src/core/docs/AxoIncidentBar.md ranking section updated with severity-tier-outermost note, Station/Drive example rewritten to match the new sort order, BLAZOR tab gains a Sender-identification subsection; src/core/docs/CHANGELOG.md 0.56.1 entry appended; central CHANGELOG.md entry added.

Test plan

  • dotnet test src/core/tests/AXOpen.Core.Tests/Messaging/AxoCauseAnalyzerTests, AxoIncidentBarPresenterTests, AxoMessengerRankableAdapterTests all green.
  • dotnet build src/core/src/AXOpen.Core.Blazor/ — Razor compiles clean with the new Serilog using and IRankableMessage.SenderSymbol references.
  • Manual: run the showcase, navigate to /core/AxoIncidentBar, trigger the Station / Drive / Encoder + Conveyor / Sensor topology and confirm:
    • Critical alarm always sits on top regardless of which level is firing.
    • Bar shows the breadcrumb sender (e.g. Station › Drive › Encoder).
    • Hovering the sender label surfaces the full PLC symbol path tooltip; the mono subtitle renders the same path below the breadcrumb.
    • Bar polling drops to ~2500 ms when no Error+ is active and ~750 ms while at least one is firing.
  • Manual: trigger an active messenger with MessageCode == 0 and confirm it is excluded from the bar candidates (still counted by global indicators).
  • Manual: verify Serilog output shows ConfigurePolling done. Messengers discovered: N on bar mount and Tick: ActiveCount=… TopCause=… per cycle.

🤖 Generated with Claude Code

private static string SafeAttributeName(ITwinElement e)
{
try { return e.AttributeName ?? string.Empty; }
catch { return string.Empty; }
Comment on lines +117 to +120
catch (Exception ex)
{
Log.Error(ex, "AxoIncidentBarView.ConfigurePolling: InitializeLightUpdate failed.");
}
@PTKu PTKu merged commit c9c7c24 into dev May 28, 2026
3 checks passed
@PTKu PTKu deleted the fix-incident-bar-perf-issues branch May 28, 2026 07:49
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