Skip to content

Multi-source SDR routing, lifecycle, TX suite, and visualization - #47

Merged
ceane merged 110 commits into
mainfrom
further-works
Jul 21, 2026
Merged

Multi-source SDR routing, lifecycle, TX suite, and visualization#47
ceane merged 110 commits into
mainfrom
further-works

Conversation

@ceane

@ceane ceane commented May 31, 2026

Copy link
Copy Markdown
Owner

Overview

This PR is a broad multi-source foundation pass for N-APT. Most of the work was spent moving the application from a single implicit SDR/device model toward explicit source ownership across the backend, websocket protocol, Redux state, React Flow UI, and visualization runtime.

The goal is to make multiple simultaneous or selectable sources stable throughout the application: each source has its own identity, capabilities, lifecycle, settings, status, errors, IQ stream ownership, and presentation metadata.

What changed

Multi-source backend and websocket lifecycle

  • Added source-aware websocket snapshots with stable source IDs, capabilities, active-source state, status, SDR settings, and backend errors.
  • Added explicit source selection and source-scoped pause/request behavior.
  • Added source epoch and frame-sequence metadata so clients can reject stale or cross-source IQ frames.
  • Kept mock sources warm across source switches and improved hardware warm-pool reuse and recovery.
  • Added source ownership checks for IQ subscriptions and frame broadcasts.
  • Added TX-suite source pairing for full-duplex and separate RX/TX devices.
  • Added mock TX monitoring and standby preview behavior without retuning the active receiver.
  • Preserved and sanitized sample rate, tuner bandwidth, gain, and PPM settings.

Frontend state and Sources UI

  • Added Redux source-routing state and selectors.
  • Migrated websocket middleware toward source-keyed state and source-aware commands.
  • Added local-storage migration/persistence coverage for the new source model.
  • Derived legacy device state from the active source during migration.
  • Updated the Sources sidebar and source input workflow for multiple source types.
  • Added React Flow nodes for TX configuration and TX signal configuration.
  • Added TX settings and source assignment controls.
  • Added source-aware signal presentation and display metadata helpers.
  • Improved sample-rate propagation through spectrum, waterfall, capture, and source display paths.

Demod route and signal-analysis enhancements

  • Added a Demod route TX Suite flow that assigns independent Rx and Tx sources, including full-duplex support.
  • Added separate Rx and Tx signal configuration and visualization panels.
  • Added the Find Spikes flow with FFT spike overlay controls and classifier diagnostics.
  • Added classifier metrics for bridge shape, prominence, symmetry, floor-relative power, artifact penalties, temporal stability, envelope fit, confidence, and N-APT classification.
  • Kept spike markers separate from beat detection so each analysis node has a focused responsibility.

Visualization runtime

  • Added a source visualization runtime abstraction.
  • Added a WebGPU device pool to manage visualization resources per source and avoid accidental cross-source reuse.
  • Updated FFT and waterfall rendering paths for source-specific lifecycle and sample-rate changes.
  • Updated classifier, detector, and temporal shader behavior.

Tests and validation

  • Added regression coverage for source routing, websocket migration, source presentation, visualization runtime, WebGPU device pooling, TX-suite flow and source assignment, sample-rate handling, and component behavior.
  • Expanded Rust coverage for source lifecycle, TX-suite pairing, mock TX behavior, IQ ownership, and source recovery.
  • TypeScript typecheck passed.
  • Jest: 192 suites passed; 1,459 tests passed, 1 skipped.
  • Shader tests: 10 files passed; 42 tests passed.
  • Rust test suite passed.
  • Whitespace validation passed.
  • Lint completed with existing warnings only.
  • Formatting checks still report repository-wide pre-existing drift in Rust and TypeScript files.

Screenshots

Sources overview

Sources overview

This view shows the source inventory with Mock APT SDR, Mock Tx SDR, and File Selection playback sources, including capability and connection state.

TX source standby view

TX source standby

This view shows the TX-capable source selected while the FFT display is in standby preview mode.

Demod route: Find Spikes

Screenshot 2026-07-20 at 21 47 20

The Find Spikes flow exposes FFT scanning, spike-overlay controls, and classifier diagnostics for the signal-analysis enhancements.

ceane added 15 commits May 30, 2026 17:08
- Fixing end frequency formatting
… it wanted)

- [WIP] Further progress on multiple devices and transmit functionality
- Gemini fixed a memory leak in a test
- Fixing all tests
- Bug fixes for File Playback
…by consolidating in signals.yaml AND signals.ts/redux

- [WIP] Continuing Tx work, with src/rs/ifft
- [WIP] Combatting against foldover (leaky spectrum) that I notice when tuning so Tx doesn't accidentally emit erronenous, non-existent signals
…hit in because of a contradiction!

- Working out some bugs with logical frame rate
- Working on fft power line, contrast of the select box on light mode
@ceane ceane self-assigned this Jun 3, 2026
ceane added 14 commits June 6, 2026 15:00
- Added a row in FFTCanvas displaying stats
-  Rolling in numbers on the DaysSince component
- Added /3d-model-gallery with tons of new components/tinfra
- Attempted to add realistic RF to the Mock APT SDR, but it's not working well
- Restoring fft marker lines
- Turn on metal for Mock APT SDR via signals.yaml, removing metal flag
- Updating and consolidating 3D Models
- Longstanding fix to the lattice of the Sector tower!
- Fixing hexagonal cell site/rotated by 30 deg
…; wasted all my GPT on that shit but Gemini quickly fixed it

- [WIP] Continuing Tx work; only half-duplex mode right now, but working on multiple SDRs
- [WIP] Tx work continued, adding "Hop" and "Safety" for Tx, hopping and a safety for Tx so signals don't go too far
- [WIP] Trying to fix drag and drop
ceane added 22 commits July 15, 2026 00:55
- Refine spectrum, waterfall, FFT, demodulation, and source-sidebar behavior across live and file playback paths.\n- Add file playback helpers, placeholder state handling, transmitter/SDR scene components, fonts, and updated signal-learning visuals.\n- Improve NAPT classifier shaders, regression harnesses, and GPU fixture coverage.\n- Expand component and flow-model tests for authentication, capture controls, metadata, spike detection, transmitters, playback, and file selection.\n- Update Rust encryption fixtures for the CaptureResult metadata contract.\n- Refresh project guidance and ignore rules.
- Provide all N-APT shader exports required by the WebGPU hook test mock.\n- Keep the classifier readback contract assertion stable across formatter-driven line wrapping.\n- Verified the complete frontend Jest and shader suites plus TypeScript typecheck.
Integrate source-aware RX/TX lifecycle handling across the Rust websocket server and Redux middleware. Add TX suite source assignment, source routing state, visualization runtime/device pooling, and React Flow nodes for TX configuration. Update spectrum, waterfall, FFT, source presentation, capture, and authentication components to use the new source-aware behavior. Extend regression coverage for source routing, TX suite flows, WebGPU device pooling, sample-rate handling, middleware migration, and visualization runtime behavior.
@ceane ceane changed the title Refactor websocket sources and sidebar device UI Multi-source SDR routing, lifecycle, TX suite, and visualization Jul 21, 2026
ceane added 4 commits July 20, 2026 21:27
Capture the Sources section in the multi-source overview state and the TX-source standby state for inclusion in pull request documentation.
Capture the Demod route with the multi-source TX Suite flow and the Find Spikes classifier diagnostics for PR documentation.
Replace the sidebar-only spike screenshot with the Demod route UI showing FFT spike markers, active overlay state, spike count, and classifier diagnostics.
Replace Array.prototype.at usage with target-compatible last-call indexing so the existing TypeScript compiler target can typecheck the FFTNode regression tests.
@ceane
ceane marked this pull request as ready for review July 21, 2026 12:58
@ceane

ceane commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

Going to merge. It's stable enough.

@ceane
ceane merged commit b057487 into main Jul 21, 2026
11 checks passed
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.

2 participants