Skip to content

feat: Implement multi-drone profile system#1

Merged
eddycek merged 7 commits intomainfrom
feature/drone-profiles
Feb 7, 2026
Merged

feat: Implement multi-drone profile system#1
eddycek merged 7 commits intomainfrom
feature/drone-profiles

Conversation

@eddycek
Copy link
Copy Markdown
Owner

@eddycek eddycek commented Feb 7, 2026

🎯 Overview

Complete implementation of multi-drone profile system with comprehensive testing infrastructure. This PR adds the ability to manage multiple flight controllers, each with its own profile and configuration snapshots.

✨ Features Implemented

Profile Management

  • Multi-drone support - Automatically detects FC by serial number and loads corresponding profile
  • Profile wizard - Guided setup for new FCs with custom or preset configurations
  • Profile editing - Full modal editor for all profile fields (name, size, battery, weight, motor KV, etc.)
  • Profile deletion - Warning modal with comprehensive information about data loss
  • Profile locking - Prevents profile switching when FC is connected (visual lock indicator)
  • 10 preset profiles - Realistic configurations: tiny-whoop, micro-whoop, toothpicks, racers, cinematic, long-range
  • Expanded drone sizes - Added 1", 2" sizes and 1S, 2S batteries for tiny drones

UI/UX Improvements

  • Modern CSS styling - Dark theme matching app design for ProfileWizard, ProfileCard, ProfileSelector
  • Profile cards - Clean card design with hover effects, badges, stats grid
  • Visual feedback - Loading states, error messages, cooldown timers, lock indicators
  • Form validation - Required field indicators, disabled states
  • Responsive layout - Grid layouts, proper spacing, visual hierarchy

Bug Fixes

  • 🐛 Board name display - Fixed null bytes in board name, fallback to target name, conditional rendering
  • 🐛 Snapshot filtering - Fixed cross-profile snapshot visibility (server-side filtering by profile's snapshotIds)
  • 🐛 Profile deletion - Fixed "cannot delete active profile" error, added auto-disconnect
  • 🐛 Immediate reconnect - Fixed "FC not responding" error with 3s frontend cooldown + 1s backend delay
  • 🐛 Port detection - Auto-select first available port when selected port disappears (FC change detection)
  • 🐛 Preset crash - Fixed app crash when selecting preset without custom name (missing import)
  • 🐛 Baseline creation - Auto-create baseline snapshot after profile creation (was missing)

Architecture Improvements

  • Profile-snapshot linking - Each profile tracks its snapshots via snapshotIds array
  • Event-driven updates - Components react to onProfileChanged, onConnectionChanged events
  • Server-side filtering - Snapshots filtered in IPC handler based on current profile
  • Auto-detection flow - Seamless profile detection and loading on FC connection
  • Graceful disconnection - Disconnect FC when active profile deleted

🧪 Testing Infrastructure

Test Coverage

128 tests total - All passing ✅

Components (89 tests)

  • ConnectionPanel (12 tests) - Port scanning, connect/disconnect, cooldown, error handling
  • ProfileSelector (11 tests) - Profile switching, locking, dropdown, badges
  • FCInfoDisplay (12 tests) - FC info display, board name logic, CLI export
  • ProfileEditModal (18 tests) - Form editing, validation, save/cancel, loading states
  • ProfileDeleteModal (14 tests) - Warnings, confirmation, snapshot count, active profile
  • SnapshotManager (22 tests) - Create/delete/export, baseline badge, dialogs, empty states

Hooks (39 tests)

  • useConnection (15 tests) - Connection state, port management, error handling, events
  • useProfiles (14 tests) - CRUD operations, current profile, presets, error handling
  • useSnapshots (16 tests) - Snapshot management, event-driven updates, filtering

Testing Infrastructure

  • Vitest - Fast unit test framework (Vite-native)
  • React Testing Library - Component testing with accessibility-first queries
  • jsdom - DOM implementation for Node.js
  • Mock setup - Complete window.betaflight API mocking in src/renderer/test/setup.ts
  • Pre-commit hook - Automatic test execution via husky + lint-staged
  • Test scripts - Watch mode, single run, interactive UI, coverage report

What Was Tested

UI Interactions

  • ✅ Form inputs and validation
  • ✅ Button clicks and actions
  • ✅ Modal open/close behavior
  • ✅ Dropdown expansion/collapse
  • ✅ User event simulation (typing, clicking, selecting)

Business Logic

  • ✅ Profile locking when FC connected
  • ✅ 3-second cooldown after disconnect
  • ✅ Auto port selection on FC change
  • ✅ Baseline snapshot creation
  • ✅ Server-side snapshot filtering
  • ✅ Profile-snapshot association

API Integration

  • ✅ Correct API method calls with proper parameters
  • ✅ Error handling and error states
  • ✅ Success scenarios and data flow
  • ✅ Async operations with loading states

State Management

  • ✅ React hook state updates
  • ✅ Event subscription and cleanup
  • ✅ Data filtering and transformation
  • ✅ Cache invalidation

Edge Cases

  • ✅ Empty states (no ports, no profiles, no snapshots)
  • ✅ Error states (connection failures, API errors)
  • ✅ Loading states and timeouts
  • ✅ Concurrent operations
  • ✅ Profile deletion while active
  • ✅ Snapshot operations on profile changes

📚 Documentation

New Documentation

  • CLAUDE.md - Comprehensive architecture guide for future AI agents

    • Electron process model
    • Multi-drone profile system architecture
    • MSP communication patterns
    • IPC architecture
    • Storage system design
    • Testing requirements
    • Common issues and solutions
    • Platform-specific notes
  • TESTING.md - Complete testing guidelines

    • Test stack overview
    • Running tests (watch, single run, UI, coverage)
    • Automated testing (pre-commit hook)
    • Writing tests (structure, patterns, best practices)
    • Examples for components and hooks
    • Troubleshooting guide

Updated Documentation

  • README.md - Added testing section with links to TESTING.md

🔧 Technical Changes

Modified Files (17 files)

  • src/main/ipc/handlers.ts - Server-side snapshot filtering, baseline creation, profile deletion logic
  • src/main/msp/MSPClient.ts - Board name sanitization, null byte filtering, fallback logic
  • src/main/storage/ProfileManager.ts - Allow active profile deletion, clear currentProfileId
  • src/renderer/App.tsx - Remove wizard cancel handler
  • src/renderer/components/ConnectionPanel/ConnectionPanel.tsx - Cooldown timer, auto port detection
  • src/renderer/components/FCInfo/FCInfoDisplay.tsx - Conditional board name display
  • src/renderer/components/PresetSelector.tsx - CSS styling
  • src/renderer/components/ProfileCard.tsx - CSS classes, edit button, locked state
  • src/renderer/components/ProfileSelector.tsx - Profile locking logic, lock notice, CSS
  • src/renderer/components/ProfileWizard.tsx - CSS styling, PRESET_PROFILES import, remove cancel
  • src/renderer/hooks/useSnapshots.ts - Event subscriptions for profile/connection changes
  • src/shared/constants.ts - SIZE_DEFAULTS for 1", 2", 10 preset profiles
  • src/shared/types/profile.types.ts - 1S, 2S batteries, 1", 2" sizes
  • README.md - Testing section
  • package.json - Test scripts, lint-staged config

New Files (20 files)

  • .husky/pre-commit - Pre-commit hook for automatic testing
  • vitest.config.ts - Vitest configuration
  • src/renderer/test/setup.ts - Test setup with mocks
  • src/renderer/components/ProfileWizard.css - Wizard styling
  • src/renderer/components/ProfileCard.css - Card styling with locked state
  • src/renderer/components/ProfileSelector.css - Dropdown styling with lock notice
  • src/renderer/components/ProfileEditModal.tsx - Profile editing modal
  • src/renderer/components/ProfileEditModal.test.tsx - 18 tests
  • src/renderer/components/ProfileDeleteModal.tsx - Deletion confirmation modal
  • src/renderer/components/ProfileDeleteModal.test.tsx - 14 tests
  • src/renderer/components/ConnectionPanel/ConnectionPanel.test.tsx - 12 tests
  • src/renderer/components/ProfileSelector.test.tsx - 11 tests
  • src/renderer/components/FCInfo/FCInfoDisplay.test.tsx - 12 tests
  • src/renderer/components/SnapshotManager/SnapshotManager.test.tsx - 22 tests
  • src/renderer/hooks/useConnection.test.ts - 15 tests
  • src/renderer/hooks/useProfiles.test.ts - 14 tests
  • src/renderer/hooks/useSnapshots.test.ts - 16 tests
  • CLAUDE.md - Architecture documentation
  • TESTING.md - Testing guidelines

📊 Statistics

  • Files changed: 34 files
  • Lines added: 4,766
  • Lines removed: 462
  • Test coverage: 128 tests passing
  • Duration: ~3.12s test execution time

✅ Testing Done

Manual Testing

  • ✅ Connect/disconnect with multiple flight controllers
  • ✅ Profile creation with custom and preset configurations
  • ✅ Profile editing and validation
  • ✅ Profile deletion (active and inactive)
  • ✅ Profile switching (allowed when disconnected, locked when connected)
  • ✅ Snapshot creation, export, deletion
  • ✅ Baseline snapshot auto-creation
  • ✅ Port scanning and auto-detection
  • ✅ Cooldown timer after disconnect
  • ✅ Error handling (connection failures, invalid data)

Automated Testing

  • ✅ All 128 tests passing
  • ✅ Pre-commit hook verified (blocks commit on test failure)
  • ✅ Mock API coverage verified
  • ✅ Event subscriptions and cleanup verified
  • ✅ Loading and error states verified

🚀 Ready for Merge

  • ✅ All tests passing (128/128)
  • ✅ Pre-commit hook functional
  • ✅ No console errors
  • ✅ Code fully documented
  • ✅ Testing guidelines in place
  • ✅ Clean git history

📝 Notes

  • Tests run automatically before every commit via husky hook
  • New UI changes require corresponding tests (enforced by pre-commit hook)
  • See TESTING.md for detailed testing guidelines
  • See CLAUDE.md for architecture overview

eddycek and others added 6 commits February 7, 2026 13:00
- Add TypeScript types for drone profiles
- Add preset profiles and size defaults to constants
- Implement ProfileStorage for file operations
- Implement ProfileManager for business logic
- Add MSP_UID support to get FC serial number
- Add getFCSerialNumber() method to MSPClient

Tasks completed: #5, #6
Tasks in progress: #7 (MSP integration)

Still TODO:
- Integrate ProfileManager with main process
- Add IPC handlers for profiles
- Update SnapshotManager to work with profiles
- Create UI components (wizard, selector, etc.)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Complete the backend integration for multi-drone profile support by:
- Adding FC serial number retrieval via MSP_UID command
- Implementing 10 IPC channels for profile operations (create, update, delete, list, etc.)
- Exposing profile API to renderer via preload script
- Integrating ProfileManager with SnapshotManager for profile-specific snapshot tracking
- Auto-detecting known/new drones on connection and emitting appropriate events
- Linking snapshots to profiles automatically on creation
- Filtering snapshots by current profile
- Adding event emission for profile changes and new FC detection

This completes Tasks #7 (MSP integration) and backend portion of the profile system.
Next step is implementing the UI components (ProfileWizard and profile management).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add complete UI layer for multi-drone profile system:

ProfileWizard component:
- Multi-step wizard with 5 steps (method selection, preset/custom config, advanced, review)
- Support for both preset-based and custom profile creation
- Smart defaults based on drone size (auto-fills weight, motor KV, battery, etc.)
- Validation and review step before creation
- Responsive modal design

Profile management components:
- ProfileSelector: Collapsible dropdown showing all profiles with switch capability
- ProfileCard: Individual profile display with metadata, actions (delete, export)
- useProfiles hook: Complete state management for profile operations

Integration:
- Auto-show ProfileWizard modal when new FC is detected
- ProfileSelector integrated into main app layout
- Event-driven profile updates via onProfileChanged and onNewFCDetected

Features:
- Visual indicators for active and recently connected profiles
- Relative time formatting for last connection
- Grid layout for profile metadata display
- Delete confirmation for safety
- Export functionality placeholder (file dialog to be implemented)

This completes Tasks #8 (ProfileWizard) and #9 (Profile management UI).
The profile system is now fully functional end-to-end.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix ProfileWizard rendering and baseline snapshot timing:
- Remove React Portal from ProfileWizard (was causing display issues)
- Use inline styles with high z-index for modal overlay
- Fix baseline creation logic: only create for existing profiles, not new FCs
- Add profile-changed event emission after profile creation
- Improve forceExitCLI to avoid port closure (use newlines instead of 'exit')
- Add retry logic with better error messages for MSP timeouts
- Implement conditional rendering based on connection and profile state
- Show only Connection panel on startup
- Show FC Info when connected
- Show ProfileSelector and Snapshots only when profile exists

This resolves the "FC not responding" errors after profile creation
and ensures baseline snapshots don't interfere with initial setup.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
UI Improvements:
- Add profile editing modal with full field editing capabilities
- Add profile deletion modal with comprehensive warnings
- Implement profile locking when FC is connected (prevents switching)
- Add CSS styling for ProfileWizard, ProfileCard, ProfileSelector
- Add 1S, 2S battery types and 1", 2" drone sizes
- Add 10 realistic preset profiles (whoops, toothpicks, racers, etc.)

Bug Fixes:
- Fix board name display (filter null bytes, fallback to target)
- Fix snapshot filtering to use server-side profile filtering
- Fix profile deletion (allow deleting active profile, disconnect FC)
- Fix immediate reconnect issue (3s cooldown + 1s backend delay)
- Fix auto port detection when FC changes
- Fix crash when selecting preset without custom name
- Auto-create baseline snapshot after profile creation

Testing Infrastructure (128 tests):
- Add Vitest + React Testing Library setup
- Add comprehensive tests for all components:
  * ConnectionPanel (12 tests)
  * ProfileSelector (11 tests)
  * FCInfoDisplay (12 tests)
  * ProfileEditModal (18 tests)
  * ProfileDeleteModal (14 tests)
  * SnapshotManager (22 tests)
- Add tests for all hooks:
  * useConnection (15 tests)
  * useProfiles (14 tests)
  * useSnapshots (16 tests)
- Add pre-commit hook (husky + lint-staged)
- Add TESTING.md with comprehensive testing guidelines

Documentation:
- Add CLAUDE.md with architecture and development guide
- Update README.md with testing section

All tests passing: 128/128 ✅

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@eddycek eddycek self-assigned this Feb 7, 2026
- Updated status: PR #1 ready for review
- Added all 10 preset profiles (was showing 6)
- Documented 8 critical bug fixes
- Added testing infrastructure section (128 tests)
- Documented CLAUDE.md and TESTING.md
- Updated current status and pre-release checklist
- Moved fixed bugs to "Recently Fixed" section

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@eddycek eddycek merged commit c9ee331 into main Feb 7, 2026
eddycek added a commit that referenced this pull request Feb 11, 2026
Update COMPREHENSIVE_TESTING_PLAN.md with final status (1440 tests / 75 files),
resolved gap analysis, coverage summary, and PR references.
Update README.md with accurate test counts, coverage thresholds, and docs listing.
Update SPEC.md progress summary (PRs #1-#88) and test counts across all modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Feb 11, 2026
All three docs were significantly outdated — test counts, PR counts,
missing features (verification flight, tuning history, completion
summary, noise comparison), missing files in project structure,
outdated component hierarchies, and stale test breakdowns.

Key updates:
- Test count: 1520 tests across 82 files (was 881/1440 in places)
- PRs: #1#99 (was #1#88)
- README: added TuningHistory section, verification hover, updated
  project structure (TuningHistoryManager, TuningHistory/, useTuningHistory,
  tuning-history.types.ts, shared/utils/), full docs/ listing
- ARCHITECTURE: added TuningHistoryManager to storage, TuningHistory
  UI components, useTuningHistory hook, tuning-history.types.ts,
  TuningSession 5 new fields, TUNING_GET_HISTORY + BB settings IPC,
  completion summary + history panel descriptions, accurate test breakdown
- SPEC: updated Phase 4 with verification + history PRs #89#99,
  added UX requirements for completion summary and history panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Feb 11, 2026
All three docs were significantly outdated — test counts, PR counts,
missing features (verification flight, tuning history, completion
summary, noise comparison), missing files in project structure,
outdated component hierarchies, and stale test breakdowns.

Key updates:
- Test count: 1520 tests across 82 files (was 881/1440 in places)
- PRs: #1#99 (was #1#88)
- README: added TuningHistory section, verification hover, updated
  project structure (TuningHistoryManager, TuningHistory/, useTuningHistory,
  tuning-history.types.ts, shared/utils/), full docs/ listing
- ARCHITECTURE: added TuningHistoryManager to storage, TuningHistory
  UI components, useTuningHistory hook, tuning-history.types.ts,
  TuningSession 5 new fields, TUNING_GET_HISTORY + BB settings IPC,
  completion summary + history panel descriptions, accurate test breakdown
- SPEC: updated Phase 4 with verification + history PRs #89#99,
  added UX requirements for completion summary and history panel

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 8, 2026
H1: CLAUDE.md — TuningType, quick phases, TF analysis engine, IPC counts
H2: ARCHITECTURE.md — 50 IPC channels, 12 hooks, quick state machine,
    updated test summary (1964 tests / 100 files + 23 E2E)
H3: TESTING.md — new test files (QuickAnalysisStep, StartTuningModal,
    BodePlot, TransferFunctionEstimator, useDemoMode), updated counts
H4: README.md — Quick Tune feature section, updated test counts
H5: SPEC.md — PRs #1-#152, 23 Playwright E2E tests
H6: docs/README.md — Quick Tune doc status Active, test counts
H7: TUNING_PRECISION_IMPROVEMENTS.md — mark Wiener (#1) as implemented

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 8, 2026
H1: CLAUDE.md — TuningType, quick phases, TF analysis engine, IPC counts
H2: ARCHITECTURE.md — 50 IPC channels, 12 hooks, quick state machine,
    updated test summary (1964 tests / 100 files + 23 E2E)
H3: TESTING.md — new test files (QuickAnalysisStep, StartTuningModal,
    BodePlot, TransferFunctionEstimator, useDemoMode), updated counts
H4: README.md — Quick Tune feature section, updated test counts
H5: SPEC.md — PRs #1-#152, 23 Playwright E2E tests
H6: docs/README.md — Quick Tune doc status Active, test counts
H7: TUNING_PRECISION_IMPROVEMENTS.md — mark Wiener (#1) as implemented

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 9, 2026
…ltip

- Add setGuidedTuneMode() to MockMSPClient — resets _nextFlightType
  to 'filter' and _lastSessionType to 'guided' when starting Deep Tune.
  Without this, after a Flash Tune session the flight cycling stayed in
  'quick' mode, causing PID flights to generate wrong BBL data (0 steps)
- Call setGuidedTuneMode() in tuningHandlers when starting guided session
- Redesigned QualityTrendChart tooltip: session number (#1, #2...),
  prominent score with tier color, tuning type, noise level, changes
  count, and component breakdown. X-axis now shows session # instead
  of dates (avoids "Mar 9, Mar 9, Mar 9..." when all same day)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 9, 2026
…ltip (#186)

- Add setGuidedTuneMode() to MockMSPClient — resets _nextFlightType
  to 'filter' and _lastSessionType to 'guided' when starting Deep Tune.
  Without this, after a Flash Tune session the flight cycling stayed in
  'quick' mode, causing PID flights to generate wrong BBL data (0 steps)
- Call setGuidedTuneMode() in tuningHandlers when starting guided session
- Redesigned QualityTrendChart tooltip: session number (#1, #2...),
  prominent score with tier color, tuning type, noise level, changes
  count, and component breakdown. X-axis now shows session # instead
  of dates (avoids "Mar 9, Mar 9, Mar 9..." when all same day)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 9, 2026
Update all doc files to 2331 tests / 114 files / PRs #1-#206.
Add FLASH_TUNE_RECOMMENDATION_PARITY to docs/README.md index.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
Session numbers (#1, #2, ...) now appear in history card headers,
matching the numbering used in the Quality Trend chart for easy
cross-reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
Session numbers (#1, #2, ...) now appear in history card headers,
matching the numbering used in the Quality Trend chart for easy
cross-reference.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
…xes (#219)

- TESTING.md: FilterRecommender 48→57, PIDRecommender 84→92, DataQualityScorer 36→39
- ARCHITECTURE.md: total 2330→2351, updated test area counts
- README.md: unit test count 2330→2351
- SPEC.md: PRs #1-#215#1-#219, analysis tests 327→347
- CLAUDE.md: added medium noise, notch-aware, quad-size bounds, LPF2, low_coherence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
* feat: implement all tuning audit findings — quad-size bounds, medium noise, notch-aware filtering, LPF2 recs

Addresses all 37 findings from tuning advisor audit:

- Quad-size-aware PID safety bounds (9 drone sizes with per-size P/D/I min/max/typical)
- Medium noise handling (20Hz deadzone, low confidence recs instead of silence)
- Notch-aware resonance filtering (skip LPF when peak in dyn_notch range)
- LPF2 recommendations (disable with RPM+clean, enable with high noise)
- Conditional dynamic notch Q (Q=300 with frame resonance, Q=500 otherwise)
- Severity-scaled sluggish P increase (P+10 when rise time >2× threshold)
- P-too-high informational warning (P > 1.3× pTypical for quad size)
- Per-style bandwidth thresholds (smooth=30, balanced=40, aggressive=60 Hz)
- Per-axis coherence warnings in Wiener data quality scoring
- I_GAIN_MIN raised from 30 to 40, STEP_MIN_MAGNITUDE from 100 to 150
- DroneSize propagated through analysis pipeline (constants → recommender → analyzer → IPC)
- Updated PID_TUNING_KNOWLEDGE.md decision tables

Tests: 2351 passed (20 new tests added)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update test counts and feature descriptions for tuning audit fixes (#219)

- TESTING.md: FilterRecommender 48→57, PIDRecommender 84→92, DataQualityScorer 36→39
- ARCHITECTURE.md: total 2330→2351, updated test area counts
- README.md: unit test count 2330→2351
- SPEC.md: PRs #1-#215#1-#219, analysis tests 327→347
- CLAUDE.md: added medium noise, notch-aware, quad-size bounds, LPF2, low_coherence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
…lowpass (#221)

- TESTING.md: DynamicLowpassRecommender 13→16 tests, total 2367→2370
- ARCHITECTURE.md: update test counts (2370, FFT Analysis 228, diagram 528)
- SPEC.md: update test count to 2370, PR range to #1#221
- README.md: split dynamic lowpass into gyro + D-term rows in filter decision
  table, add SNR filter note to ringing metric, update pipeline step 7
- CLAUDE.md: add DynamicLowpassRecommender description, ringing SNR filter in
  StepMetrics, RINGING_MIN_AMPLITUDE_FRACTION in constants list
- PID_TUNING_KNOWLEDGE.md: add D-term dynamic lowpass explanation, ringing SNR
  filter description under Rule 4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 10, 2026
* feat: add ringing SNR filter and D-term dynamic lowpass recommendations

- Ringing SNR filter: ignore zero-crossings below 5% of step magnitude
  in StepMetrics, preventing gyro noise from inflating ringing count
  and triggering false D-increase recommendations
- D-term dynamic lowpass: extend DynamicLowpassRecommender to also
  recommend dterm_lpf1_dyn_min/max_hz when throttle-dependent noise
  is detected — D amplifies noise, so dynamic filtering helps even more
- Add RINGING_MIN_AMPLITUDE_FRACTION constant (0.05) to constants.ts
- Pass dterm_lpf1_static_hz to recommendDynamicLowpass in FilterAnalyzer
- 3 new tests for D-term dynamic lowpass recommendations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update documentation for ringing SNR filter and D-term dynamic lowpass (#221)

- TESTING.md: DynamicLowpassRecommender 13→16 tests, total 2367→2370
- ARCHITECTURE.md: update test counts (2370, FFT Analysis 228, diagram 528)
- SPEC.md: update test count to 2370, PR range to #1#221
- README.md: split dynamic lowpass into gyro + D-term rows in filter decision
  table, add SNR filter note to ringing metric, update pipeline step 7
- CLAUDE.md: add DynamicLowpassRecommender description, ringing SNR filter in
  StepMetrics, RINGING_MIN_AMPLITUDE_FRACTION in constants list
- PID_TUNING_KNOWLEDGE.md: add D-term dynamic lowpass explanation, ringing SNR
  filter description under Rule 4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 11, 2026
- Fix analysis module count: 25 → 24 (across README, ARCHITECTURE)
- Remove deleted motor harmonic diagnostic from README decision table,
  RPM awareness description, TESTING.md, and ARCHITECTURE.md
- Update FilterRecommender test count: 57 → 55
- Remove all inline PR references from SPEC.md body text and
  docs/README.md table columns
- Remove completed strikethrough items from SPEC remaining items
- Update dates and PRs Merged range to #1#224
- Fix FLASH_TUNE_RECOMMENDATION_PARITY.md location in project tree
- Update complete docs count: 14 → 15

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 11, 2026
…225)

- Fix analysis module count: 25 → 24 (across README, ARCHITECTURE)
- Remove deleted motor harmonic diagnostic from README decision table,
  RPM awareness description, TESTING.md, and ARCHITECTURE.md
- Update FilterRecommender test count: 57 → 55
- Remove all inline PR references from SPEC.md body text and
  docs/README.md table columns
- Remove completed strikethrough items from SPEC remaining items
- Update dates and PRs Merged range to #1#224
- Fix FLASH_TUNE_RECOMMENDATION_PARITY.md location in project tree
- Update complete docs count: 14 → 15

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 11, 2026
- Test counts: 2368/114 → 2388/116
- README: update Huffman limitation (now detected/blocked), remove
  throttle spectrogram limitation (now implemented)
- TESTING: add ThrottleSpectrogramChart (6), spectrogramUtils (11),
  update BlackboxStatus (31→34)
- ARCHITECTURE: new chart component, updated MSP return types
- CLAUDE.md: compressionDetected field, ThrottleSpectrogramChart
- SPEC: PR range updated to #1-#229

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 11, 2026
- Test counts: 2368/114 → 2388/116
- README: update Huffman limitation (now detected/blocked), remove
  throttle spectrogram limitation (now implemented)
- TESTING: add ThrottleSpectrogramChart (6), spectrogramUtils (11),
  update BlackboxStatus (31→34)
- ARCHITECTURE: new chart component, updated MSP return types
- CLAUDE.md: compressionDetected field, ThrottleSpectrogramChart
- SPEC: PR range updated to #1-#229

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 12, 2026
- X-axis labels include profile (e.g. "#1 P2" instead of just "#1")
- Tooltip shows profile badge next to tuning type
- Helps users correlate quality progression with specific BF profiles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 12, 2026
- X-axis labels include profile (e.g. "#1 P2" instead of just "#1")
- Tooltip shows profile badge next to tuning type
- Helps users correlate quality progression with specific BF profiles

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 28, 2026
#314-#322)

- Update unit test count from 2684 to 2777 across all doc files
- Update PR range to #1-#322
- Update fcInfoHandlers count to 7 (added get_rates_config)
- Update IPC channel count to 64
- Fix preset count from 10 to 8 with correct names
- Update PIDRecommender test count (128 -> 207) and FilterRecommender (64 -> 80)
- Update headerValidation test count (24 -> 28)
- Move PRESET_GAP_ANALYSIS.md to complete/ section in docs index

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 28, 2026
- Test counts: 2777 → 2800 across all MD files
- TESTING.md: updated counts for cliUtils (19), SnapshotManager (49),
  snapshotDiffUtils (29), TuningStatusBanner (78)
- ARCHITECTURE.md: resilient restore description, updated test summary
- CLAUDE.md: 'Allowed range' in cliUtils error patterns, resilient
  restore behavior, post-apply verification fields, corrupted config
  detection
- SPEC.md: PR range → #1#332
- README.md: test count update

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 28, 2026
…ation (#332)

* fix: resilient snapshot restore, corrupted config warnings, post-apply verification

1. Snapshot restore now continues on CLI errors instead of aborting.
   Failed commands are collected and reported to UI as warnings.
   Added "Allowed range" to CLI error detection patterns.

2. Corrupted config detection (###ERROR IN diff: CORRUPTED CONFIG)
   shown in snapshot comparison modal when BF reports EEPROM corruption.

3. Post-apply read-back verification reads PID/filter config from FC
   after reconnect and compares against applied changes. Mismatches
   shown as warning in TuningStatusBanner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: update MD files for resilient restore PR #332

- Test counts: 2777 → 2800 across all MD files
- TESTING.md: updated counts for cliUtils (19), SnapshotManager (49),
  snapshotDiffUtils (29), TuningStatusBanner (78)
- ARCHITECTURE.md: resilient restore description, updated test summary
- CLAUDE.md: 'Allowed range' in cliUtils error patterns, resilient
  restore behavior, post-apply verification fields, corrupted config
  detection
- SPEC.md: PR range → #1#332
- README.md: test count update

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address CodePilot review comments on PR #332

- Restore loop: only continue on CLICommandError, rethrow transport errors
- Post-apply verification: track unverified keys (CLI-only settings not
  readable via MSP), only set applyVerified=true when all changes checked

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 29, 2026
Update all MD files to reflect Phase 3 completion of diagnostic reports:
- CLAUDE.md: worker endpoints (PUT/GET bbl), fire-and-forget BBL upload,
  30-day retention, BBL size/timeout constants, diagnose skill BBL download
- TESTING.md: test counts (2821), ReportIssueModal 6→13, diagnosticHandlers 7→14
- ARCHITECTURE.md: test counts, IPC handler tests, diagnostic handler description
- SPEC.md: PR range #1-#338, test count 2821
- README.md: test count 2821
- docs/README.md: move DIAGNOSTIC_REPORTS to Completed section
- Move docs/DIAGNOSTIC_REPORTS.md → docs/complete/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 29, 2026
Update all MD files to reflect Phase 3 completion of diagnostic reports:
- CLAUDE.md: worker endpoints (PUT/GET bbl), fire-and-forget BBL upload,
  30-day retention, BBL size/timeout constants, diagnose skill BBL download
- TESTING.md: test counts (2821), ReportIssueModal 6→13, diagnosticHandlers 7→14
- ARCHITECTURE.md: test counts, IPC handler tests, diagnostic handler description
- SPEC.md: PR range #1-#338, test count 2821
- README.md: test count 2821
- docs/README.md: move DIAGNOSTIC_REPORTS to Completed section
- Move docs/DIAGNOSTIC_REPORTS.md → docs/complete/

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 31, 2026
2941 → 2952 unit tests (+11), PR range → #1-#393.
Per-file counts: handlers 109→110, headerValidation 28→37,
PIDRecommender 232→237, FilterAnalyzer 19→20.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 31, 2026
* docs: update test counts after audit PRs #391-#393

2941 → 2952 unit tests (+11), PR range → #1-#393.
Per-file counts: handlers 109→110, headerValidation 28→37,
PIDRecommender 232→237, FilterAnalyzer 19→20.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address CodePilot review — remove ~ from E2E test count

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 31, 2026
2952 → 2957 unit tests (+5), PR range → #1-#395.
FilterRecommender.test.ts: 92 → 97 (F-MOTOR-DIAG tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Mar 31, 2026
)

2952 → 2957 unit tests (+5), PR range → #1-#395.
FilterRecommender.test.ts: 92 → 97 (F-MOTOR-DIAG tests).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Apr 6, 2026
- FC_STATE_CACHE.md: Status → Complete, all steps checked
- docs/README.md: moved to Completed section
- New src/main/cache/CLAUDE.md with full cache documentation
- Updated CLAUDE.md, src/main/CLAUDE.md, src/renderer/CLAUDE.md
- Updated TESTING.md, ARCHITECTURE.md, README.md, SPEC.md
  (test counts 3099/144, IPC handlers 67, PR range #1-#428)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eddycek added a commit that referenced this pull request Apr 11, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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