Files
ledgrab/plans/processed-audio-sources/phase-6-frontend-source-types.md
T
alexei.dolgolyov 86a9d344e6 feat(processed-audio-sources): phase 1 - audio filter framework
Add the foundation for audio processing filters, mirroring the existing
picture filter/postprocessing template system:
- AudioFilter base class, AudioFilterRegistry, AudioFilterOptionDef
- AudioProcessingTemplate dataclass + SQLite-backed store
- audio_filter_template meta-filter with recursive resolution
- Full REST API: CRUD templates + filter registry discovery
- Dependency injection wired in dependencies.py and main.py
2026-03-31 17:35:39 +02:00

3.1 KiB

Phase 6: Frontend — Source Types

Status: Not Started Parent plan: PLAN.md Domain: frontend

Objective

Update the audio source UI to support the new ProcessedAudioSource and CaptureAudioSource types, and remove the old MonoAudioSource and BandExtractAudioSource UI.

Tasks

  • Task 1: Update audio source TypeScript types/interfaces for new source types
    • Add ProcessedAudioSource type with audio_source_id + audio_processing_template_id
    • Rename MultichannelAudioSource type to CaptureAudioSource (source_type: "capture")
    • Remove MonoAudioSource and BandExtractAudioSource types
  • Task 2: Create ProcessedAudioSource card component
    • EntitySelect for input audio source (any audio source)
    • EntitySelect for audio processing template
    • Show resolved chain info (which capture source at the end)
    • Create/Edit/Delete actions
  • Task 3: Update CaptureAudioSource card (relabeled from Multichannel)
    • Same fields (device selector, loopback toggle, template selector)
    • Updated label/icon to say "Capture Audio Source"
  • Task 4: Remove MonoAudioSource card component/rendering
  • Task 5: Remove BandExtractAudioSource card component/rendering
  • Task 6: Update audio source creation dialog/flow
    • Source type picker now shows: Capture, Processed (instead of Multichannel, Mono, Band Extract)
    • Type-specific form fields
  • Task 7: Update EntitySelect dropdowns that list audio sources
    • Show type badges (Capture vs Processed) for clarity
    • Audio source selectors in CSS editor, value source editor, etc.
  • Task 8: Update i18n keys for renamed/new source types
  • Task 9: Update any inline onclick handlers or window exports in app.js

Files to Modify/Create

  • static/js/features/audio-sources.tsmodify — new types, remove old types
  • static/js/features/audio-source-modal.ts (or equivalent) — modify — updated editor
  • static/css/dashboard.cssmodify — any style updates
  • static/js/app.jsmodify — update exports if needed
  • static/js/core/i18n/en.jsonmodify — updated keys
  • static/js/core/i18n/ru.jsonmodify — updated keys
  • static/js/core/i18n/zh.jsonmodify — updated keys

Acceptance Criteria

  • ProcessedAudioSource can be created/edited/deleted from the UI
  • CaptureAudioSource shows correctly with updated label
  • MonoAudioSource and BandExtractAudioSource UI is completely removed
  • EntitySelect for audio sources shows type badges
  • Source type picker shows only Capture and Processed
  • All strings are internationalized

Notes

  • NEVER use plain HTML <select> — use project custom selectors
  • NEVER use emoji — use SVG icons
  • Use fetchWithAuth for ALL API calls
  • Call cache.invalidate() before load in save/delete handlers
  • Check DOM ID conflicts when adding new card types (project checklist)

Review Checklist

  • All tasks completed
  • Code follows project conventions
  • No unintended side effects
  • Build passes
  • Tests pass (new + existing)

Handoff to Next Phase