Skip to content

feat(app): implement hardware telemetry visualizer and timing diagnostics dashboard - #44

Merged
Bor-Code merged 1 commit into
mainfrom
feat/telemetry-visualizer-diagnostics
Oct 16, 2026
Merged

Bor-Code merged 1 commit into
mainfrom
feat/telemetry-visualizer-diagnostics

Conversation

@Bor-Code

Copy link
Copy Markdown
Owner

Summary

This pull request upgrades the MetricsView in HidGuard.App into a real-time hardware telemetry visualizer and timing diagnostics dashboard, exposing granular statistical distributions, live inter-keystroke interval strips, and diagnostic session controls.

Key Changes

  • TimingHistogramBucket: Introduced observable bucket model mapping keystroke interval density across 6 ranges (<10ms, 10-25ms, 25-60ms, 60-150ms, 150-300ms, >300ms) with dynamic percentage calculations and scaled visual bar heights.
  • LiveIntervalSample: Added color-coded live interval sample records indicating anomalous vs. benign keystroke speeds.
  • MetricsViewModel Expansion:
    • Computed advanced dynamics metrics: Coefficient of Variation (CoefficientOfVariation), Sub-Human Ratio percentage (SubHumanRatioPercent), Minimum Interval (MinimumIntervalMs), Continuous Burst Length (BurstLength), Human Confidence Score (HumanConfidenceScore), and Bot Probability Score (BotProbabilityScore).
    • Added ActiveDeviceId telemetry binding.
    • Implemented ResetMetricsCommand allowing security operators to reset histograms, sample buffers, and diagnostic counters.
  • MetricsView XAML:
    • Redesigned status card featuring Human Confidence vs. Anomaly Score side-by-side gauge meters.
    • Added 4-card telemetry metric grid (Speed, Mean Interval, CV Variability, Sub-Human Ratio).
    • Integrated 6-column hardware timing distribution histogram with percentage labels and color-coded bars.
    • Embedded real-time keystroke interval stream strip showing the last 30 intervals with color-coded severity.
    • Added diagnostic session telemetry card with active hardware ID and one-click "Reset Diagnostics" action.
  • Unit Tests: Added MetricsViewModelTests validating initial state defaults, evaluation recording, histogram bucket distribution, anomaly threshold styling, and metrics reset. Solution test count increased from 266 to 270 passing tests with zero warnings under TreatWarningsAsErrors.
  • Documentation: Updated README.md and README.tr.md test suite scope tables.

Verification

  • dotnet test HidGuard.sln --configuration Release: 270 / 270 tests passed (100% green).
  • dotnet run --project tools/HidGuard.Simulator/HidGuard.Simulator.csproj --configuration Release --no-build -- --verify: 7 / 7 verification scenarios passed.
  • All code follows zero-comment and zero-emoji compliance.

@Bor-Code
Bor-Code merged commit 1290b9c into main Oct 16, 2026
1 check passed
@Bor-Code
Bor-Code deleted the feat/telemetry-visualizer-diagnostics branch October 16, 2026 23:48
Bor-Code added a commit that referenced this pull request Oct 17, 2026
…tics dashboard (#44)

## Summary
This pull request upgrades the `MetricsView` in `HidGuard.App` into a
real-time hardware telemetry visualizer and timing diagnostics
dashboard, exposing granular statistical distributions, live
inter-keystroke interval strips, and diagnostic session controls.

## Key Changes
- **TimingHistogramBucket**: Introduced observable bucket model mapping
keystroke interval density across 6 ranges (<10ms, 10-25ms, 25-60ms,
60-150ms, 150-300ms, >300ms) with dynamic percentage calculations and
scaled visual bar heights.
- **LiveIntervalSample**: Added color-coded live interval sample records
indicating anomalous vs. benign keystroke speeds.
- **MetricsViewModel Expansion**:
- Computed advanced dynamics metrics: Coefficient of Variation
(`CoefficientOfVariation`), Sub-Human Ratio percentage
(`SubHumanRatioPercent`), Minimum Interval (`MinimumIntervalMs`),
Continuous Burst Length (`BurstLength`), Human Confidence Score
(`HumanConfidenceScore`), and Bot Probability Score
(`BotProbabilityScore`).
  - Added `ActiveDeviceId` telemetry binding.
- Implemented `ResetMetricsCommand` allowing security operators to reset
histograms, sample buffers, and diagnostic counters.
- **MetricsView XAML**:
- Redesigned status card featuring Human Confidence vs. Anomaly Score
side-by-side gauge meters.
- Added 4-card telemetry metric grid (Speed, Mean Interval, CV
Variability, Sub-Human Ratio).
- Integrated 6-column hardware timing distribution histogram with
percentage labels and color-coded bars.
- Embedded real-time keystroke interval stream strip showing the last 30
intervals with color-coded severity.
- Added diagnostic session telemetry card with active hardware ID and
one-click "Reset Diagnostics" action.
- **Unit Tests**: Added `MetricsViewModelTests` validating initial state
defaults, evaluation recording, histogram bucket distribution, anomaly
threshold styling, and metrics reset. Solution test count increased from
266 to 270 passing tests with zero warnings under TreatWarningsAsErrors.
- **Documentation**: Updated `README.md` and `README.tr.md` test suite
scope tables.

## Verification
- `dotnet test HidGuard.sln --configuration Release`: 270 / 270 tests
passed (100% green).
- `dotnet run --project
tools/HidGuard.Simulator/HidGuard.Simulator.csproj --configuration
Release --no-build -- --verify`: 7 / 7 verification scenarios passed.
- All code follows zero-comment and zero-emoji compliance.

Co-authored-by: Boran <nonmr@users.noreply.github.com>
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