Skip to content

Latest commit

Β 

History

233 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WF Diagnostics v2.5.9 - WindowsForum Diagnostic Tool

License: CC BY-NC-ND 4.0 Version Platform Security AI

A Windows diagnostics application written in Rust. It combines native system checks, live monitoring, issue detection and guided remediation, encrypted scan history, process inspection, and an optional multi-provider AI assistant.

The shipping UI is a native WinUI 3 shell (apps/wfdiag, binary wfdiag.exe, built on windows-reactor); the original Tauri v2 + React shell (src-tauri, src/) is kept buildable as a rollback and will be removed in a later release. Both shells are thin hosts over the same framework-neutral engine crates in crates/, so behaviour cannot drift between them. See docs/REACTOR_MIGRATION.md for the migration record and the 2026-09-01 cutover decision.

πŸš€ Key Features

Core Capabilities

  • 49 Diagnostic Tasks across system, hardware, storage, network, security, software, logs, graphics, drivers, performance, and debugging
  • Real-time System Monitoring with live CPU, memory, disk, and network visualization (Non-blocking)
  • Encrypted Scan History protected for the current Windows user with DPAPI
  • 37 Deterministic Issue Rules with explicit verified, detected, and unknown outcomes
  • Tiered Remediation with backend-enforced confirmation for repair operations
  • Safe-fix automation (opt-in, off by default): one-click safe fixes run after each scan or on demand ("Fix safe issues now"); repairs always wait for your confirmation
  • Assistant that acts (opt-in): let the AI run the safe fixes it stages or plans; every fix is verified by re-collecting its evidence and the result is reported
  • Root cause first: symptoms rank below the issue they follow from and say so; unverified checks can be re-collected with one click; every action and automation decision lands in an audit trail (%LOCALAPPDATA%\WFDiag\logs\actions.jsonl)
  • Scan History & Comparison with intelligent change detection
  • Process Explorer with backend filtering, sorting, pagination, pause, and detail lookup
  • Multiple Export Formats (JSON, text, HTML, and forum-friendly text)

Optional AI Assistant 🧠

  • Local/self-hosted options: Phi Silica in the Microsoft Store build, Foundry Local, Ollama, and custom OpenAI-compatible servers
  • Subscription bridges: Codex CLI and Claude Code CLI use their own installed sign-in; wfdiag does not extract or store subscription tokens
  • Cloud APIs: OpenAI, Anthropic, Gemini, and DeepSeek with per-provider keys stored outside settings.json
  • Privacy controls: WindowsForum network grounding is opt-in, and local-to-cloud fallback follows the saved Ask/Allow/Never policy
  • Two focused views: Assistant conversation and Scan Report; provider configuration stays in Settings

Security Architecture πŸ”’

  • Diagnostic subprocesses use a closed command allowlist, validated arguments, hidden windows, and timeouts
  • AI chat tools are read-only; repairs always execute through the separate remediation catalog
  • Scan history uses current-user DPAPI protection and atomic file replacement
  • API keys use one DPAPI entry per provider, are stripped from settings.json, and are never returned to the UI
  • Export destinations go through a shared path policy; external links resolve from a closed enum, never a URL string crossing the UI boundary
  • Repairs execute only through wfdiag-native-remediation's action broker, which enforces the Repair-tier confirmation itself

πŸ“‹ Diagnostic Categories

The registry currently contains 49 checks. crates/wfdiag-native-diagnostics/src/catalog.rs is the authoritative task catalog; both shells derive their category counts from that registry instead of maintaining a second list.

πŸ› οΈ Architecture

One Cargo workspace: framework-neutral engine crates plus two shells that only drive them.

apps/wfdiag  (SHIPPING)                  src-tauri + src/  (ROLLBACK)
native WinUI 3 / windows-reactor         Tauri v2 + React
        β”‚                                        β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
              crates/wfdiag-app
   AppService { start, snapshot, dispatch, drain, shutdown }
        ports + domain state machines + headless tests
                       β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ crates/wfdiag-native-*                                     β”‚
 β”‚  core        error, timestamps, atomic writes, WMI         β”‚
 β”‚  diagnostics task catalog + Windows collectors             β”‚
 β”‚  monitor     live CPU/mem/disk/net/GPU/NPU (cfg(windows))  β”‚
 β”‚  issues      catalog, detectors, projection, fix plans     β”‚
 β”‚  remediation action broker = the only execution path       β”‚
 β”‚  history     DPAPI-encrypted scan store + comparison       β”‚
 β”‚  export      renderers + path policy + URL policy          β”‚
 β”‚  settings    settings doc + per-provider credential store  β”‚
 β”‚  system / update / projection / ui-core                    β”‚
 β”‚  ai-provider / ai-chat / ai-report / ai-analysis / phi     β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Engine crates build and test on Linux with no Windows and no GUI (CI job rust-portable); wfdiag-native-monitor is the one #![cfg(windows)] crate. See CLAUDE.md for the full map.

πŸ“¦ Installation & Usage

Prerequisites

  • Windows 10/11 on x64 or ARM64
  • Rust MSVC toolchain (pinned in rust-toolchain.toml) and Visual Studio C++ build tools
  • Windows App Runtime 2.4+ to run the native shell (the Store package declares it as a framework dependency)
  • Node.js only for the Tauri rollback shell: winget install OpenJS.NodeJS
  • Optional Phi Silica: Copilot+ PC, Windows 11 24H2+, and the Microsoft Store package identity

Development Setup

git clone https://github.com/faratech/wfdiag.git
cd wfdiag

# Native shell (the product) β€” Windows, x64 or ARM64
cargo run   -p wfdiag --target x86_64-pc-windows-msvc
cargo build -p wfdiag --release --target aarch64-pc-windows-msvc

# Engine crates: build and test anywhere, no Windows required
cargo test --workspace --exclude wfdiag --exclude wfdiag-tauri

# Tauri rollback shell (needs Node)
npm install
npm run tauri dev
npm run tauri build

The Microsoft Store package is produced by .github/workflows/build-and-publish-store.yml on a version tag: it builds wfdiag.exe per architecture and packages it with python3 scripts/build-reactor-msix-probe.py stage|pack|bundle|validate-msix. Manual dispatch accepts a shell input (reactor, the default, or tauri for the rollback). The workflow uploads an unsigned bundle; Microsoft signs the package delivered through the Store.

AppxManifest.xml launches wfdiag.exe and depends on Microsoft.WindowsAppRuntime.2 (MinVersion 2.4.0.0), single-sourced from reactor-baselines/manifest.json. The legacy src-tauri/tauri.msix.conf.json is a basic Tauri MSIX experiment, not the Store package.

🎯 Application API

The native shell drives the engine through one facade β€” AppService::dispatch(AppCommand) in crates/wfdiag-app β€” and reads AppEvents back from drain(). The Tauri rollback shell exposes the equivalent surface as IPC commands, listed below for reference.

Core Diagnostics

  • start_diagnostics(task_ids) - Begin diagnostic session
  • run_diagnostics_parallel(task_ids) - Batch execution (5 concurrent)
  • detect_issues() - Return detected and unverified checks
  • action_prepare(...) / action_approve(...) - Stage a remediation proposal, then execute it through the action broker (Repair tier requires explicit confirmation, enforced in the broker)

AI & Analysis

  • ai_get_status() - Probe configured/local AI providers
  • ai_chat_send(...) / ai_chat_cancel(...) - Start or cancel a streamed assistant turn
  • ai_chat_get_history(...) - Rehydrate a conversation after navigation
  • ai_generate_report(...) - Generate the dedicated scan report

Data Management

  • save_current_scan(results) - Store encrypted scan results
  • compare_scans_summary(...) / get_scan_task_diff(...) - Lazy scan comparison
  • list_processes(query) - Paginated and sortable process data
  • export_results(format) - Export as JSON/Text/HTML

🧠 AI Capabilities

Auto routing is local-first: Phi Silica β†’ Foundry Local β†’ Ollama β†’ custom OpenAI-compatible β†’ Codex CLI β†’ Claude Code β†’ OpenAI β†’ Anthropic β†’ Gemini β†’ DeepSeek. An explicit provider selection never silently routes elsewhere. wfdiag_native_ai_provider::capabilities() is the authoritative source for provider capabilities and context budgets; the routing decision itself is the pure, unit-tested route_provider().

πŸ”„ Version History

v2.5.9 (Current) - Automation, Built-in Fixes, and an Assistant That Acts

  • βœ… Built-in fixes: seven new one-click or confirm-once remediations (drive optimization, Windows temp cleanup, Defender definition update and quick scan, firewall on, network address renewal, memory test at next restart) replace opening Windows tools for most rules; CPU and memory rules point at the Processes page.
  • βœ… Safe-fix automation (opt-in): run every one-click safe fix after each scan or with "Fix safe issues now"; repairs always wait for your confirmation, and every fix is verified by re-collecting its evidence.
  • βœ… Assistant that acts (opt-in): the AI can run the safe fixes it stages or plans, sees each issue's fix, tier and likely root cause, and reports what changed.
  • βœ… Root cause first: symptoms rank below the issue they follow from and say so; "Run the missing checks" re-collects unverified rules in one click.
  • βœ… Evidence-driven diagnosis: disk-space breakdown, blue-screen decoding, Windows Update failure diagnosis, Defender health, an opt-in network connectivity test, and a "turned Critical since the last scan" notice.
  • βœ… Audit trail: every action and automation decision is appended to %LOCALAPPDATA%\WFDiag\logs\actions.jsonl.
  • βœ… Processes: the program path with "Open file location"; exports offer printable HTML instead of a silent PDF downgrade.

v2.5.9 - Live AI Model Discovery

  • βœ… Always-current model catalogs: Loads available models directly from provider APIs and the Codex/Claude CLI metadata instead of shipping static lists.
  • βœ… Claude model clarity: Shows Opus, Sonnet, Haiku, and Fable versions, exact IDs, and provider descriptions in an accessible searchable picker.
  • βœ… Gemini freshness: Ranks live compatible models semantically and dynamically selects the newest stable general-purpose model when no override is saved.
  • βœ… GPT-5.6 compatibility: Supports Sol, Terra, Luna, and future provider-reported OpenAI models, including the required tool-calling reasoning configuration.
  • βœ… Provider attribution: Displays the requested and provider-reported model for AI responses when available.
  • βœ… Simpler settings: Consolidates redundant provider controls while preserving Auto multi-provider setup.

v2.5.5 - Performance & Accuracy Improvements

  • βœ… Non-blocking System Monitor: Decoupled slow polling operations (Disk, NPU) for instant UI responsiveness.
  • βœ… Network Rate Fix: Corrected transfer rate calculation to eliminate spikes during startup.
  • βœ… βœ… Accurate Swap Metrics: Switched to native PDH counters for true paging file utilization.
  • βœ… Settings Persistence: Resolved issue with AI provider preference resetting to "Auto".
  • βœ… UI Polishing: Enhanced network charts with simultaneous Upload/Download tooltips.

v2.1.7 - Hybrid AI & Remediation

  • βœ… Hybrid AI Engine: Integration of local Phi Silica models alongside OpenAI.
  • βœ… Issue Detector: Automated identification of common system problems.
  • βœ… Auto-Fixer: One-click remediation for supported issues.
  • βœ… Health Model: Visual health scoring system.
  • βœ… UI Updates: New Issues tab and improved navigation rail.

Previous Versions

  • v2.1.0 - Security Hardening & Encryption
  • v2.0.0 - Rewrite in Tauri v2 + React

πŸ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

  • βœ… Free for personal, educational, and research use
  • ❌ No commercial use without permission
  • ❌ No derivative works

Commercial Licensing

Contact: * contact


Copyright Β© 2025 Fara Technologies LLC. All rights reserved. Developed for WindowsForum.com

About

Official WindowsForum.com system diagnostic utility. Gathers hardware, event logs, driver states, and crash dumps with optional local Copilot/Phi-Silica analysis.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages