Repository navigation
feat(app): implement hardware telemetry visualizer and timing diagnostics dashboard - #44
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request upgrades the
MetricsViewinHidGuard.Appinto 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
CoefficientOfVariation), Sub-Human Ratio percentage (SubHumanRatioPercent), Minimum Interval (MinimumIntervalMs), Continuous Burst Length (BurstLength), Human Confidence Score (HumanConfidenceScore), and Bot Probability Score (BotProbabilityScore).ActiveDeviceIdtelemetry binding.ResetMetricsCommandallowing security operators to reset histograms, sample buffers, and diagnostic counters.MetricsViewModelTestsvalidating 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.README.mdandREADME.tr.mdtest 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.