- Fix client startup order: fetch/apply server UI state BEFORE loadGuilds() to prevent overwriting persisted state with default guild
- Remove auto-post of first guild in loadGuilds() — let server state drive selection
- Refactor collectWatchableChannels() to collect text channels fast first, then discover threads in parallel with 5s per-channel timeout and 30s overall timeout to prevent blocking message sync
- Ignore /favicon.ico 404 in error logging to reduce noise
Fixes:
- UI state now persists across restart (was being overwritten by client startup race)
- Backlog sync no longer hangs on thread discovery (was blocking before message sync)
- Cleaner logs without favicon 404 errors
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add CHANNELS constant (1 for mono)
- Use audioBuffer.length for loop instead of float32Array.length
- Use getChannelData(0) assignment pattern from aa85dd9
- Proper buffer frame calculation with CHANNELS divisor
- Use createScriptProcessor instead of Tone.UserMedia for transmit
- Use analyser.getByteFrequencyData() for proper visualizer
- Keep per-user timing with userTimelines Map for listen
- Remove Tone.js dependencies from transmit
- Restore proper AudioContext usage
- Add audioContextListen and userTimelines to state
- Create AudioContext on listen toggle
- Parse user ID hash from PCM packet header
- Track playback timing per user to prevent audio gaps
- Use proper AudioContext timing instead of Tone.now()
- Clear timelines when toggling listen off
- Remove ES module import statement from dashboard.js
- Use global Tone object loaded via CDN
- Remove type=module from script tag
- Fixes module resolution error
- Replace AudioWorkletNode with Tone.UserMedia for microphone capture
- Use Tone.Analyser for waveform analysis and Tone.Meter for level detection
- Implement proper stereo audio capture with real-time PCM transmission
- Use Tone.context for audio playback with proper buffer handling
- Add Tone.js CDN to HTML template
- Convert dashboard.js to ES module for Tone.js import
- Improve audio quality and reliability with battle-tested library
- Create audio-worklet.js with MicrophoneProcessor for audio capture
- Implement noise gate and RMS calculation in worklet
- Send PCM data via MessagePort to main thread
- Update startStreaming to use AudioWorkletNode instead of deprecated ScriptProcessorNode
- Remove WebCodecs decoder complexity from listen
- Keep simple PCM playback for listen feature
- Remove broadcastOpusToWeb from types and webserver
- Revert recorder to PCM-only broadcast path
- Remove WebCodecs AudioDecoder from dashboard.js
- Simplify WebSocket handler to just play PCM frames
- Remove Howler.js and Tone.js dependencies
- Keep simple AudioContext playback that works reliably
- Rename playAudioData to playAudioDataDirect for clarity
- Remove duplicate playAudioData function with debug logging
- Use direct copyTo into temp Float32Array per channel
- Check isListening state in output callback
- AudioData.copyTo requires destination Float32Array, not AudioBuffer channel
- Create temp Float32Array per channel, copyTo into it, then set into AudioBuffer
- Properly handle 48kHz stereo Opus output to AudioContext
- AudioData.copyTo requires planeIndex parameter per channel
- Check isListening state before decode to prevent closed decoder errors
- Properly close decoder when leaving listen mode
- Queue packets if decoder not ready yet
- Add broadcastOpusToWeb to PcmBroadcaster interface for raw Opus packets
- Server broadcasts Opus frames with mode byte (1) + user hash + packet data
- Browser detects packet mode: mode=1 for Opus, mode=0 for legacy PCM
- Implement WebCodecs AudioDecoder for Opus decoding in browser
- Keep existing PCM playback as fallback for compatibility
- Show error if WebCodecs unsupported
- Fixes listen feature under Bun where native Opus decode unavailable
- Added functions to retrieve message location, sticker metadata, and display content in messageCapture.ts.
- Updated captureMessage function to store thread information and sticker metadata in the database.
- Modified messageStore.ts to support querying messages and attachments by thread ID.
- Updated types.ts to include thread_id in AttachmentRecord.
- Altered database schema in muxer-queue.ts to add thread_id column to attachments.
- Introduced ChannelSummary interface and listWatchableChannels method in voiceController.ts to fetch watchable channels.
- Added API endpoint in webserver.ts to retrieve channels for a given guild.
- Create responsive dashboard with dark theme
- Implement three tabs: Text Messages, Images, Voice
- Add channel/thread filtering
- Real-time WebSocket updates with polling fallback
- Display message metadata (author, timestamp, edits, deletions)
- Show image previews with upload status and URLs